Plasma Engine  2.0
Loading...
Searching...
No Matches
SampleBlendSpace1DAnimNode.h
1#pragma once
2
3#include <Core/ResourceManager/ResourceHandle.h>
4#include <RendererCore/AnimationSystem/AnimGraph/AnimGraphNode.h>
5#include <RendererCore/AnimationSystem/AnimationClipResource.h>
6
7struct PL_RENDERERCORE_DLL plAnimationClip1D
8{
9 plHashedString m_sClip;
10 float m_fPosition = 0.0f;
11 float m_fSpeed = 1.0f;
12
13 void SetAnimationFile(const char* szFile);
14 const char* GetAnimationFile() const;
15};
16
17PL_DECLARE_REFLECTABLE_TYPE(PL_RENDERERCORE_DLL, plAnimationClip1D);
18
19class PL_RENDERERCORE_DLL plSampleBlendSpace1DAnimNode : public plAnimGraphNode
20{
21 PL_ADD_DYNAMIC_REFLECTION(plSampleBlendSpace1DAnimNode, plAnimGraphNode);
22
24 // plAnimGraphNode
25
26protected:
27 virtual plResult SerializeNode(plStreamWriter& stream) const override;
28 virtual plResult DeserializeNode(plStreamReader& stream) override;
29
30 virtual void Step(plAnimController& ref_controller, plAnimGraphInstance& ref_graph, plTime tDiff, const plSkeletonResource* pSkeleton, plGameObject* pTarget) const override;
31 virtual bool GetInstanceDataDesc(plInstanceDataDesc& out_desc) const override;
32
34 // plSampleBlendSpace1DAnimNode
35
36public:
39
40private:
41 plHybridArray<plAnimationClip1D, 4> m_Clips; // [ property ]
42 bool m_bLoop = true; // [ property ]
43 bool m_bApplyRootMotion = false; // [ property ]
44 float m_fPlaybackSpeed = 1.0f; // [ property ]
45
46 plAnimGraphTriggerInputPin m_InStart; // [ property ]
47 plAnimGraphBoolInputPin m_InLoop; // [ property ]
48 plAnimGraphNumberInputPin m_InSpeed; // [ property ]
49 plAnimGraphNumberInputPin m_InLerp; // [ property ]
50 plAnimGraphLocalPoseOutputPin m_OutPose; // [ property ]
51 plAnimGraphTriggerOutputPin m_OutOnStarted; // [ property ]
52 plAnimGraphTriggerOutputPin m_OutOnFinished; // [ property ]
53
54
55 struct InstanceState
56 {
57 plTime m_PlaybackTime;
58 bool m_bPlaying = false;
59 };
60};
Definition AnimController.h:52
Definition AnimGraphPins.h:130
Definition AnimGraphInstance.h:15
Definition AnimGraphPins.h:194
Base class for all nodes in an plAnimGraphInstance.
Definition AnimGraphNode.h:36
Definition AnimGraphPins.h:108
Definition AnimGraphPins.h:81
Definition AnimGraphPins.h:92
This class represents an object inside the world.
Definition GameObject.h:32
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition SampleBlendSpace1DAnimNode.h:20
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 SampleBlendSpace1DAnimNode.h:8
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