3#include <Core/World/Component.h>
4#include <Core/World/Declarations.h>
5#include <Core/World/World.h>
6#include <GameComponentsPlugin/GameComponentsDLL.h>
48 float ComputeForceAtGlobalPosition(
const plSimdVec4f& vGlobalPos)
const;
91 virtual float ComputeForceAtLocalPosition(
const plSimdVec4f& vLocalPos)
const override;
93 float GetRadius()
const {
return m_fRadius; }
94 void SetRadius(
float fVal);
99 float m_fRadius = 1.0f;
Base class for components that define volumes in which a camera shake effect shall be applied.
Definition CameraShakeVolumeComponent.h:16
plEnum< plOnComponentFinishedAction > m_OnFinishedAction
In case of a burst shake, defines whether the component should delete itself afterwards.
Definition CameraShakeVolumeComponent.h:54
plTime m_BurstDuration
How long a shake burst should last. Zero for constant shaking.
Definition CameraShakeVolumeComponent.h:42
float m_fStrength
How strong the shake should be at the strongest point. Typically a value between one and zero.
Definition CameraShakeVolumeComponent.h:45
static plSpatialData::Category SpatialDataCategory
The spatial category used to find camera shake volume components through the spatial system.
Definition CameraShakeVolumeComponent.h:39
virtual float ComputeForceAtLocalPosition(const plSimdVec4f &vLocalPos) const =0
Calculates the shake strength in local space of the component.
A spherical volume in which a camera shake will be applied.
Definition CameraShakeVolumeComponent.h:74
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 OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void OnSimulationStarted()
This method is called once for active components, at the start of the next world update,...
Definition Component.cpp:144
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
virtual void OnActivated()
This method is called when the component gets activated.
Definition Component.cpp:140
Definition ComponentManager.h:88
A 4-component SIMD vector class.
Definition SimdVec4f.h:8
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
For internal use by components to trigger some known behavior. Usually components will post this mess...
Definition TriggerMessage.h:26
Definition DeleteObjectMessage.h:7
Definition UpdateLocalBoundsMessage.h:9
Definition SpatialData.h:27
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12