OpenFrames
|
This class defines an actual drawable Vector of variable geometry. More...
#include <Vector.hpp>
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 |
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.
|
inline |
Get the actual OSG ShapeDrawable (a Drawable) for the vector
void OpenFrames::Vector::setBasePosition | ( | const osg::Vec3d & | b | ) |
Set/get the starting (base) position of the vector
void OpenFrames::Vector::setDirection | ( | const osg::Vec3d & | d | ) |
Set/get the direction that the vector points towards
void OpenFrames::Vector::setLength | ( | const double & | body, |
const double & | head | ||
) |
Set/get the length of the vector body and head
void OpenFrames::Vector::setRadius | ( | const double & | body, |
const double & | head | ||
) |
Set/get the radius of the vector body and head