IMS2  Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
AnimationStartedEvent Class Reference

Notifies that an animation has been started. More...

Inheritance diagram for AnimationStartedEvent:
AnimationEvent_Base Event_Base

Public Member Functions

 AnimationStartedEvent (string animationid, double _speed)
 
double GetSpeed ()
 
- Public Member Functions inherited from AnimationEvent_Base
 AnimationEvent_Base (EVENTTYPE type, string animationid, int _delay)
 
string GetAnimationId ()
 
virtual bool operator== (Event_Base *e)
 
- Public Member Functions inherited from Event_Base
 Event_Base (EVENTTYPE _type, unsigned int _delay=0)
 
EventHandlerGetCaller ()
 Returns the EventHandler at which this event originated.
 
virtual bool operator!= (Event_Base *e)
 
virtual bool operator== (EVENTTYPE type)
 Allows to compare an event directly to an EVENTTYPE. More...
 
EVENTPIPE GetEventPipe ()
 

Protected Attributes

double speed
 An abstract property for how fast the animation should play, and in which direction. More...
 
- Protected Attributes inherited from AnimationEvent_Base
string animid
 Stores the identifier of the animation this event is aimed at.
 
- Protected Attributes inherited from Event_Base
unsigned int delay
 How many calls of ProcessEvents() on the event generator the event should be delayed.
 
EventHandlercaller
 Stores the EventHandler at which the event originated.
 
EVENTTYPE eventtype
 The type of this event.
 
EVENTPIPE pipe
 The pipe the event travels in (unless it was relayed). This is set by the EventHandler itself.
 

Additional Inherited Members

- Protected Member Functions inherited from Event_Base
virtual bool sendMe ()
 Used to determine whether the event should be sent by the event generator. More...
 

Detailed Description

Notifies that an animation has been started.

Not to be confused with StartAnimationEvent, which notifies that an animation SHOULD be started. In fact, this event is the nominal response to StartAnimationEvent Triggered Once on start by IMS_Animation_Base If the animation is for some reason unable to start, it will trigger an AnimationFailedEvent instead

See also
AnimationFailedEvent
EventHandler.h

Constructor & Destructor Documentation

AnimationStartedEvent::AnimationStartedEvent ( string  animationid,
double  _speed 
)
inline
Parameters
animationidIdentifier of the animation triggering the event
_speedstarting speed of the animation triggering the event

Member Function Documentation

double AnimationStartedEvent::GetSpeed ( )
inline
Returns
The speed and direction the animation started with

Member Data Documentation

double AnimationStartedEvent::speed
protected

An abstract property for how fast the animation should play, and in which direction.

The value determines how fast in relation to the defined duration of the animation in the config file (1 == the exact duration) The sign determines the direction (> 0: normal, < 0 : in reverse). For 0, see note

Note
A speed of 0 does not mean stop! A speed of 0 means default speed (1) forward by default, except if the animation is already at the end, then it means in reverse. Basically, it means "start the animation in the most likely direction at tis default speed"

The documentation for this class was generated from the following file: