29 #ifndef __RibbonTrail_H__
30 #define __RibbonTrail_H__
82 RibbonTrail(
const String& name,
size_t maxElements = 20,
size_t numberOfChains = 1,
83 bool useTextureCoords =
true,
bool useColours =
true);
93 virtual void addNode(
Node* n);
95 virtual void removeNode(
Node* n);
99 virtual size_t getChainIndexForNode(
const Node* n);
107 virtual void setTrailLength(
Real len);
112 void setMaxChainElements(
size_t maxElements);
114 void setNumberOfChains(
size_t numChains);
116 void clearChain(
size_t chainIndex);
124 virtual void setInitialColour(
size_t chainIndex,
const ColourValue& col);
131 virtual void setInitialColour(
size_t chainIndex,
Real r,
Real g,
Real b,
Real a = 1.0);
133 virtual const ColourValue& getInitialColour(
size_t chainIndex)
const;
139 virtual void setColourChange(
size_t chainIndex,
const ColourValue& valuePerSecond);
145 virtual void setInitialWidth(
size_t chainIndex,
Real width);
147 virtual Real getInitialWidth(
size_t chainIndex)
const;
153 virtual void setWidthChange(
size_t chainIndex,
Real widthDeltaPerSecond);
155 virtual Real getWidthChange(
size_t chainIndex)
const;
161 virtual void setColourChange(
size_t chainIndex,
Real r,
Real g,
Real b,
Real a);
164 virtual const ColourValue& getColourChange(
size_t chainIndex)
const;
167 void nodeUpdated(
const Node* node);
169 void nodeDestroyed(
const Node* node);
172 virtual void _timeUpdate(
Real time);
175 const String& getMovableType(
void)
const;
214 virtual void manageController(
void);
216 virtual void updateTrail(
size_t index,
const Node* node);
218 virtual void resetTrail(
size_t index,
const Node* node);
220 virtual void resetAllTrails(
void);
236 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