Plasma Engine  2.0
Loading...
Searching...
No Matches
SampleAnimClipSequenceAnimNode.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 plSampleAnimClipSequenceAnimNode : public plAnimGraphNode
8{
9 PL_ADD_DYNAMIC_REFLECTION(plSampleAnimClipSequenceAnimNode, 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 // plSampleAnimClipSequenceAnimNode
23
24public:
27
28 void SetStartClip(const char* szClip);
29 const char* GetStartClip() const;
30
31 plUInt32 Clips_GetCount() const; // [ property ]
32 const char* Clips_GetValue(plUInt32 uiIndex) const; // [ property ]
33 void Clips_SetValue(plUInt32 uiIndex, const char* szValue); // [ property ]
34 void Clips_Insert(plUInt32 uiIndex, const char* szValue); // [ property ]
35 void Clips_Remove(plUInt32 uiIndex); // [ property ]
36
37 void SetEndClip(const char* szClip);
38 const char* GetEndClip() const;
39
40private:
41 plHashedString m_sStartClip; // [ property ]
42 plHybridArray<plHashedString, 1> m_Clips; // [ property ]
43 plHashedString m_sEndClip; // [ property ]
44 bool m_bApplyRootMotion = false; // [ property ]
45 bool m_bLoop = false; // [ property ]
46 float m_fPlaybackSpeed = 1.0f; // [ property ]
47
48 plAnimGraphTriggerInputPin m_InStart; // [ property ]
49 plAnimGraphBoolInputPin m_InLoop; // [ property ]
50 plAnimGraphNumberInputPin m_InSpeed; // [ property ]
51 plAnimGraphNumberInputPin m_ClipIndexPin; // [ property ]
52
53 plAnimGraphLocalPoseOutputPin m_OutPose; // [ property ]
54 plAnimGraphTriggerOutputPin m_OutOnMiddleStarted; // [ property ]
55 plAnimGraphTriggerOutputPin m_OutOnEndStarted; // [ property ]
56 plAnimGraphTriggerOutputPin m_OutOnFinished; // [ property ]
57
58 struct InstanceState
59 {
60 plTime m_PlaybackTime;
61 plUInt8 m_uiState = 0; // 0 = off, 1 = start, 2 = middle, 3 = end
62 plUInt8 m_uiMiddleClipIdx = 0;
63 };
64};
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 SampleAnimClipSequenceAnimNode.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