osg::AutoTransform Class Reference

AutoTransform is a derived form of Transform that automatically scales or rotates to keep its children aligned with screen coordinates. More...

Inheritance diagram for osg::AutoTransform:

Inheritance graph
[legend]
List of all members.

Public Types

 NO_ROTATION
 ROTATE_TO_SCREEN
 ROTATE_TO_CAMERA
enum  AutoRotateMode { NO_ROTATION, ROTATE_TO_SCREEN, ROTATE_TO_CAMERA }

Public Member Functions

 AutoTransform ()
 AutoTransform (const AutoTransform &pat, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual osg::ObjectcloneType () const
 clone an object of the same type as the node.
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 return a clone of a node, with Object* return type.
virtual bool isSameKindAs (const osg::Object *obj) const
 return true if this and obj are of the same kind of object.
virtual const char * className () const
 return the name of the node's class type.
virtual const char * libraryName () const
 return the name of the node's library.
virtual void accept (NodeVisitor &nv)
 Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.
virtual AutoTransformasAutoTransform ()
virtual const AutoTransformasAutoTransform () const
void setPosition (const Vec3 &pos)
const Vec3getPosition () const
void setRotation (const Quat &quat)
const QuatgetRotation () const
void setScale (float scale)
void setScale (const Vec3 &scale)
const Vec3getScale () const
void setMinimumScale (float minimumScale)
float getMinimumScale () const
void setMaximumScale (float maximumScale)
float getMaximumScale () const
void setPivotPoint (const Vec3 &pivot)
const Vec3getPivotPoint () const
void setAutoUpdateEyeMovementTolerance (float tolerance)
float getAutoUpdateEyeMovementTolerance () const
void setAutoRotateMode (AutoRotateMode mode)
AutoRotateMode getAutoRotateMode () const
void setAutoScaleToScreen (bool autoScaleToScreen)
bool getAutoScaleToScreen () const
void setAutoScaleTransitionWidthRatio (float ratio)
float getAutoScaleTransitionWidthRatio () const
virtual bool computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *nv) const
virtual bool computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *nv) const
virtual BoundingSphere computeBound () const
 Overrides Group's computeBound.

Protected Member Functions

virtual ~AutoTransform ()
void computeMatrix () const

Protected Attributes

Vec3 _position
Vec3 _pivotPoint
float _autoUpdateEyeMovementTolerance
AutoRotateMode _autoRotateMode
bool _autoScaleToScreen
Quat _rotation
Vec3 _scale
bool _firstTimeToInitEyePoint
osg::Vec3 _previousEyePoint
osg::Vec3 _previousLocalUp
Viewport::value_type _previousWidth
Viewport::value_type _previousHeight
osg::Matrix _previousProjection
osg::Vec3 _previousPosition
float _minimumScale
float _maximumScale
float _autoScaleTransitionWidthRatio
bool _matrixDirty
osg::Matrix _cachedMatrix

Detailed Description

AutoTransform is a derived form of Transform that automatically scales or rotates to keep its children aligned with screen coordinates.


Member Enumeration Documentation

enum osg::AutoTransform::AutoRotateMode

Enumerator:
NO_ROTATION 
ROTATE_TO_SCREEN 
ROTATE_TO_CAMERA 


Constructor & Destructor Documentation

osg::AutoTransform::AutoTransform (  ) 

osg::AutoTransform::AutoTransform ( const AutoTransform pat,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

virtual osg::AutoTransform::~AutoTransform (  )  [inline, protected, virtual]


Member Function Documentation

virtual void osg::AutoTransform::accept ( NodeVisitor nv  )  [virtual]

Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.

Reimplemented from osg::Node.

virtual const AutoTransform* osg::AutoTransform::asAutoTransform (  )  const [inline, virtual]

virtual AutoTransform* osg::AutoTransform::asAutoTransform (  )  [inline, virtual]

virtual const char* osg::AutoTransform::className (  )  const [inline, virtual]

return the name of the node's class type.

Reimplemented from osg::Node.

virtual osg::Object* osg::AutoTransform::clone ( const osg::CopyOp copyop  )  const [inline, virtual]

return a clone of a node, with Object* return type.

Reimplemented from osg::Node.

virtual osg::Object* osg::AutoTransform::cloneType (  )  const [inline, virtual]

clone an object of the same type as the node.

Reimplemented from osg::Node.

virtual BoundingSphere osg::AutoTransform::computeBound (  )  const [virtual]

Overrides Group's computeBound.

There is no need to override in subclasses from osg::Transform since this computeBound() uses the underlying matrix (calling computeMatrix if required).

Reimplemented from osg::Transform.

virtual bool osg::AutoTransform::computeLocalToWorldMatrix ( Matrix matrix,
NodeVisitor nv 
) const [virtual]

Reimplemented from osg::Transform.

void osg::AutoTransform::computeMatrix (  )  const [protected]

virtual bool osg::AutoTransform::computeWorldToLocalMatrix ( Matrix matrix,
NodeVisitor nv 
) const [virtual]

Reimplemented from osg::Transform.

AutoRotateMode osg::AutoTransform::getAutoRotateMode (  )  const [inline]

bool osg::AutoTransform::getAutoScaleToScreen (  )  const [inline]

float osg::AutoTransform::getAutoScaleTransitionWidthRatio (  )  const [inline]

float osg::AutoTransform::getAutoUpdateEyeMovementTolerance (  )  const [inline]

float osg::AutoTransform::getMaximumScale (  )  const [inline]

float osg::AutoTransform::getMinimumScale (  )  const [inline]

const Vec3& osg::AutoTransform::getPivotPoint (  )  const [inline]

const Vec3& osg::AutoTransform::getPosition (  )  const [inline]

const Quat& osg::AutoTransform::getRotation (  )  const [inline]

const Vec3& osg::AutoTransform::getScale (  )  const [inline]

virtual bool osg::AutoTransform::isSameKindAs ( const osg::Object obj  )  const [inline, virtual]

return true if this and obj are of the same kind of object.

Reimplemented from osg::Node.

virtual const char* osg::AutoTransform::libraryName (  )  const [inline, virtual]

return the name of the node's library.

Reimplemented from osg::Node.

void osg::AutoTransform::setAutoRotateMode ( AutoRotateMode  mode  )  [inline]

void osg::AutoTransform::setAutoScaleToScreen ( bool  autoScaleToScreen  )  [inline]

void osg::AutoTransform::setAutoScaleTransitionWidthRatio ( float  ratio  )  [inline]

void osg::AutoTransform::setAutoUpdateEyeMovementTolerance ( float  tolerance  )  [inline]

void osg::AutoTransform::setMaximumScale ( float  maximumScale  )  [inline]

void osg::AutoTransform::setMinimumScale ( float  minimumScale  )  [inline]

void osg::AutoTransform::setPivotPoint ( const Vec3 pivot  )  [inline]

void osg::AutoTransform::setPosition ( const Vec3 pos  )  [inline]

void osg::AutoTransform::setRotation ( const Quat quat  )  [inline]

void osg::AutoTransform::setScale ( const Vec3 scale  ) 

void osg::AutoTransform::setScale ( float  scale  )  [inline]


Member Data Documentation

AutoRotateMode osg::AutoTransform::_autoRotateMode [protected]

bool osg::AutoTransform::_autoScaleToScreen [protected]

float osg::AutoTransform::_autoScaleTransitionWidthRatio [protected]

float osg::AutoTransform::_autoUpdateEyeMovementTolerance [protected]

osg::Matrix osg::AutoTransform::_cachedMatrix [mutable, protected]

bool osg::AutoTransform::_firstTimeToInitEyePoint [mutable, protected]

bool osg::AutoTransform::_matrixDirty [mutable, protected]

float osg::AutoTransform::_maximumScale [protected]

float osg::AutoTransform::_minimumScale [protected]

Vec3 osg::AutoTransform::_pivotPoint [protected]

Vec3 osg::AutoTransform::_position [protected]

osg::Vec3 osg::AutoTransform::_previousEyePoint [mutable, protected]

Viewport::value_type osg::AutoTransform::_previousHeight [mutable, protected]

osg::Vec3 osg::AutoTransform::_previousLocalUp [mutable, protected]

osg::Vec3 osg::AutoTransform::_previousPosition [mutable, protected]

osg::Matrix osg::AutoTransform::_previousProjection [mutable, protected]

Viewport::value_type osg::AutoTransform::_previousWidth [mutable, protected]

Quat osg::AutoTransform::_rotation [mutable, protected]

Vec3 osg::AutoTransform::_scale [mutable, protected]


The documentation for this class was generated from the following file:
Generated at Tue Aug 5 20:31:53 2008 for the OpenSceneGraph by doxygen 1.4.7.