![]() |
VR-Forces 4.0.4 Class Documentation
|
OpenSceneGraph implementation of a textured ribbon Used to draw effects like tread tracks that follow a scene object Procedurally generated as its position in the scene changes. More...

Public Member Functions | |
| DtOsgDecalRibbon (float segmentSpacing, const osg::Vec4 &color, osg::Texture *tex, float maxLength=2000) | |
| CTOR. | |
| virtual void | setTextureRepeat (float textureRepeat) |
| Set the number of copies of the texture to repeat into each quad. | |
Protected Member Functions | |
| virtual | ~DtOsgDecalRibbon () |
| DTOR. | |
| virtual void | addParticle (const osg::Vec3d &left, const osg::Vec3d &right, double simTime) |
| Add a particle to the ribbon. | |
| virtual float | currentSegmentLength () |
| Find the length of the current ribbon segment. | |
| virtual void | extendCurrentSegment (osg::Vec3d const &left, osg::Vec3d const &right, double simTime) |
| Extend the current segment to left and right points. | |
| virtual osg::Drawable * | getDrawable () |
| Create or get the ribbon drawable. | |
| virtual int | particleIndexAtOffset (int offset) |
| Get index of particle at offset from current particle. | |
| virtual void | rotateDrawableIndices (int amount) |
| Rotate the drawable primitives' indices by amount. | |
| virtual osg::Vec2 | getTextureCoordinateFor (int pointIndex, float vScale) |
| Get the texture coordinate for a vertex. | |
| virtual osg::Geode * | createGeode () |
| Create the geode. | |
Private Attributes | |
| osg::ref_ptr< osg::Vec3Array > | myPoints |
| osg::ref_ptr< osg::Vec2Array > | myTextureCoordinates |
| osg::ref_ptr < osg::DrawElementsUInt > | myRibbon |
| osg::ref_ptr< osg::Geometry > | myGeometry |
| osg::ref_ptr< osg::Texture > | myTexture |
| bool | myWrappingVertices |
| std::string | myTextureFilename |
| int | myParticleIndex |
| float | myTextureRepeat |
OpenSceneGraph implementation of a textured ribbon Used to draw effects like tread tracks that follow a scene object Procedurally generated as its position in the scene changes.
| makVrv::DtOsgDecalRibbon::DtOsgDecalRibbon | ( | float | segmentSpacing, |
| const osg::Vec4 & | color, | ||
| osg::Texture * | tex, | ||
| float | maxLength = 2000 |
||
| ) |
CTOR.
| virtual makVrv::DtOsgDecalRibbon::~DtOsgDecalRibbon | ( | ) | [protected, virtual] |
DTOR.
| virtual void makVrv::DtOsgDecalRibbon::setTextureRepeat | ( | float | textureRepeat | ) | [virtual] |
Set the number of copies of the texture to repeat into each quad.
Textures are tiled in their v coordinate only.
| virtual void makVrv::DtOsgDecalRibbon::addParticle | ( | const osg::Vec3d & | left, |
| const osg::Vec3d & | right, | ||
| double | simTime | ||
| ) | [protected, virtual] |
Add a particle to the ribbon.
Implements makVrv::DtOsgRibbon.
| virtual float makVrv::DtOsgDecalRibbon::currentSegmentLength | ( | ) | [protected, virtual] |
Find the length of the current ribbon segment.
Implements makVrv::DtOsgRibbon.
| virtual void makVrv::DtOsgDecalRibbon::extendCurrentSegment | ( | osg::Vec3d const & | left, |
| osg::Vec3d const & | right, | ||
| double | simTime | ||
| ) | [protected, virtual] |
Extend the current segment to left and right points.
Implements makVrv::DtOsgRibbon.
| virtual osg::Drawable* makVrv::DtOsgDecalRibbon::getDrawable | ( | ) | [protected, virtual] |
Create or get the ribbon drawable.
Implements makVrv::DtOsgRibbon.
| virtual int makVrv::DtOsgDecalRibbon::particleIndexAtOffset | ( | int | offset | ) | [protected, virtual] |
Get index of particle at offset from current particle.
| virtual void makVrv::DtOsgDecalRibbon::rotateDrawableIndices | ( | int | amount | ) | [protected, virtual] |
Rotate the drawable primitives' indices by amount.
| virtual osg::Vec2 makVrv::DtOsgDecalRibbon::getTextureCoordinateFor | ( | int | pointIndex, |
| float | vScale | ||
| ) | [protected, virtual] |
Get the texture coordinate for a vertex.
| virtual osg::Geode* makVrv::DtOsgDecalRibbon::createGeode | ( | ) | [protected, virtual] |
Create the geode.
Reimplemented from makVrv::DtOsgRibbon.
osg::ref_ptr<osg::Vec3Array> makVrv::DtOsgDecalRibbon::myPoints [private] |
osg::ref_ptr<osg::Vec2Array> makVrv::DtOsgDecalRibbon::myTextureCoordinates [private] |
osg::ref_ptr<osg::DrawElementsUInt> makVrv::DtOsgDecalRibbon::myRibbon [private] |
osg::ref_ptr<osg::Geometry> makVrv::DtOsgDecalRibbon::myGeometry [private] |
osg::ref_ptr<osg::Texture> makVrv::DtOsgDecalRibbon::myTexture [private] |
std::string makVrv::DtOsgDecalRibbon::myTextureFilename [private] |
int makVrv::DtOsgDecalRibbon::myParticleIndex [private] |
float makVrv::DtOsgDecalRibbon::myTextureRepeat [private] |