The DtModelScaler prepares the data from the osg camera, osg node, and cull visitor parameters and then passes it to the DtScalingAlgorithm provided to the model scaler.
More...
The DtModelScaler prepares the data from the osg camera, osg node, and cull visitor parameters and then passes it to the DtScalingAlgorithm provided to the model scaler.
An instance of this class is created each frame for each DtOsgChannel and given to the DtOsgCullVisitorParameters to make it available to the DtOsgCullVisitor and to the DtInstanceManager
CTOR.
Create a model scaler with the desired scaling algorithm
| virtual makVrv::DtModelScaler::~DtModelScaler |
( |
| ) |
|
|
protectedvirtual |
DTOR - Called from osg::Referenced.
This is protected to prevent the accidental creation of the scaler on the stack.
| makVrv::DtModelScaler::DtModelScaler |
( |
| ) |
|
|
private |
| makVrv::DtModelScaler::DtModelScaler |
( |
const DtModelScaler & |
orig | ) |
|
|
private |
Calculate the scale factor.
Override the implementation of this method by registering a custom DtScalingAlgorithm implementation.
- Parameters
-
| [in] | info | is the cull visitor parameters object, which contains the current scale factor setting, as well as other potentially useful information for a scaling algorithm. |
| [in] | camera | is the current cull or intersector camera, from which the eyepoint can be found, as well as the viewport, model view and projection matrices, if desired. |
| [in] | position | is the position of the object to be scaled |
| [in] | modelRadius | is the bounding radius of the object to be scaled |
| [in] | objectElementId | is the element ID of the object being scaled, if it exists - check first for (DtUniqueID)0. |
- Returns
- the amount to scale the object
Calculate the scale factor.
This is the method called by visitors to determine the scale factor. It extracts the position, modelRadius, and elementID (if any) from the osg::Node and then calls the overridable calculateScale with those values.
Accessor for this model scaler's scaling algorithm.
| DtDe& makVrv::DtModelScaler::myDe |
|
protected |
The documentation for this class was generated from the following file:
- /data/exports/nrhent7-1/nightly/docs/vrForces.vrf4-8-branch/include/vrvOsg/DtModelScaler.h