|
CeresEngine 0.2.0
A game development framework
|
Partitions the scene into a highly-efficient representation that allows to quickly perform geometric queries on the scene. More...
#include <CeresEngine/Scene/Partition/ScenePartition.hpp>
Public Member Functions | |
| ScenePartition (World &world) | |
| virtual | ~ScenePartition () |
| virtual SceneObject | rayCast (const Ray &ray)=0 |
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. | |
Protected Member Functions | |
| virtual void | rebuild ()=0 |
| Rebuilds the scene partition after changes were done. | |
| virtual void | addSceneObject (const SceneObject &sceneObject)=0 |
| Adds a new scene object to the scene partition structure. | |
| virtual void | updateSceneObject (const SceneObject &sceneObject)=0 |
| Updates an existing scene object on the scene partition structure. | |
| virtual void | removeSceneObject (const SceneObject &sceneObject)=0 |
| Removes an existing scene object from the scene partition structure. | |
Protected Attributes | |
| World & | mWorld |
The scene World being partitioned by the partition. | |
Friends | |
| class | ScenePartitionSystem |
Partitions the scene into a highly-efficient representation that allows to quickly perform geometric queries on the scene.
Examples of queries that can be performed are casting a ray on the scene for picking an object on the viewport.
| CeresEngine::ScenePartition::ScenePartition | ( | World & | world | ) |
|
virtual |
|
protectedpure virtual |
Adds a new scene object to the scene partition structure.
Implemented in CeresEngine::FlatScenePartition.
|
pure virtual |
Casts a ray on the scene to find the first SceneObject that gets hit by the ray.
| ray | The ray to be cast on the scene. |
nullptr if no object was hit by the ray. Implemented in CeresEngine::FlatScenePartition.
|
inline |
Casts a ray on the scene to find the first SceneObject that gets hit by the ray.
| ray | The ray to be cast on the scene. |
nullptr if no object was hit by the ray. Rebuilds the scene partition after changes were done.
Implemented in CeresEngine::FlatScenePartition.
|
protectedpure virtual |
Removes an existing scene object from the scene partition structure.
Implemented in CeresEngine::FlatScenePartition.
|
protectedpure virtual |
Updates an existing scene object on the scene partition structure.
Implemented in CeresEngine::FlatScenePartition.
|
friend |
|
protected |
The scene World being partitioned by the partition.