Plasma Engine  2.0
Loading...
Searching...
No Matches
UpdateLocalBoundsMessage.h
1#pragma once
2
3#include <Core/CoreDLL.h>
4#include <Core/World/SpatialData.h>
5#include <Foundation/Communication/Message.h>
6#include <Foundation/Math/BoundingBoxSphere.h>
7
8struct PL_CORE_DLL plMsgUpdateLocalBounds : public plMessage
9{
10 PL_DECLARE_MESSAGE_TYPE(plMsgUpdateLocalBounds, plMessage);
11
12 PL_ALWAYS_INLINE void AddBounds(const plBoundingBoxSphere& bounds, plSpatialData::Category category)
13 {
14 m_ResultingLocalBounds.ExpandToInclude(bounds);
15 m_uiSpatialDataCategoryBitmask |= category.GetBitmask();
16 }
17
20 PL_ALWAYS_INLINE void SetAlwaysVisible(plSpatialData::Category category)
21 {
22 m_bAlwaysVisible = true;
23 m_uiSpatialDataCategoryBitmask |= category.GetBitmask();
24 }
25
26private:
27 friend class plGameObject;
28
29 plBoundingBoxSphere m_ResultingLocalBounds;
30 plUInt32 m_uiSpatialDataCategoryBitmask = 0;
31 bool m_bAlwaysVisible = false;
32};
This class represents an object inside the world.
Definition GameObject.h:32
Base class for all message types. Each message type has it's own id which is used to dispatch message...
Definition Message.h:22
Definition UpdateLocalBoundsMessage.h:9
PL_ALWAYS_INLINE void SetAlwaysVisible(plSpatialData::Category category)
Enforces the object to be always visible. Note that you can't set this flag to false again,...
Definition UpdateLocalBoundsMessage.h:20
Definition SpatialData.h:27