Open 3D Engine EMotionFX Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <EventHandler.h>
Inherited by EMStudio::AnimGraphEventHandler, EMStudio::NodePaletteWidget::EventHandler, and EMotionFX::MotionLinkCache.
Public Member Functions | |
virtual void | OnEvent (const EventInfo &eventInfo) |
virtual const AZStd::vector< EventTypes > | GetHandledEventTypes () const =0 |
virtual void | OnPlayMotion (Motion *motion, PlayBackInfo *info) |
virtual void | OnStartMotionInstance (MotionInstance *motionInstance, PlayBackInfo *info) |
virtual void | OnDeleteMotionInstance (MotionInstance *motionInstance) |
virtual void | OnDeleteMotion (Motion *motion) |
virtual void | OnStop (MotionInstance *motionInstance) |
virtual void | OnHasLooped (MotionInstance *motionInstance) |
virtual void | OnHasReachedMaxNumLoops (MotionInstance *motionInstance) |
virtual void | OnHasReachedMaxPlayTime (MotionInstance *motionInstance) |
virtual void | OnIsFrozenAtLastFrame (MotionInstance *motionInstance) |
virtual void | OnChangedPauseState (MotionInstance *motionInstance) |
virtual void | OnChangedActiveState (MotionInstance *motionInstance) |
virtual void | OnStartBlending (MotionInstance *motionInstance) |
virtual void | OnStopBlending (MotionInstance *motionInstance) |
virtual void | OnQueueMotionInstance (MotionInstance *motionInstance, PlayBackInfo *info) |
virtual void | OnDeleteActor (Actor *actor) |
virtual void | OnSimulatePhysics (float timeDelta) |
virtual void | OnCustomEvent (uint32 eventType, void *data) |
virtual void | OnDrawTriangle (const AZ::Vector3 &posA, const AZ::Vector3 &posB, const AZ::Vector3 &posC, const AZ::Vector3 &normalA, const AZ::Vector3 &normalB, const AZ::Vector3 &normalC, uint32 color) |
virtual void | OnDrawTriangles () |
virtual void | OnCreateAnimGraph (AnimGraph *animGraph) |
virtual void | OnCreateAnimGraphInstance (AnimGraphInstance *animGraphInstance) |
virtual void | OnCreateMotion (Motion *motion) |
virtual void | OnCreateMotionSet (MotionSet *motionSet) |
virtual void | OnCreateMotionInstance (MotionInstance *motionInstance) |
virtual void | OnCreateMotionSystem (MotionSystem *motionSystem) |
virtual void | OnCreateActor (Actor *actor) |
virtual void | OnPostCreateActor (Actor *actor) |
virtual void | OnDeleteAnimGraph (AnimGraph *animGraph) |
virtual void | OnDeleteAnimGraphInstance (AnimGraphInstance *animGraphInstance) |
virtual void | OnDeleteMotionSet (MotionSet *motionSet) |
virtual void | OnDeleteMotionSystem (MotionSystem *motionSystem) |
virtual bool | OnRayIntersectionTest (const AZ::Vector3 &start, const AZ::Vector3 &end, IntersectionInfo *outIntersectInfo) |
virtual void | OnStateEnter (AnimGraphInstance *animGraphInstance, AnimGraphNode *state) |
virtual void | OnStateEntering (AnimGraphInstance *animGraphInstance, AnimGraphNode *state) |
virtual void | OnStateExit (AnimGraphInstance *animGraphInstance, AnimGraphNode *state) |
virtual void | OnStateEnd (AnimGraphInstance *animGraphInstance, AnimGraphNode *state) |
virtual void | OnStartTransition (AnimGraphInstance *animGraphInstance, AnimGraphStateTransition *transition) |
virtual void | OnEndTransition (AnimGraphInstance *animGraphInstance, AnimGraphStateTransition *transition) |
virtual void | OnSetVisualManipulatorOffset (AnimGraphInstance *animGraphInstance, size_t paramIndex, const AZ::Vector3 &offset) |
virtual void | OnInputPortsChanged (AnimGraphNode *node, const AZStd::vector< AZStd::string > &newInputPorts, const AZStd::string &memberName, const AZStd::vector< AZStd::string > &memberValue) |
virtual void | OnOutputPortsChanged (AnimGraphNode *node, const AZStd::vector< AZStd::string > &newOutputPorts, const AZStd::string &memberName, const AZStd::vector< AZStd::string > &memberValue) |
virtual void | OnRenamedNode (AnimGraph *animGraph, AnimGraphNode *node, const AZStd::string &oldName) |
virtual void | OnCreatedNode (AnimGraph *animGraph, AnimGraphNode *node) |
virtual void | OnRemoveNode (AnimGraph *animGraph, AnimGraphNode *nodeToRemove) |
virtual void | OnRemovedChildNode (AnimGraph *animGraph, AnimGraphNode *parentNode) |
virtual void | OnProgressStart () |
virtual void | OnProgressEnd () |
virtual void | OnProgressText (const char *text) |
virtual void | OnProgressValue (float percentage) |
virtual void | OnSubProgressText (const char *text) |
virtual void | OnSubProgressValue (float percentage) |
virtual void | OnScaleActorData (Actor *actor, float scaleFactor) |
virtual void | OnScaleMotionData (Motion *motion, float scaleFactor) |
The event handler, which is responsible for processing the events. This class contains several methods which you can overload to perform custom things event comes up. You can inherit your own event handler from this base class and add it to the event manager using EMFX_EVENTMGR.AddEventHandler(...) method to make it use your custom event handler. Every event your derived class handles has to be returned by the GetHandledEventTypes method. This helps filtering the event dispatching to only the handlers that are interested about such event.
|
pure virtual |
Event handlers need to overload this function and return the list of events they are interested about
Implemented in EMStudio::NodePaletteWidget::EventHandler, and EMStudio::AnimGraphEventHandler.
|
inlinevirtual |
This event gets triggered once the motion active state changes. For example when the motion is active but gets set to inactive using the MotionInstance::SetActive(...) method, then this even twill be triggered. Inactive motions don't get processed at all. They will not update their playback times, blending, nor will they take part in any blending calculations of the final node transforms. In other words, it will just be like the motion instance does not exist at all.
motionInstance | The motion instance that changed its active state. |
|
inlinevirtual |
This event gets triggered once the motion pause state changes. For example when the motion is unpaused but gets paused, then this even twill be triggered. Paused motions don't get their playback times updated. They do however still perform blending, so it is still possible to fade them in or out.
motionInstance | The motion instance that changed its paused state. |
|
inlinevirtual |
The event that gets triggered once an Actor object is being deleted. You could for example use this event to delete any allocations you have done inside the custom user data object linked with the Actor object. You can get and set this data object with the Actor::GetCustomData() and Actor::SetCustomData(...) methods.
actor | The actor that is being deleted. |
|
inlinevirtual |
The event that gets triggered once a Motion object is being deleted. You could for example use this event to delete any allocations you have done inside the custom user data object linked with the Motion object. You can get and set this data object with the Motion::GetCustomData() and Motion::SetCustomData(...) methods.
motion | The motion that is being deleted. |
|
inlinevirtual |
The event that gets triggered once a MotionInstance object is being deleted. This can happen when calling the MotionSystem::RemoveMotionInstance() method manually, or when EMotion FX internally removes the motion instance because it has no visual influence anymore. The destructor of the MotionInstance class automatically triggers this event.
motionInstance | The motion instance that is being deleted. |
|
inlinevirtual |
The main method that processes a event.
eventInfo | The struct holding the information about the triggered event. |
|
inlinevirtual |
This event gets triggered once a given motion instance has looped.
motionInstance | The motion instance that got looped. |
|
inlinevirtual |
This event gets triggered once a given motion instance has reached its maximum number of allowed loops. In this case the motion instance will also be stopped automatically afterwards.
motionInstance | The motion instance that reached its maximum number of allowed loops. |
|
inlinevirtual |
This event gets triggered once a given motion instance has reached its maximum playback time. For example if this motion instance is only allowed to play for 2 seconds, and the total playback time reaches two seconds, then this event will be triggered.
motionInstance | The motion instance that reached its maximum playback time. |
|
inlinevirtual |
This event gets triggered once the motion instance is set to freeze at the last frame once the motion reached its end (when it reached its maximum number of loops or playtime). In this case this event will be triggered once.
motionInstance | The motion instance that got into a frozen state. |
|
inlinevirtual |
The event that gets triggered when a MotionSystem::PlayMotion(...) is being executed. The difference between OnStartMotionInstance() and this OnPlayMotion() is that the OnPlayMotion doesn't guarantee that the motion is being played yet, as it can also be added to the motion queue. The OnStartMotionInstance() method will be called once the motion is really being played.
motion | The motion that is being played. |
info | The playback info used to play the motion. |
|
inlinevirtual |
This event gets triggered once the given motion instance gets added to the motion queue. This happens when you set the PlayBackInfo::m_playNow member to false. In that case the MotionSystem::PlayMotion() method (OnPlayMotion) will not directly start playing the motion (OnStartMotionInstance), but will add it to the motion queue instead. The motion queue will then start playing the motion instance once it should.
motionInstance | The motion instance that gets added to the motion queue. |
info | The playback information used to play this motion instance. |
|
inlinevirtual |
Perform a ray intersection test and return the intersection info. The first event handler registered that sets the IntersectionInfo::m_isValid to true will be outputting to the outIntersectInfo parameter.
start | The start point, in world space. |
end | The end point, in world space. |
outIntersectInfo | The resulting intersection info. |
Reimplemented in EMStudio::AnimGraphEventHandler.
|
inlinevirtual |
This event gets triggered once a motion instance is automatically changing its weight value over time. For example when a motion is automatically being faded in from weight 0 to a given target weight in half a second, then once this blending starts, this event is being triggered. Once the the MotionInstance::SetWeight(...) method is being called with a blend time bigger than zero, and if the motion instance isn't currently already blending, then this event will be triggered. This event most likely will get triggered when using the MotionSystem::PlayMotion() and MotionInstance::Stop() methods.
motionInstance | The motion instance which is changing its weight value over time. |
|
inlinevirtual |
The event that gets triggered when a motion instance is really being played. This can be a manual call through MotionInstance::PlayMotion or when the MotionQueue class will start playing a motion that was on the queue. The difference between OnStartMotionInstance() and this OnPlayMotion() is that the OnPlayMotion doesn't guarantee that the motion is being played yet, as it can also be added to the motion queue. The OnStartMotionInstance() method will be called once the motion is really being played.
motionInstance | The motion instance that is being played. |
info | The playback info used to play the motion. |
|
inlinevirtual |
The event that gets triggered when a motion instance is being stopped using one of the MotionInstance::Stop() methods. EMotion FX will internally stop the motion automatically when the motion instance reached its maximum playback time or its maximum number of loops.
motionInstance | The motion instance that is being stopped. |
|
inlinevirtual |
This event gets triggered once a motion instance stops it automatic changing of its weight value over time. For example when a motion is automatically being faded in from weight 0 to a given target weight in half a second, and once the target weight is reached after half a second, will cause this event to be triggered. Once the the MotionInstance::SetWeight(...) method is being called with a blend time equal to zero and the motion instance is currently blending its weight value, then this event will be triggered. This event most likely will get triggered when using the MotionSystem::PlayMotion() and MotionInstance::Stop() methods.
motionInstance | The motion instance for which the automatic weight blending just stopped. |