VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOsgNodeXRScaler Class Reference

The DtOsgNodeXRScaler class provides default strategy for implementing XR scaling. More...

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

Public Member Functions

 DtOsgNodeXRScaler (DtDe &de, DtScalingAlgorithm *scalingAlgorithm)
 CTOR.
virtual double calculateXRScale (const DtOsgCullVisitorParameters &info, const osg::Camera &camera, const osg::Vec3d &position, double modelRadius, DtUniqueID objectElementId)
 Calculate the scale factor.
double calculateXRScale (const DtOsgCullVisitorParameters &info, const osg::Camera &camera, const osg::Node &node)
 Calculate the XR scale factor.

Protected Member Functions

virtual ~DtOsgNodeXRScaler ()
 DTOR - Called from osg::Referenced.

Protected Attributes

DtScalingAlgorithmmyAlgorithm
DtDemyDe

Detailed Description

The DtOsgNodeXRScaler class provides default strategy for implementing XR scaling.

Constructor & Destructor Documentation

makVrv::DtOsgNodeXRScaler::DtOsgNodeXRScaler ( DtDe de,
DtScalingAlgorithm scalingAlgorithm 
)

CTOR.

Takes ownership of its scaling algorithm object

virtual makVrv::DtOsgNodeXRScaler::~DtOsgNodeXRScaler ( )
protectedvirtual

DTOR - Called from osg::Referenced.

This is protected to prevent the accidental creation of the scaler on the stack.

Member Function Documentation

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

Calculate the scale factor.

Override the implementation of this method by registering a custom DtScalingAlgorithm implementation.

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

Referenced by makVrv::DtOsgCullVisitorParameters::calculateXRScale().

double makVrv::DtOsgNodeXRScaler::calculateXRScale ( const DtOsgCullVisitorParameters info,
const osg::Camera &  camera,
const osg::Node &  node 
)

Calculate the XR scale factor.

This is the method called by the visitors to determine the scale factor. It extracts the position, modelRadius, and elementID (if any) from the osg::Node and then calls the overridable calculateXRScale with those value.

Member Data Documentation

DtScalingAlgorithm* makVrv::DtOsgNodeXRScaler::myAlgorithm
protected
DtDe& makVrv::DtOsgNodeXRScaler::myDe
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)