Skip to main content
Version: 🚧 Nightly

Structure f3d::node_state_t

Definition: types.h (line 373)

Describe a single node of the scene hierarchy, as returned by scene::getSceneHierarchy.

Members

Public attributes

Variable id

Definition: types.h (line 380)

int f3d::node_state_t::id = -1

Identifier of the node, to be used with scene::setNodeVisibility. Ids are assigned in depth-first pre-order, starting at 0 with the root node of the first added file, and correspond to the index of the node in the vector returned by scene::getSceneHierarchy. They are only invalidated by scene::clear, as adding files to the scene only appends nodes.

Type: int

Variable parentId

Definition: types.h (line 383)

int f3d::node_state_t::parentId = -1

Identifier of the parent node, -1 when the node is a root node.

Type: int

Variable level

Definition: types.h (line 386)

int f3d::node_state_t::level = 0

Depth of the node, 0 for a root node, can be used to indent it.

Type: int

Variable label

Definition: types.h (line 389)

std::string f3d::node_state_t::label

Name of the node, a placeholder is used when the file does not provide any.

Type: std::string

Variable visible

Definition: types.h (line 392)

bool f3d::node_state_t::visible = true

Visibility of the node.

Type: bool

Variable hasChildren

Definition: types.h (line 395)

bool f3d::node_state_t::hasChildren = false

True if the node has at least one child.

Type: bool

Variable collapsed

Definition: types.h (line 399)

bool f3d::node_state_t::collapsed = false

True if a user interface should display this node collapsed by default, which is used to compact subtrees whose nodes do not carry any meaningful name

Type: bool

Public functions

Function operator==

bool f3d::node_state_t::operator==(const node_state_t &other) const

Parameters:

Return type: bool