struct mrpt::opengl::CompiledScene::Node

Overview

struct Node
{
    // fields

    std::weak_ptr<const CVisualObject> obj;
    const CVisualObject* raw = nullptr;
    bool isContainer = false;
    bool compiled = false;
    bool hasTransform = false;
    uint64_t dataVersion = 0;
    uint64_t transformVersion = 0;
    mrpt::math::CMatrixFloat44 worldMatrix = mrpt::math::CMatrixFloat44::Identity();
    bool visible = false;
    bool castShadows = true;
    std::vector<RenderableProxy::Ptr> proxies;
    std::vector<std::unique_ptr<Node>> children;

    // methods

    bool isFor(const std::shared_ptr<const CVisualObject>& o) const;
};

Fields

std::weak_ptr<const CVisualObject> obj

The object.

A weak pointer, so objects removed from the scene are not kept alive by the renderer.

bool compiled = false

Proxies created (objects other than containers)

bool hasTransform = false

worldMatrix, etc.

computed at least once

uint64_t dataVersion = 0

CVisualObject::dataVersion() uploaded to the proxies.

uint64_t transformVersion = 0

CVisualObject::transformVersion() of worldMatrix, etc.

std::vector<std::unique_ptr<Node>> children

Containers: their objects.

Other objects: their internal children (e.g. axis labels), then their name label, if shown.

Methods

bool isFor(const std::shared_ptr<const CVisualObject>& o) const

Whether this node is for that object instance (not another one later created at the same memory address)