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 Member Functions | Private Member Functions | Friends
makVrv::DtXRScalingAlgorithm Class Reference

XR scaling algorithm implementation This Scaling algorithm implements the 'classic' MAK Stealth XR Scaling, which scales by distance between the camera and the object, and then scales that 'scale' by the object's size; so smaller objects get scaled more than larger objects. More...

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

Public Member Functions

virtual ~DtXRScalingAlgorithm ()
 DTOR. More...
 
virtual double calculateScale (const DtOsgCullVisitorParameters &info, const osg::Camera &camera, const osg::Vec3d &position, double modelRadius, DtUniqueID objectElementId) const
 Calculate the XR scale factor. More...
 
- Public Member Functions inherited from makVrv::DtScalingAlgorithm
 DtScalingAlgorithm ()
 CTOR. More...
 
virtual ~DtScalingAlgorithm ()
 DTOR. 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 Member Functions

 DtXRScalingAlgorithm ()
 CTOR. More...
 

Private Member Functions

DtXRScalingAlgorithmoperator= (const DtXRScalingAlgorithm &rhs)
 Unimplemented Copy CTOR. More...
 
 DtXRScalingAlgorithm (const DtXRScalingAlgorithm &orig)
 

Friends

class DtXRScalingAlgorithmCreator
 

Additional Inherited Members

- Protected Attributes inherited from makVrv::DtScalingAlgorithm
double myScaleFactor
 
double myMaxScaleFactor
 

Detailed Description

XR scaling algorithm implementation This Scaling algorithm implements the 'classic' MAK Stealth XR Scaling, which scales by distance between the camera and the object, and then scales that 'scale' by the object's size; so smaller objects get scaled more than larger objects.

Constructor & Destructor Documentation

makVrv::DtXRScalingAlgorithm::DtXRScalingAlgorithm ( )
protected

CTOR.

virtual makVrv::DtXRScalingAlgorithm::~DtXRScalingAlgorithm ( )
virtual

DTOR.

makVrv::DtXRScalingAlgorithm::DtXRScalingAlgorithm ( const DtXRScalingAlgorithm orig)
private

Member Function Documentation

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

Calculate the XR scale factor.

This is the method can be overridden to change to a different method. This version will scale based on the distance of the object from the eyepoint, its size, and the scale factor parameter in the cull visitor parameters set.

Parameters
[in]infois the cull visitor parameters object, which contains the current XR 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.
Returns
the amount to scale the object

Implements makVrv::DtScalingAlgorithm.

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

Unimplemented Copy CTOR.

Friends And Related Function Documentation

friend class DtXRScalingAlgorithmCreator
friend

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)