struct IAnimationGraphState { };
IAnimationGraph.h
virtual ~IAnimationGraphState();
virtual void AddListener(const char * name, IAnimationGraphStateListener * pListener) = 0;
Just register and non-selectivly call QueryComplete on all listeners (regardless of what ID's they are actually interested in).
virtual void ClearForcedStates() = 0;
simply recurse
virtual void ClearInput(InputID) = 0;
virtual void ClearTrigger(EAnimationGraphTriggerUser user) = 0;
virtual IAnimationGraphExistanceQuery * CreateExistanceQuery() = 0; virtual IAnimationGraphExistanceQuery * CreateExistanceQuery(int layer) = 0;
Creates an object you can use to test whether a specific combination of inputs will select a state (and to get a bit more information about that state)
virtual bool DoesInputMatchState(InputID) const = 0;
Not used
virtual void ForceTeleportToQueriedState() = 0;
virtual bool GetAnimationActivation() = 0;
virtual const SAnimationTarget* GetAnimationTarget() = 0;
virtual const char * GetCurrentStateName() = 0;
Concatenate all layers state names with '+'. Use only fullbody layer state name if upperbody layer is not allowed/mixed.
virtual void GetInput(InputID, char *) const = 0;
assert all equal, use any (except if signalled, then return the one not equal to default, or return default of all default)
virtual void GetInput(InputID, char *, int layerIndex) const = 0;
get input from specific layer if layer index is valid for this state
virtual float GetInputAsFloat(InputID inputId) = 0;
same as GetInput above
virtual InputID GetInputId(const char * input) = 0;
wrapper generates it's own input IDs for the union of all inputs in all layers, and for each input it maps to the layer specific IDs.
virtual const char* GetInputName(InputID) const = 0;
returns NULL if InputID is out of range
virtual void GetMemoryUsage(ICrySizer * pSizer) const = 0;
simply recurse (will add all layer's containers to the sizer)
virtual const char* GetVariationInput(InputID inputID) const = 0;
virtual InputID GetVariationInputId(const char* variationInputName) const = 0;
virtual const char* GetVariationInputName(InputID) const = 0;
virtual bool HasAnimationTarget() const = 0;
virtual void Hurry() = 0;
simply recurse (hurry all layers, let them hurry independently where they can)
virtual bool IsDefaultInputValue(InputID) const = 0;
AND all layers
virtual bool IsInDebugBreak() = 0;
is the same for all layers (equal assertion should not even be needed)
virtual bool IsMixingAllowedForCurrentState() const = 0;
the wrapper simply returns false
virtual bool IsSignalledInput(InputID intputId) const = 0;
used by CAnimationGraphStates
virtual bool IsUpdateReallyNecessary() = 0;
virtual void LockInput(InputID, bool locked) = 0;
inline void LockInput(const char * name, bool locked);
virtual void Pause(bool pause, EAnimationGraphPauser pauser, float fOverrideTransTime = -1.0f) = 0;
simply recurse
virtual void PushForcedState(const char * state, TAnimationGraphQueryID * pQueryID = 0) = 0;
simply recurse (will be ignored by each layer individually if state not found)
virtual void QueryChangeInput(InputID, TAnimationGraphQueryID *) = 0;
assert all equal, forward to all layers, complete when all have changed once (trivial, since all change at once via SetInput). (except for signalled, forward only to layers which currently are not default, complete when all those have changed).
inline void QueryChangeInput(const char * name, TAnimationGraphQueryID * pQueryID);
virtual void QueryLeaveState(TAnimationGraphQueryID * pQueryID) = 0;
virtual const char * QueryOutput(const char * name) = 0;
find highest layer that has output id, or null (this allows upperbody to override fullbody). Use this logic when calling SetOutput on listeners.
virtual void Release() = 0;
virtual void RemoveListener(IAnimationGraphStateListener * pListener) = 0;
virtual void Reset() = 0;
simply recurse
virtual void Serialize(TSerialize ser) = 0;
simply recurse (preserve order), and don't forget to serialize the wrapper stuff, ID's or whatever.
virtual void SetAnimatedCharacter(class CAnimatedCharacter* animatedCharacter, int layerIndex, IAnimationGraphState* parentLayerState) = 0;
This should be turned into registered callbacks or something instead (look at AnimationGraphStateListener). Use to access the SelectLocomotionState() callback in CAnimatedCharacter. Only set for fullbody, null for upperbody.
virtual void SetAnimationActivation(bool activated) = 0;
simply recurse
virtual void SetFirstPersonMode(bool on) = 0;
simply recurse (first person skippable states are skipped independently by each layer)
virtual bool SetInput(InputID, const char *, TAnimationGraphQueryID * pQueryID = 0) = 0;
virtual bool SetInput(InputID, float, TAnimationGraphQueryID * pQueryID = 0) = 0;
recurse setting. query mechanism needs to be wrapped by wrapper. Associated QueryID will be given to QueryComplete when ALL layers supporting the input have reached their matching states. wrapper generates it's own query IDs which are associated to a bunch of sub IDs with rules for how to handle the sub IDs into wrapped IDs.
virtual bool SetInput(InputID, int, TAnimationGraphQueryID * pQueryID = 0) = 0;
template <class T> inline bool SetInput(const char * name, T value, TAnimationGraphQueryID * pQueryID = 0);
(see lower level versions below)
virtual bool SetInputOptional(InputID, const char *, TAnimationGraphQueryID * pQueryID = 0) = 0;
SetInputOptional is same as SetInput except that it will not set the default input value in case a non-existing value is passed
inline bool SetInputOptional(const char * name, const char * value, TAnimationGraphQueryID * pQueryID = 0);
SetInputOptional is same as SetInput except that it will not set the default input value in case a non-existing value is passed
virtual IAnimationSpacialTrigger * SetTrigger(const SAnimationTargetRequest& req, EAnimationGraphTriggerUser user, TAnimationGraphQueryID * pQueryStart, TAnimationGraphQueryID * pQueryEnd) = 0;
Exact positioning: Forward to fullbody layer only (hardcoded)
virtual bool SetVariationInput(InputID inputID, const char* value) = 0;
virtual bool SetVariationInput(const char* name, const char* value) = 0;
virtual bool Update() = 0;
simply recurse
typedef AnimationGraphInputID InputID;