Provides CAD Exchanger visualization structure. More...
Public Types | |
typedef cadex::internal::ModelPrs_SceneImpl | ImplType |
Public Member Functions | |
ModelPrs_Scene () | |
Constructor. | |
ModelPrs_Scene (ImplType *) | |
Constructor. Reserved for internal use. | |
void | AddRoot (ModelPrs_SceneNode &theNode) |
Adds a root scene node. | |
void | RemoveRoot (ModelPrs_SceneNode &theNode) |
Remove a root scene node. | |
void | Clear () |
Clear all root scene nodes. | |
void | Update (const Base_ProgressStatus &theProgressStatus=Base_ProgressStatus()) |
Applies changes of attached Scene Nodes. | |
void | Wait () |
Waiting until all changes are applied by Update method. | |
void | Accept (ModelPrs_SceneNodeVisitor &theVisitor) |
Accepts a visitor. | |
ModelPrs_SelectionManager & | SelectionManager () |
Returns object for selection management. | |
![]() | |
void | Nullify () |
Resets reference to implementation object. | |
bool | IsNull () const |
Returns true if the object is nullified. | |
operator bool () const | |
Casts the object to the bool type. | |
internal::Base_HandledObject * | Impl () const |
Return a handle to backend (reserved for internal use). | |
Additional Inherited Members | |
![]() | |
Base_PublicObject (const internal::Base_HandledObject *theObject) | |
Constructor (reserved for internal use). | |
template<typename T > | |
T * | GetOrCreateImpl () |
Reserved for internal use. | |
Provides CAD Exchanger visualization structure.
ModelPrs_Scene encapsulates a visualization scene graph. It means that scene contains an entry point to all roots.
A scene contains a shared pointer to its internal implementation, so simple copying an object will just copy a shared pointer. Therefore any modification of the copied object will propagate to original object.
cadex::ModelPrs_Scene::ModelPrs_Scene | ( | ) |
Constructor.
Creates an object with implementation (IsNull() will return false).
void cadex::ModelPrs_Scene::AddRoot | ( | ModelPrs_SceneNode & | theNode | ) |
Adds a root scene node.
void cadex::ModelPrs_Scene::Clear | ( | ) |
Clear all root scene nodes.
void cadex::ModelPrs_Scene::RemoveRoot | ( | ModelPrs_SceneNode & | theNode | ) |
void cadex::ModelPrs_Scene::Update | ( | const Base_ProgressStatus & | theProgressStatus = Base_ProgressStatus() | ) |
Applies changes of attached Scene Nodes.
Updating the scene can be time-consuming and therefore should be delayed until changes to the underlying scene node’s data have been applied. For instance, the following example demonstrates multiple changes and single scene update:
This method is asynchronous. It means that changes will be applied piecemeal.
Any manipulations with scene nodes forbidden while changes are applied. Wait() method helps to understand when changes were applied.
void cadex::ModelPrs_Scene::Wait | ( | ) |
Waiting until all changes are applied by Update method.