![]() |
VR-Forces 4.10 Class Documentation
|
Provides an algorithm for scaling objects in the scene. More...

Public Member Functions | |
| DtScalingAlgorithm () | |
| CTOR. More... | |
| virtual | ~DtScalingAlgorithm () |
| DTOR. More... | |
| virtual double | calculateScale (const DtOsgCullVisitorParameters &info, const osg::Camera &camera, const osg::Vec3d &position, double modelRadius, DtUniqueID objectElementId) const =0 |
| Calculate the scale factor for an object in the scene. More... | |
| virtual double | scaleFactor () const |
| Get the scale factor for this algorithm to use. More... | |
| virtual void | setScaleFactor (double maxScale) |
| Set the scale factor for this algorithm to use. More... | |
| virtual double | maxScaleFactor () const |
| Get the maximum scale factor for this algorithm to use. More... | |
| virtual void | setMaxScaleFactor (double maxScale) |
| Set the maximum scale factor for this algorithm to use. More... | |
Protected Attributes | |
| double | myScaleFactor |
| double | myMaxScaleFactor |
Private Member Functions | |
| DtScalingAlgorithm & | operator= (const DtScalingAlgorithm &rhs) |
| Unimplemented Assignment Operator. More... | |
| DtScalingAlgorithm (const DtScalingAlgorithm &orig) | |
Provides an algorithm for scaling objects in the scene.
It provides a container for the scale factor (and max scale factor if needed) to use, and then provides the interface for a const method to calculate the actual scale factor based on object and camera positions and object size. Instances of DtScalingAlgorithm are created by the DtScalingAlgorithmFactory, which are in turn provided to a DtModelScaler. The DtModelScaler is the interface used by the Cull visitor, instance manager, and intersector classes to scale objects as desired.
| makVrv::DtScalingAlgorithm::DtScalingAlgorithm | ( | ) |
CTOR.
|
virtual |
DTOR.
|
private |
|
pure virtual |
Calculate the scale factor for an object in the scene.
| [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. This can be used to find other information about the object being scaled, if needed. |
Implemented in makVrv::DtXRScalingAlgorithm, and makVrv::DtLinearScalingAlgorithm.
|
virtual |
Get the scale factor for this algorithm to use.
|
virtual |
Set the scale factor for this algorithm to use.
This is set by the channel using the current observer mode's scale factor setting
|
virtual |
Get the maximum scale factor for this algorithm to use.
|
virtual |
Set the maximum scale factor for this algorithm to use.
This is set by the channel using the current observer mode's max scale factor setting
|
private |
Unimplemented Assignment Operator.
|
protected |
|
protected |