OpenFrames
Public Member Functions | Protected Attributes | List of all members
OpenFrames::Vector Class Reference

This class defines an actual drawable Vector of variable geometry. More...

#include <Vector.hpp>

Inheritance diagram for OpenFrames::Vector:

Public Member Functions

 Vector (const osg::Vec3d &vec)
 
void setLength (const double &body, const double &head)
 
void getLength (double &body, double &head) const
 
double getTotalLength () const
 
void setRadius (const double &body, const double &head)
 
void getRadius (double &body, double &head) const
 
void setBasePosition (const osg::Vec3d &b)
 
const osg::Vec3d & getBasePosition () const
 
void setDirection (const osg::Vec3d &d)
 
const osg::Vec3d & getDirection () const
 
osg::ShapeDrawable * getVector () const
 
void reposition ()
 

Protected Attributes

osg::ref_ptr< osg::Cylinder > _body
 
osg::ref_ptr< osg::Cone > _head
 
osg::ref_ptr< osg::ShapeDrawable > _vec
 
osg::Vec3d _basepos
 
osg::Vec3d _dir
 

Detailed Description

This class defines an actual drawable Vector of variable geometry.

This class computes the transformation of a ReferenceFrame with respect to any of its ancestor frames. To use, just specify the root frame and the target frame then call the getLocalToWorld() or getWorldToLocal() method. The accumulated transform between root & target frames is returned.

Member Function Documentation

◆ getVector()

osg::ShapeDrawable* OpenFrames::Vector::getVector ( ) const
inline

Get the actual OSG ShapeDrawable (a Drawable) for the vector

◆ setBasePosition()

void OpenFrames::Vector::setBasePosition ( const osg::Vec3d &  b)

Set/get the starting (base) position of the vector

◆ setDirection()

void OpenFrames::Vector::setDirection ( const osg::Vec3d &  d)

Set/get the direction that the vector points towards

◆ setLength()

void OpenFrames::Vector::setLength ( const double &  body,
const double &  head 
)

Set/get the length of the vector body and head

◆ setRadius()

void OpenFrames::Vector::setRadius ( const double &  body,
const double &  head 
)

Set/get the radius of the vector body and head


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