Plasma Engine  2.0
Loading...
Searching...
No Matches
HeadBoneComponent.h
1#pragma once
2
3#include <GameComponentsPlugin/GameComponentsDLL.h>
4
6
18class PL_GAMECOMPONENTS_DLL plHeadBoneComponent : 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 // plHeadBoneComponent
31
32public:
35
39 void SetVerticalRotation(float fRadians); // [ scriptable ]
40
44 void ChangeVerticalRotation(float fRadians); // [ scriptable ]
45
46 plAngle m_MaxVerticalRotation = plAngle::MakeFromDegree(80); // [ property ]
47
48protected:
49 void Update();
50
51 plAngle m_NewVerticalRotation;
52 plAngle m_CurVerticalRotation;
53};
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
static constexpr plAngle MakeFromDegree(float fDegree)
Creates an instance of plAngle that was initialized from degree. (Performs a conversion)
Definition Angle_inl.h:33
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
Simple component manager implementation that calls an update method on all components every frame.
Definition ComponentManager.h:142
Applies a vertical rotation in local space (local Y axis) to the owner game object.
Definition HeadBoneComponent.h:19
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