Base class for OSG ribbon implementations.
More...
Public Member Functions |
| | DtOsgRibbon (DtDe &de, float segmentSpacing=1.0, const osg::Vec4 &color=osg::Vec4d(0.5, 0.5, 0.5, 1.0), float maxLength=2000) |
| | CTOR.
|
| virtual | ~DtOsgRibbon () |
| | DTOR.
|
| virtual void | traverse (osg::NodeVisitor &nv) |
| | Interrupt CullVisitors by updating the ribbon.
|
| virtual osg::Node * | node () |
| | Get the osg geometry node associated with the ribbon.
|
| virtual void | setColor (const osg::Vec4 &color) |
| | Set the ribbon's color.
|
| const osg::Vec4 & | color () const |
| | Get the ribbon's color.
|
| virtual void | setDroppedPoints (const osg::Vec3d &pointA, const osg::Vec3d &pointB) |
| | Set the points to drop in local coordinates.
|
| virtual void | update (double dt, double simTime) |
| | Update the ribbon with the current position.
|
| virtual void | update () |
| | Optional time independent update method.
|
| virtual void | setMaxSegments (long segments) |
| | Sets the maximum number of segments allowed in the ribbon.
|
| long | maxSegments () const |
| | Gets the maximum number of segments allowed in the ribbon.
|
| virtual void | setSegmentSpacing (float spacing) |
| | Sets the maximum length of ribbon segments.
|
| float | segmentSpacing () const |
| | Gets the maximum length of the ribbon segments.
|
| virtual void | setStippled (bool stippled) |
| bool | isStippled () const |
| | Get the stipple setting for this ribbon.
|
| virtual void | setLightingEnabled (bool enable) |
| | set to true the lighting enabled flag to turn lighting on for the ribbon
|
| virtual bool | lightingEnabled () |
| | get the lighting enabled flag
|
Protected Member Functions |
| virtual void | addParticle (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| | Add a particle to the ribbon.
|
| virtual float | currentSegmentLength ()=0 |
| | Find the length of the current ribbon segment.
|
| virtual void | extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime)=0 |
| | Extend the current segment to left and right points.
|
| virtual osg::Drawable * | getDrawable ()=0 |
| | Get the drawable responsible for drawing the ribbon.
|
| virtual osg::Geode * | createGeode () |
| | Create function for creating the geode for drawing this ribbon.
|
| virtual void | setDrawable () |
| | Removes any existing drawables and add the drawable returned from getDrawable.
|
Detailed Description
Base class for OSG ribbon implementations.
Constructor & Destructor Documentation
| makVrv::DtOsgRibbon::DtOsgRibbon |
( |
DtDe & |
de, |
|
|
float |
segmentSpacing = 1.0, |
|
|
const osg::Vec4 & |
color = osg::Vec4d(0.5, 0.5, 0.5, 1.0), |
|
|
float |
maxLength = 2000 |
|
) |
| |
CTOR.
- Parameters
-
| segmentSpacing | the distance between samples points (in meters). |
| color | the color of the ribbon. |
| maxLength | the max length of the ribbon (in samples). |
| virtual makVrv::DtOsgRibbon::~DtOsgRibbon |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual void makVrv::DtOsgRibbon::traverse |
( |
osg::NodeVisitor & |
nv | ) |
|
|
virtual |
| virtual osg::Node* makVrv::DtOsgRibbon::node |
( |
| ) |
|
|
virtual |
| virtual void makVrv::DtOsgRibbon::setColor |
( |
const osg::Vec4 & |
color | ) |
|
|
virtual |
| const osg::Vec4& makVrv::DtOsgRibbon::color |
( |
void |
| ) |
const |
|
inline |
| virtual void makVrv::DtOsgRibbon::setDroppedPoints |
( |
const osg::Vec3d & |
pointA, |
|
|
const osg::Vec3d & |
pointB |
|
) |
| |
|
virtual |
Set the points to drop in local coordinates.
| virtual void makVrv::DtOsgRibbon::update |
( |
double |
dt, |
|
|
double |
simTime |
|
) |
| |
|
virtual |
| virtual void makVrv::DtOsgRibbon::update |
( |
| ) |
|
|
inlinevirtual |
| virtual void makVrv::DtOsgRibbon::setMaxSegments |
( |
long |
segments | ) |
|
|
virtual |
| long makVrv::DtOsgRibbon::maxSegments |
( |
| ) |
const |
|
inline |
Gets the maximum number of segments allowed in the ribbon.
| virtual void makVrv::DtOsgRibbon::setSegmentSpacing |
( |
float |
spacing | ) |
|
|
virtual |
Sets the maximum length of ribbon segments.
| float makVrv::DtOsgRibbon::segmentSpacing |
( |
| ) |
const |
|
inline |
Gets the maximum length of the ribbon segments.
| virtual void makVrv::DtOsgRibbon::setStippled |
( |
bool |
stippled | ) |
|
|
virtual |
- Parameters
-
| [in] | stippled | is a flag to use a stipple pattern instead of alpha blending. When true, the ribbon is considered opaque and the stipple pattern allows see through. When false, the ribbon is considered transparent and alpha blending allows see through. |
| bool makVrv::DtOsgRibbon::isStippled |
( |
| ) |
const |
|
inline |
Get the stipple setting for this ribbon.
- Return values
-
| true | if stippled. |
| false | otherwise. |
- See Also
- setStippled(bool)
| virtual void makVrv::DtOsgRibbon::setLightingEnabled |
( |
bool |
enable | ) |
|
|
virtual |
set to true the lighting enabled flag to turn lighting on for the ribbon
| virtual bool makVrv::DtOsgRibbon::lightingEnabled |
( |
| ) |
|
|
virtual |
get the lighting enabled flag
| virtual void makVrv::DtOsgRibbon::addParticle |
( |
osg::Vec3d const & |
left, |
|
|
osg::Vec3d const & |
right, |
|
|
double |
simTime |
|
) |
| |
|
protectedpure virtual |
| virtual float makVrv::DtOsgRibbon::currentSegmentLength |
( |
| ) |
|
|
protectedpure virtual |
| virtual void makVrv::DtOsgRibbon::extendCurrentSegment |
( |
osg::Vec3d const & |
left, |
|
|
osg::Vec3d const & |
right, |
|
|
double |
simTime |
|
) |
| |
|
protectedpure virtual |
| virtual osg::Drawable* makVrv::DtOsgRibbon::getDrawable |
( |
| ) |
|
|
protectedpure virtual |
| virtual osg::Geode* makVrv::DtOsgRibbon::createGeode |
( |
| ) |
|
|
protectedvirtual |
| virtual void makVrv::DtOsgRibbon::setDrawable |
( |
| ) |
|
|
protectedvirtual |
Removes any existing drawables and add the drawable returned from getDrawable.
Member Data Documentation
| osg::ref_ptr<osg::MatrixTransform> makVrv::DtOsgRibbon::myPositionNode |
|
private |
| osg::ref_ptr<osg::Geode> makVrv::DtOsgRibbon::myGeode |
|
private |
| osg::Matrixd makVrv::DtOsgRibbon::myWorldTransformInv |
|
private |
| osg::Matrixd makVrv::DtOsgRibbon::myLastLocalToWork |
|
private |
| int makVrv::DtOsgRibbon::myLastUpdatedFrame |
|
private |
| double makVrv::DtOsgRibbon::myLastUpdateTime |
|
private |
| long makVrv::DtOsgRibbon::myMaxSegments |
|
private |
| float makVrv::DtOsgRibbon::mySegmentSpacingSquared |
|
private |
| float makVrv::DtOsgRibbon::mySegmentSpacing |
|
private |
| osg::Vec3d makVrv::DtOsgRibbon::myLocalPointA |
|
private |
| osg::Vec3d makVrv::DtOsgRibbon::myLocalPointB |
|
private |
| osg::Vec4 makVrv::DtOsgRibbon::myColor |
|
private |
| bool makVrv::DtOsgRibbon::myFirstUpdate |
|
private |
| bool makVrv::DtOsgRibbon::myStippled |
|
private |
| DtDe& makVrv::DtOsgRibbon::myDe |
|
private |
| bool makVrv::DtOsgRibbon::myLightingEnabled |
|
private |
| bool makVrv::DtOsgRibbon::myShaderSet |
|
private |
The documentation for this class was generated from the following file:
- /exports/nfedora7-1/nightly/docs/vrforcesDevelopment.vrf4-6-branch/include/vrvOsg/DtOsgRibbon.h