Hide menu
cadex::ModelData_BoundingBoxProvider Class Reference

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

Inherits cadex::ModelData_RefPropertyProvider.

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...

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

Constructor & Destructor Documentation

cadex::ModelData_BoundingBoxProvider::ModelData_BoundingBoxProvider ( )


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

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


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

Member Function Documentation

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

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.