C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Tree of geometric model. More...

#include <model_tree.h>

+ Inheritance diagram for c3d::MbModelTree:
+ Collaboration diagram for c3d::MbModelTree:

Public Member Functions

virtual void AddNode (const TapeBase *mem, const ClusterReference &ref)
 Create a node by data and add to the tree. More...
 
virtual void CloseNode (const TapeBase *mem)
 Close the node (remove it from the stack so that its parent becomes the current node).
 
virtual VERSION GetVersion ()
 Tree version.
 
virtual writeroperator>> (writer &)
 Write the tree.
 
virtual readeroperator<< (reader &)
 Read the tree.
 
MbTreeNodeAddNode (const MbTreeNode &node, bool *added=nullptr)
 Add a node with the data from the given node if a node with such data does not exist. More...
 
MbTreeNodeAddNode (const MbItemData &data, bool *added=nullptr)
 Add a node with the given if a node with such data does not exist. More...
 
std::set< MbTreeNode > & GetFilteredNodes ()
 Access to nodes of the tree, ordered by data.
 
void FillRoots ()
 Fill the tree roots.
 

Protected Member Functions

void AddBranch (const NodeBranch &branch, bool partial)
 Add a branch to the tree: More...
 
std::vector< const IModelTreeNode * > GetUniqueNodes (std::vector< const IModelTreeNode * > &nodes) const
 Get unique nodes for given set of nodes. Walk through the given nodes and exclude nodes, which are children of other given nodes (and will be read as a part of them). Thus, the result set of nodes will represent the roots of subtrees containing all given nodes.
 
void BuildTree ()
 Build the tree using indices (used during reading the tree).
 

Detailed Description

Tree of geometric model.

Tree of geometric model (can have several roots).

Member Function Documentation

◆ AddNode() [1/3]

virtual void c3d::MbModelTree::AddNode ( const TapeBase mem,
const ClusterReference ref 
)
virtual

Create a node by data and add to the tree.


IModelTreeNode methods.

Implements c3d::IModelTree.

◆ AddNode() [2/3]

MbTreeNode* c3d::MbModelTree::AddNode ( const MbTreeNode node,
bool *  added = nullptr 
)

Add a node with the data from the given node if a node with such data does not exist.


Parameters
node- a node with data.
added- filled if non-null (true - if a node added, false - a node already exists).
Returns
- a pointer to the tree node.

◆ AddNode() [3/3]

MbTreeNode* c3d::MbModelTree::AddNode ( const MbItemData data,
bool *  added = nullptr 
)

Add a node with the given if a node with such data does not exist.

Parameters
node- a data.
added- filled if non-null (true - if a node added, false - a node already exists).
Returns
- a pointer to the tree node.

◆ AddBranch()

void c3d::MbModelTree::AddBranch ( const NodeBranch &  branch,
bool  partial 
)
protected

Add a branch to the tree:

Parameters
branch- a leaf node with the tree branch, leading to it;
partial- defines partial or full read of the leaf node.

The documentation for this class was generated from the following file: