29 #ifndef __RibbonTrail_H__
30 #define __RibbonTrail_H__
83 RibbonTrail(
const String& name,
size_t maxElements = 20,
size_t numberOfChains = 1,
84 bool useTextureCoords =
true,
bool useVertexColours =
true);
94 virtual void addNode(
Node* n);
96 virtual void removeNode(
Node* n);
100 virtual size_t getChainIndexForNode(
const Node* n);
108 virtual void setTrailLength(
Real len);
113 void setMaxChainElements(
size_t maxElements);
115 void setNumberOfChains(
size_t numChains);
117 void clearChain(
size_t chainIndex);
125 virtual void setInitialColour(
size_t chainIndex,
const ColourValue& col);
132 virtual void setInitialColour(
size_t chainIndex,
Real r,
Real g,
Real b,
Real a = 1.0);
134 virtual const ColourValue& getInitialColour(
size_t chainIndex)
const;
140 virtual void setColourChange(
size_t chainIndex,
const ColourValue& valuePerSecond);
146 virtual void setInitialWidth(
size_t chainIndex,
Real width);
148 virtual Real getInitialWidth(
size_t chainIndex)
const;
154 virtual void setWidthChange(
size_t chainIndex,
Real widthDeltaPerSecond);
156 virtual Real getWidthChange(
size_t chainIndex)
const;
162 virtual void setColourChange(
size_t chainIndex,
Real r,
Real g,
Real b,
Real a);
165 virtual const ColourValue& getColourChange(
size_t chainIndex)
const;
168 void nodeUpdated(
const Node* node);
170 void nodeDestroyed(
const Node* node);
173 virtual void _timeUpdate(
Real time);
176 const String& getMovableType(
void)
const;
215 virtual void manageController(
void);
217 virtual void updateTrail(
size_t index,
const Node* node);
219 virtual void resetTrail(
size_t index,
const Node* node);
221 virtual void resetAllTrails(
void);
237 const String& getType(
void)
const;
Factory object for creating RibbonTrail instances.
float Real
Software floating point type.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
ColourValueList mDeltaColour
fade amount per second
Class representing colour.
RealList mInitialWidth
Initial width of the ribbon.
Real mSquaredElemLength
Squared length of each element.
Controller< Real > * mFadeController
controller used to hook up frame time to fader
virtual Real getTrailLength(void) const
Get the length of the trail.
Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing.
Abstract class defining a movable object in a scene.
Allows the rendering of a chain of connected billboards.
vector< ColourValue >::type ColourValueList
NodeList mNodeList
List of nodes being trailed.
vector< size_t >::type IndexVector
Mapping of nodes to chain segments.
Concrete IteratorWrapper for const access to the underlying container.
Subclass of BillboardChain which automatically leaves a trail behind one or more Node instances...
Real mElemLength
length of each element
vector< Node * >::type NodeList
static String FACTORY_TYPE_NAME
map< const Node *, size_t >::type NodeToChainSegmentMap
ColourValueList mInitialColour
Initial colour of the ribbon.
RealList mDeltaWidth
Delta width of the ribbon.
NodeToChainSegmentMap mNodeToSegMap
vector< Real >::type RealList
IndexVector mNodeToChainSegment
Ordered like mNodeList, contains chain index.
Real mTrailLength
Total length of trail in world units.
Class representing a general-purpose node an articulated scene graph.
ControllerValueRealPtr mTimeControllerValue
controller value for hooking up frame time to fader
Listener which gets called back on Node events.
ConstVectorIterator< NodeList > NodeIterator