Plasma Engine  2.0
Loading...
Searching...
No Matches
JointAttachmentComponent.h
1#pragma once
2
3#include <Core/World/ComponentManager.h>
4#include <GameEngine/GameEngineDLL.h>
5#include <RendererCore/AnimationSystem/AnimationPose.h>
6
8
18class PL_GAMEENGINE_DLL plJointAttachmentComponent : public plComponent
19{
21
23 // plComponent
24
25public:
26 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
27 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
28
30 // plJointAttachmentComponent
31
32public:
35
37 void SetJointName(const char* szName); // [ property ]
38 const char* GetJointName() const; // [ property ]
39
41 plVec3 m_vLocalPositionOffset = plVec3::MakeZero(); // [ property ]
42
44 plQuat m_vLocalRotationOffset = plQuat::MakeIdentity(); // [ property ]
45
46protected:
47 void OnAnimationPoseUpdated(plMsgAnimationPoseUpdated& msg); // [ msg handler ]
48
49 plHashedString m_sJointToAttachTo;
50 plUInt16 m_uiJointIndex = plInvalidJointIndex;
51};
Base class of all component types.
Definition Component.h:25
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Definition ComponentManager.h:88
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
Used to expose an animated mesh's bone as a game object, such that objects can be attached to it to m...
Definition JointAttachmentComponent.h:19
static const plQuatTemplate< float > MakeIdentity()
Definition Quat_inl.h:29
static plVec3Template< float > MakeZero()
Definition Vec3.h:38
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
Used by components that skin a mesh to inform children whenever a new pose has been computed.
Definition Declarations.h:68