CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ScenePartitionSystem Class Reference

A system that connects the ECS-system with the scene partition implementation. More...

#include <CeresEngine/Scene/Partition/ScenePartition.hpp>

Inheritance diagram for CeresEngine::ScenePartitionSystem:
CeresEngine::System< ScenePartitionSystem, EntityObjectSet< SceneObject > >

Public Member Functions

SceneObject rayCast (const Ray &ray)
 Casts a ray on the scene to find the first SceneObject that gets hit by the ray.
 
SceneObject rayCast (const Vector3 &origin, const Vector3 &direction)
 Casts a ray on the scene to find the first SceneObject that gets hit by the ray.
 

Private Member Functions

void didAdd (const SceneObject &entity) noexcept final
 
void didRemove (const SceneObject &entity) noexcept final
 
void didChange (const SceneObject &entity, const EntityChangeSet &changeSet) noexcept final
 

Private Attributes

UPtr< ScenePartitionmScenePartition
 The scene partition to be managed by the system.
 

Detailed Description

A system that connects the ECS-system with the scene partition implementation.

Member Function Documentation

◆ didAdd()

void CeresEngine::ScenePartitionSystem::didAdd ( const SceneObject entity)
finalprivatenoexcept

◆ didChange()

void CeresEngine::ScenePartitionSystem::didChange ( const SceneObject entity,
const EntityChangeSet changeSet 
)
finalprivatenoexcept

◆ didRemove()

void CeresEngine::ScenePartitionSystem::didRemove ( const SceneObject entity)
finalprivatenoexcept

◆ rayCast() [1/2]

SceneObject CeresEngine::ScenePartitionSystem::rayCast ( const Ray &  ray)

Casts a ray on the scene to find the first SceneObject that gets hit by the ray.

Parameters
rayThe ray to be cast on the scene.
Returns
The hit scene object, if any. Can be nullptr if no object was hit by the ray.

◆ rayCast() [2/2]

SceneObject CeresEngine::ScenePartitionSystem::rayCast ( const Vector3 origin,
const Vector3 direction 
)
inline

Casts a ray on the scene to find the first SceneObject that gets hit by the ray.

Parameters
rayThe ray to be cast on the scene.
Returns
The hit scene object, if any. Can be nullptr if no object was hit by the ray.

Member Data Documentation

◆ mScenePartition

UPtr<ScenePartition> CeresEngine::ScenePartitionSystem::mScenePartition
private

The scene partition to be managed by the system.


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