![]() |
VR-Forces 5.0.3 Developer's Guide
|
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.

Public Member Functions | |
| DtScalingAlgorithm () | |
| virtual | ~DtScalingAlgorithm () |
| virtual double | calculateScale (const DtOsgCullVisitorParameters &info, const osg::Camera &camera, const osg::Vec3d &position, double modelRadius, DtUniqueID objectElementId) const =0 |
| virtual double | scaleFactor () const |
| virtual void | setScaleFactor (double maxScale) |
| virtual double | maxScaleFactor () const |
| virtual void | setMaxScaleFactor (double maxScale) |
Protected Attributes | |
| double | myScaleFactor |
| double | myMaxScaleFactor |
Private Member Functions | |
| DtScalingAlgorithm & | operator= (const DtScalingAlgorithm &rhs) |
| DtScalingAlgorithm (const DtScalingAlgorithm &orig) | |
| 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 |