Plasma Engine  2.0
Loading...
Searching...
No Matches
TwoBoneIKComponent.h
1#pragma once
2
3#include <Core/World/ComponentManager.h>
4#include <GameEngine/GameEngineDLL.h>
5#include <RendererCore/AnimationSystem/AnimationPose.h>
6
8
9class PL_GAMEENGINE_DLL plTwoBoneIKComponent : public plComponent
10{
12
14 // plComponent
15
16public:
17 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
18 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
19
21 // plTwoBoneIKComponent
22
23public:
26
27 float m_fWeight = 1.0f;
28 float m_fSoften = 1.0f;
29 plHashedString m_sJointStart;
30 plHashedString m_sJointMiddle;
31 plHashedString m_sJointEnd;
32 plEnum<plBasisAxis> m_MidAxis;
33 plAngle m_TwistAngle;
34 plVec3 m_vPoleTarget = plVec3::MakeZero();
35
36protected:
37 void OnMsgAnimationPoseGeneration(plMsgAnimationPoseGeneration& msg) const; // [ msg handler ]
38
39 //plUInt16 m_uiJointIdxStart = 0;
40 //plUInt16 m_uiJointIdxMiddle = 0;
41 //plUInt16 m_uiJointIdxEnd = 0;
42};
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
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
Definition TwoBoneIKComponent.h:10
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
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition Declarations.h:54