VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
makVrv::DtScalingAlgorithm Class Referenceabstract

Provides an algorithm for scaling objects in the scene. More...

Inheritance diagram for makVrv::DtScalingAlgorithm:
Inheritance graph
[legend]

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

DtScalingAlgorithmoperator= (const DtScalingAlgorithm &rhs)
 Unimplemented Assignment Operator. More...
 
 DtScalingAlgorithm (const DtScalingAlgorithm &orig)
 

Detailed Description

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.

Constructor & Destructor Documentation

makVrv::DtScalingAlgorithm::DtScalingAlgorithm ( )

CTOR.

virtual makVrv::DtScalingAlgorithm::~DtScalingAlgorithm ( )
virtual

DTOR.

makVrv::DtScalingAlgorithm::DtScalingAlgorithm ( const DtScalingAlgorithm orig)
private

Member Function Documentation

virtual double makVrv::DtScalingAlgorithm::calculateScale ( const DtOsgCullVisitorParameters info,
const osg::Camera &  camera,
const osg::Vec3d &  position,
double  modelRadius,
DtUniqueID  objectElementId 
) const
pure virtual

Calculate the scale factor for an object in the scene.

Parameters
[in]infois the cull visitor parameters object, which contains the current scale factor setting, as well as other potentially useful information for a scaling algorithm.
[in]camerais 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]positionis the position of the object to be scaled
[in]modelRadiusis the bounding radius of the object to be scaled
[in]objectElementIdis 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.
Returns
the amount to scale the object

Implemented in makVrv::DtXRScalingAlgorithm, and makVrv::DtLinearScalingAlgorithm.

virtual double makVrv::DtScalingAlgorithm::scaleFactor ( ) const
virtual

Get the scale factor for this algorithm to use.

virtual void makVrv::DtScalingAlgorithm::setScaleFactor ( double  maxScale)
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 double makVrv::DtScalingAlgorithm::maxScaleFactor ( ) const
virtual

Get the maximum scale factor for this algorithm to use.

virtual void makVrv::DtScalingAlgorithm::setMaxScaleFactor ( double  maxScale)
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

DtScalingAlgorithm& makVrv::DtScalingAlgorithm::operator= ( const DtScalingAlgorithm rhs)
private

Unimplemented Assignment Operator.

Member Data Documentation

double makVrv::DtScalingAlgorithm::myScaleFactor
protected
double makVrv::DtScalingAlgorithm::myMaxScaleFactor
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)