Plasma Engine  2.0
Loading...
Searching...
No Matches
SampleAnimClipAnimNode.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
7class PL_RENDERERCORE_DLL plSampleAnimClipAnimNode : public plAnimGraphNode
8{
9 PL_ADD_DYNAMIC_REFLECTION(plSampleAnimClipAnimNode, plAnimGraphNode);
10
12 // plAnimGraphNode
13
14protected:
15 virtual plResult SerializeNode(plStreamWriter& stream) const override;
16 virtual plResult DeserializeNode(plStreamReader& stream) override;
17
18 virtual void Step(plAnimController& ref_controller, plAnimGraphInstance& ref_graph, plTime tDiff, const plSkeletonResource* pSkeleton, plGameObject* pTarget) const override;
19 virtual bool GetInstanceDataDesc(plInstanceDataDesc& out_desc) const override;
20
22 // plSampleAnimClipAnimNode
23
24 void SetClip(const char* szClip);
25 const char* GetClip() const;
26
27public:
30
31private:
32 plHashedString m_sClip; // [ property ]
33 bool m_bLoop = true; // [ property ]
34 bool m_bApplyRootMotion = false; // [ property ]
35 float m_fPlaybackSpeed = 1.0f; // [ property ]
36
37 plAnimGraphTriggerInputPin m_InStart; // [ property ]
38 plAnimGraphBoolInputPin m_InLoop; // [ property ]
39 plAnimGraphNumberInputPin m_InSpeed; // [ property ]
40
41 plAnimGraphLocalPoseOutputPin m_OutPose; // [ property ]
42 plAnimGraphTriggerOutputPin m_OutOnStarted; // [ property ]
43 plAnimGraphTriggerOutputPin m_OutOnFinished; // [ property ]
44
45 struct InstanceState
46 {
47 bool m_bPlaying = false;
48 plTime m_PlaybackTime;
49 };
50};
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
Definition SampleAnimClipAnimNode.h:8
Definition SkeletonResource.h:47
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
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