Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::BoundsComponent Class Referencefinal

#include <BoundsComponent.h>

+ Inheritance diagram for Divide::BoundsComponent:

Public Member Functions

 BoundsComponent (SceneGraphNode *sgn, PlatformContext &context)
 
const BoundingBoxgetBoundingBox () const noexcept
 
const BoundingSpheregetBoundingSphere () const noexcept
 
const OBBgetOBB ()
 
void updateBoundingBoxTransform ()
 
void appendChildBBs ()
 
void appendChildRefBBs ()
 
FORCE_INLINE bool isClean () const noexcept
 
 PROPERTY_R (bool, showAABB, false)
 
 PROPERTY_R (bool, showOBB, false)
 
 PROPERTY_R (bool, showBS, false)
 
 PROPERTY_RW (bool, collisionsEnabled, true)
 
void showAABB (bool state)
 
void showOBB (bool state)
 
void showBS (bool state)
 
- Public Member Functions inherited from Divide::GUIDWrapper
 GUIDWrapper () noexcept
 
 GUIDWrapper (const GUIDWrapper &old) noexcept
 
 GUIDWrapper (GUIDWrapper &&old) noexcept
 
virtual ~GUIDWrapper ()=default
 
FORCE_INLINE I64 getGUID () const noexcept
 
GUIDWrapperoperator= (const GUIDWrapper &old)=delete
 
GUIDWrapperoperator= (GUIDWrapper &&other)=delete
 

Protected Member Functions

void OnData (const ECS::CustomEvent &data) override
 
void setRefBoundingBox (const BoundingBox &nodeBounds) noexcept
 
void flagBoundingBoxDirty (U32 transformMask, bool recursive)
 

Private Types

using Parent = BaseComponentType< BoundsComponent, ComponentType::BOUNDS >
 

Private Attributes

std::atomic_uint _transformUpdatedMask
 
BoundingBox _boundingBox {}
 
BoundingBox _refBoundingBox {}
 
vec3< F32_worldOffset {}
 
BoundingSphere _boundingSphere {}
 
OBB _obb {}
 
std::atomic_bool _obbDirty = false
 

Friends

class BoundsSystem
 
class SceneGraph
 
template<typename T , typename U >
class ECSSystem
 

Additional Inherited Members

- Static Public Member Functions inherited from Divide::GUIDWrapper
static I64 generateGUID () noexcept
 
- Protected Attributes inherited from Divide::GUIDWrapper
const I64 _guid
 

Detailed Description

Definition at line 42 of file BoundsComponent.h.

Member Typedef Documentation

◆ Parent

Constructor & Destructor Documentation

◆ BoundsComponent()

Divide::BoundsComponent::BoundsComponent ( SceneGraphNode sgn,
PlatformContext context 
)

Definition at line 12 of file BoundsComponent.cpp.

Member Function Documentation

◆ appendChildBBs()

void Divide::BoundsComponent::appendChildBBs ( )

Definition at line 197 of file BoundsComponent.cpp.

◆ appendChildRefBBs()

void Divide::BoundsComponent::appendChildRefBBs ( )

Definition at line 178 of file BoundsComponent.cpp.

◆ flagBoundingBoxDirty()

void Divide::BoundsComponent::flagBoundingBoxDirty ( U32  transformMask,
bool  recursive 
)
protected

Definition at line 134 of file BoundsComponent.cpp.

◆ getBoundingBox()

const BoundingBox & Divide::BoundsComponent::getBoundingBox ( ) const
inlinenoexcept

Definition at line 46 of file BoundsComponent.h.

◆ getBoundingSphere()

const BoundingSphere & Divide::BoundsComponent::getBoundingSphere ( ) const
inlinenoexcept

Definition at line 47 of file BoundsComponent.h.

◆ getOBB()

const OBB & Divide::BoundsComponent::getOBB ( )

Definition at line 220 of file BoundsComponent.cpp.

◆ isClean()

FORCE_INLINE bool Divide::BoundsComponent::isClean ( ) const
inlinenoexcept

Definition at line 54 of file BoundsComponent.h.

◆ OnData()

void Divide::BoundsComponent::OnData ( const ECS::CustomEvent data)
overrideprotected

Definition at line 153 of file BoundsComponent.cpp.

◆ PROPERTY_R() [1/3]

Divide::BoundsComponent::PROPERTY_R ( bool  ,
showAABB  ,
false   
)

◆ PROPERTY_R() [2/3]

Divide::BoundsComponent::PROPERTY_R ( bool  ,
showBS  ,
false   
)

◆ PROPERTY_R() [3/3]

Divide::BoundsComponent::PROPERTY_R ( bool  ,
showOBB  ,
false   
)

◆ PROPERTY_RW()

Divide::BoundsComponent::PROPERTY_RW ( bool  ,
collisionsEnabled  ,
true   
)

◆ setRefBoundingBox()

void Divide::BoundsComponent::setRefBoundingBox ( const BoundingBox nodeBounds)
protectednoexcept

Definition at line 161 of file BoundsComponent.cpp.

◆ showAABB()

void Divide::BoundsComponent::showAABB ( bool  state)

Definition at line 98 of file BoundsComponent.cpp.

◆ showBS()

void Divide::BoundsComponent::showBS ( bool  state)

Definition at line 122 of file BoundsComponent.cpp.

◆ showOBB()

void Divide::BoundsComponent::showOBB ( bool  state)

Definition at line 110 of file BoundsComponent.cpp.

◆ updateBoundingBoxTransform()

void Divide::BoundsComponent::updateBoundingBoxTransform ( )

Definition at line 167 of file BoundsComponent.cpp.

Friends And Related Function Documentation

◆ BoundsSystem

BoundsSystem
friend

Definition at line 42 of file BoundsComponent.h.

◆ ECSSystem

template<typename T , typename U >
friend class ECSSystem
friend

Definition at line 69 of file BoundsComponent.h.

◆ SceneGraph

friend class SceneGraph
friend

Definition at line 66 of file BoundsComponent.h.

Member Data Documentation

◆ _boundingBox

BoundingBox Divide::BoundsComponent::_boundingBox {}
private

Definition at line 80 of file BoundsComponent.h.

◆ _boundingSphere

BoundingSphere Divide::BoundsComponent::_boundingSphere {}
private

Definition at line 83 of file BoundsComponent.h.

◆ _obb

OBB Divide::BoundsComponent::_obb {}
private

Definition at line 84 of file BoundsComponent.h.

◆ _obbDirty

std::atomic_bool Divide::BoundsComponent::_obbDirty = false
private

Definition at line 85 of file BoundsComponent.h.

◆ _refBoundingBox

BoundingBox Divide::BoundsComponent::_refBoundingBox {}
private

Definition at line 81 of file BoundsComponent.h.

◆ _transformUpdatedMask

std::atomic_uint Divide::BoundsComponent::_transformUpdatedMask
private

Definition at line 79 of file BoundsComponent.h.

◆ _worldOffset

vec3<F32> Divide::BoundsComponent::_worldOffset {}
private

Definition at line 82 of file BoundsComponent.h.


The documentation for this class was generated from the following files: