Hide menu
cadex::ModelData_BoundingBoxProvider Class Reference

Computes bounding box of the element and adds it to a property table. More...

Inheritance diagram for cadex::ModelData_BoundingBoxProvider:
cadex::ModelData_RefPropertyProvider cadex::ModelData_PropertyTable::Provider

Public Member Functions

 ModelData_BoundingBoxProvider ()
 Constructor. More...
 
 ModelData_BoundingBoxProvider (const ModelData_SceneGraphElement &theRef)
 Constructor. More...
 
virtual void Feed (ModelData_PropertyTable &theTable) const
 Feeds the property table. More...
 
- Public Member Functions inherited from cadex::ModelData_RefPropertyProvider
 ModelData_RefPropertyProvider ()
 Constructor. More...
 
 ModelData_RefPropertyProvider (const ModelData_SceneGraphElement &theRef)
 Constructor. More...
 
ModelData_SceneGraphElement Ref () const
 Returns the element the provider is attached to.
 
void SetRef (const ModelData_SceneGraphElement &theRef)
 Sets the element the provider is attached to.
 
- Public Member Functions inherited from cadex::ModelData_PropertyTable::Provider
virtual ~Provider ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from cadex::ModelData_RefPropertyProvider
internal::ModelData_SceneGraphElementImpl * myRef
 

Detailed Description

Computes bounding box of the element and adds it to a property table.

Bounding box for any graph element is stored in the property table associated with that graph element. The value is stored with the name "CADEX_BOUNDING_BOX", returned by ModelData_PropertyTable::BoundingBoxPropertyName().

Uses ModelAlgo_BoundingBox to perform actual computations. Invokes ModelAlgo_BoundingBox::Compute() with theForcedFlush set to true. Thus, constructs any representation which has been constructed with the help of providers which have not been flushed yet.

For details on computation of bounding boxes refer to ModelAlgo_BoundingBox.

See also
ModelData_ValidationPropertyProvider.

Constructor & Destructor Documentation

◆ ModelData_BoundingBoxProvider() [1/2]

cadex::ModelData_BoundingBoxProvider::ModelData_BoundingBoxProvider ( )

Constructor.

Creates a provider not attached to any element. Use Ref() later on for attacment.

◆ ModelData_BoundingBoxProvider() [2/2]

cadex::ModelData_BoundingBoxProvider::ModelData_BoundingBoxProvider ( const ModelData_SceneGraphElement theRef)

Constructor.

theRef specifies the source element for which the bounding box will be computed in the Feed() method.

Member Function Documentation

◆ Feed()

void cadex::ModelData_BoundingBoxProvider::Feed ( ModelData_PropertyTable theTable) const
virtual

Feeds the property table.

Computes bounding box of the element specified in the constructor and adds it to the property table.

Implements cadex::ModelData_PropertyTable::Provider.