|
IMS2
Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
|
Implementation of a continuous animation. More...
Public Member Functions | |
| IMS_Animation_Continuous (ANIMATIONDATA *_data) | |
| virtual AnimationEvent_Base * | PropagateAnimation (double simdt) |
| propagates the animation and returns an AnimationFinishedEvent if the animation stoped. More... | |
| virtual void | StopAnimation () |
| Stops the animation. More... | |
| virtual void | InitStateFromScenario (vector< string > &line) |
| Initialises the animation state from a scenario line. More... | |
| virtual string | GetScenarioLine () |
Public Member Functions inherited from IMS_Animation_Base | |
| IMS_Animation_Base (ANIMATIONDATA *_data) | |
| virtual void | AddAnimationToVessel (IMS2 *_vessel, int _meshindex, MATRIX3 moduleorientation, VECTOR3 modulelocalpos) |
| Adds the animation to the vessel using the orbiter API. More... | |
| virtual void | RemoveAnimationFromVessel () |
| Removes the animation from the vessel. More... | |
| virtual AnimationEvent_Base * | StartAnimation (StartAnimationEvent *startevent) |
| Starts the animation. More... | |
| virtual void | ModifyAnimation (ModifyAnimationEvent *modifyevent) |
| Modifies an animation, usually its speed and direction. More... | |
| bool | IsRunning () |
| virtual void | DisableAnimation () |
| Disables updating of the animation state in orbiter. More... | |
| virtual void | EnableAnimation () |
| Enables updating of the animation state in orbiter. More... | |
| double | GetState () |
| void | GetDependencies (vector< ANIMATIONDEPENDENCY > &OUT_dependencies) |
| Fills the passed reference with the dependencies of this animation. | |
Private Attributes | |
| bool | stopmenexttime = false |
| Indicates whether the animation needs to stop when it reaches 0.0 the next time. | |
Additional Inherited Members | |
Protected Member Functions inherited from IMS_Animation_Base | |
| MGROUP_ROTATE * | createRotationComponent (ANIMCOMPONENTDATA *comp, VECTOR3 modulelocalpos, MATRIX3 moduleorientation) |
| Creates a rotation animation component that can be added to the animation on the vessel. More... | |
| MGROUP_TRANSLATE * | createTranslationComponent (ANIMCOMPONENTDATA *comp, VECTOR3 modulelocalpos, MATRIX3 moduleorientation) |
| Creates a translation animation component that can be added to the animation on the vessel. More... | |
| MGROUP_SCALE * | createScaleComponent (ANIMCOMPONENTDATA *comp, VECTOR3 modulelocalpos, MATRIX3 moduleorientation) |
| Creates a scale animation component that can be added to the animation on the vessel. More... | |
Protected Attributes inherited from IMS_Animation_Base | |
| IMS2 * | vessel |
| The vessel this animation is currently a part of. | |
| ANIMATIONDATA * | data |
| Pointer to the data defining this animation. | |
| double | speed = 0.0 |
| The current speed/direction of the animation. | |
| int | orbiterid |
| The orbiter-generated identifier for this animation. | |
| double | state = 0.0 |
| The current state of the animation (>= 0.0 <= 1.0) | |
| int | meshindex = 0 |
| The orbiter generated index of the mesh this animation acts on. | |
| double | maxspeed = 1e12 |
| The maximum speed the animation can have. Effects not yet implemented. | |
| vector< UINT * > | animationgroups |
| List meshgroup indices this animation acts on. | |
| vector< ANIMATIONCOMPONENT_HANDLE > | animationcomponents |
| List of orbiter-internal components this animation consists of. | |
| bool | enabled = false |
| An animation is disabled when the vessel visual doesn't exist. state still gets propagated, but the animation state on the vessel doesn't get updated. | |
Implementation of a continuous animation.
A continuous animation will loop back to state 0.0 once itreaches state 1.0. In case it gets a StopAnimationEvent, it will finish the current cycle to 1.0, loop back to 0.0 and stop in its original position.
| IMS_Animation_Continuous::IMS_Animation_Continuous | ( | ANIMATIONDATA * | _data | ) |
| _data | Pointer to the data defining this animation |
|
virtual |
Reimplemented from IMS_Animation_Base.
|
virtual |
Initialises the animation state from a scenario line.
| line | A list of strings, representing the scenario line cut by " " |
Reimplemented from IMS_Animation_Base.
|
virtual |
propagates the animation and returns an AnimationFinishedEvent if the animation stoped.
propagation behavior has to be implemented by child classes.
| simdt | The time elapsed since the last frame |
Implements IMS_Animation_Base.
|
virtual |
Stops the animation.
Reimplemented from IMS_Animation_Base.