C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Tree of geometric model. More...
#include <model_tree.h>
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 writer & | operator>> (writer &) |
Write the tree. | |
virtual reader & | operator<< (reader &) |
Read the tree. | |
MbTreeNode * | 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. More... | |
MbTreeNode * | AddNode (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). | |
Tree of geometric model.
Tree of geometric model (can have several roots).
|
virtual |
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.
node | - a node with data. |
added | - filled if non-null (true - if a node added, false - a node already exists). |
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.
node | - a data. |
added | - filled if non-null (true - if a node added, false - a node already exists). |
|
protected |
Add a branch to the tree:
branch | - a leaf node with the tree branch, leading to it; |
partial | - defines partial or full read of the leaf node. |