Plasma Engine  2.0
Loading...
Searching...
No Matches
SwitchPoseAnimNode.h
1#pragma once
2
3#include <RendererCore/AnimationSystem/AnimGraph/AnimGraphNode.h>
4
5class PL_RENDERERCORE_DLL plSwitchPoseAnimNode : public plAnimGraphNode
6{
7 PL_ADD_DYNAMIC_REFLECTION(plSwitchPoseAnimNode, plAnimGraphNode);
8
10 // plAnimGraphNode
11
12protected:
13 virtual plResult SerializeNode(plStreamWriter& stream) const override;
14 virtual plResult DeserializeNode(plStreamReader& stream) override;
15
16 virtual void Step(plAnimController& ref_controller, plAnimGraphInstance& ref_graph, plTime tDiff, const plSkeletonResource* pSkeleton, plGameObject* pTarget) const override;
17 virtual bool GetInstanceDataDesc(plInstanceDataDesc& out_desc) const override;
18
20 // plSelectPoseAnimNode
21
22private:
23 plTime m_TransitionDuration = plTime::MakeFromMilliseconds(200); // [ property ]
24 plUInt8 m_uiPosesCount = 0; // [ property ]
25 plHybridArray<plAnimGraphLocalPoseInputPin, 4> m_InPoses; // [ property ]
26 plAnimGraphNumberInputPin m_InIndex; // [ property ]
27 plAnimGraphLocalPoseOutputPin m_OutPose; // [ property ]
28
29 struct InstanceData
30 {
31 plTime m_TransitionTime;
32 plInt8 m_iTransitionFromIndex = -1;
33 plInt8 m_iTransitionToIndex = -1;
34 };
35};
Definition AnimController.h:52
Definition AnimGraphInstance.h:15
Definition AnimGraphPins.h:194
Base class for all nodes in an plAnimGraphInstance.
Definition AnimGraphNode.h:36
Definition AnimGraphPins.h:108
This class represents an object inside the world.
Definition GameObject.h:32
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition SkeletonResource.h:47
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
Definition SwitchPoseAnimNode.h:6
Structure to describe an instance data type.
Definition InstanceDataAllocator.h:17
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
PL_ALWAYS_INLINE static constexpr plTime MakeFromMilliseconds(double fMilliseconds)
Creates an instance of plTime that was initialized from milliseconds.
Definition Time.h:26