29#ifndef __RibbonTrail_H__
30#define __RibbonTrail_H__
84 bool useTextureCoords =
true,
bool useVertexColours =
true);
BillboardChain(const String &name, size_t maxElements=20, size_t numberOfChains=1, bool useTextureCoords=true, bool useColours=true, bool dynamic=true)
Constructor (don't use directly, use factory)
Class representing colour.
Concrete IteratorWrapper for const access to the underlying container.
Instances of this class 'control' the value of another object in the system.
Abstract class defining a movable object in a scene.
Listener which gets called back on Node events.
Class representing a general-purpose node an articulated scene graph.
static String FACTORY_TYPE_NAME
const String & getType(void) const
Get the type of the object to be created.
MovableObject * createInstanceImpl(const String &name, const NameValuePairList *params)
Internal implementation of create method - must be overridden.
void destroyInstance(MovableObject *obj)
Destroy an instance of the object.
virtual void setTrailLength(Real len)
Set the length of the trail.
ControllerValueRealPtr mTimeControllerValue
controller value for hooking up frame time to fader
virtual Real getInitialWidth(size_t chainIndex) const
Get the starting ribbon width in world units.
ColourValueList mDeltaColour
fade amount per second
void nodeUpdated(const Node *node)
virtual void setInitialColour(size_t chainIndex, Real r, Real g, Real b, Real a=1.0)
Set the starting ribbon colour.
vector< Node * >::type NodeList
virtual void resetAllTrails(void)
Reset all tracked chains to initial state.
Real mTrailLength
Total length of trail in world units.
void nodeDestroyed(const Node *node)
vector< Real >::type RealList
void clearChain(size_t chainIndex)
Remove all elements of a given chain (but leave the chain intact).
virtual const ColourValue & getColourChange(size_t chainIndex) const
Get the per-second fading amount.
vector< size_t >::type IndexVector
Mapping of nodes to chain segments.
void setMaxChainElements(size_t maxElements)
Set the maximum number of chain elements per chain.
virtual const ColourValue & getInitialColour(size_t chainIndex) const
Get the starting ribbon colour.
RealList mDeltaWidth
Delta width of the ribbon.
RibbonTrail(const String &name, size_t maxElements=20, size_t numberOfChains=1, bool useTextureCoords=true, bool useVertexColours=true)
Constructor (don't use directly, use factory)
virtual Real getTrailLength(void) const
Get the length of the trail.
virtual void setWidthChange(size_t chainIndex, Real widthDeltaPerSecond)
Set the change in ribbon width per second.
ColourValueList mInitialColour
Initial colour of the ribbon.
NodeToChainSegmentMap mNodeToSegMap
virtual ~RibbonTrail()
destructor
const String & getMovableType(void) const
Overridden from MovableObject.
virtual void updateTrail(size_t index, const Node *node)
Node has changed position, update.
virtual void setInitialWidth(size_t chainIndex, Real width)
Set the starting ribbon width in world units.
virtual size_t getChainIndexForNode(const Node *n)
Get the chain index for a given Node being tracked.
virtual void removeNode(Node *n)
Remove tracking on a given node.
Controller< Real > * mFadeController
controller used to hook up frame time to fader
virtual NodeIterator getNodeIterator(void) const
Get an iterator over the nodes which are being tracked.
virtual void setColourChange(size_t chainIndex, const ColourValue &valuePerSecond)
Enables / disables fading the trail using colour.
virtual void setColourChange(size_t chainIndex, Real r, Real g, Real b, Real a)
Enables / disables fading the trail using colour.
vector< ColourValue >::type ColourValueList
ConstVectorIterator< NodeList > NodeIterator
virtual void manageController(void)
Manage updates to the time controller.
virtual void _timeUpdate(Real time)
Perform any fading / width delta required; internal method.
virtual void addNode(Node *n)
Add a node to be tracked.
void setNumberOfChains(size_t numChains)
Set the number of chain segments (this class can render multiple chains at once using the same materi...
Real mElemLength
length of each element
virtual void setInitialColour(size_t chainIndex, const ColourValue &col)
Set the starting ribbon colour for a given segment.
RealList mInitialWidth
Initial width of the ribbon.
map< constNode *, size_t >::type NodeToChainSegmentMap
virtual void resetTrail(size_t index, const Node *node)
Reset the tracked chain to initial state.
IndexVector mNodeToChainSegment
Ordered like mNodeList, contains chain index.
NodeList mNodeList
List of nodes being trailed.
Real mSquaredElemLength
Squared length of each element.
virtual Real getWidthChange(size_t chainIndex) const
Get the change in ribbon width per second.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
SharedPtr< ControllerValue< Real > > ControllerValueRealPtr
float Real
Software floating point type.
std::map< K, V, P, A > type