Hide menu
No Matches
cadex::ModelData_BoundingBoxProvider Class Reference

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

#include <cadex/ModelData_BoundingBoxProvider.hxx>

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

Public Member Functions

 ModelData_BoundingBoxProvider ()
 ModelData_BoundingBoxProvider (const ModelData_SceneGraphElement &theRef)
virtual void Feed (ModelData_PropertyTable &theTable) const
 Feeds the property table.
- Public Member Functions inherited from cadex::ModelData_RefPropertyProvider
 ModelData_RefPropertyProvider ()
 ModelData_RefPropertyProvider (const ModelData_SceneGraphElement &theRef)
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 ()
virtual void Feed (ModelData_PropertyTable &theTable) const =0
 Feeds the property table.

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

Constructor & Destructor Documentation

◆ ModelData_BoundingBoxProvider() [1/2]

cadex::ModelData_BoundingBoxProvider::ModelData_BoundingBoxProvider ( )


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)


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

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.