|
CeresEngine 0.2.0
A game development framework
|
A flat scene partitioning system. More...
#include <CeresEngine/Scene/Partition/FlatScenePartition.hpp>
Classes | |
| struct | ObjectInformation |
| Represents information about an object in a scene. More... | |
Public Member Functions | |
| SceneObject | rayCast (const Ray &ray) final |
Casts a ray on the scene to find the first SceneObject that gets hit by the ray. | |
| void | rebuild () final |
| Rebuilds the scene partition after changes were done. | |
| void | addSceneObject (const SceneObject &sceneObject) final |
| Adds a new scene object to the scene partition structure. | |
| void | updateSceneObject (const SceneObject &sceneObject) final |
| Updates an existing scene object on the scene partition structure. | |
| void | removeSceneObject (const SceneObject &sceneObject) final |
| Removes an existing scene object from the scene partition structure. | |
Public Member Functions inherited from CeresEngine::ScenePartition | |
| ScenePartition (World &world) | |
| virtual | ~ScenePartition () |
| 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 Attributes | |
| Vector< ObjectInformation > | mObjects |
Additional Inherited Members | |
Protected Attributes inherited from CeresEngine::ScenePartition | |
| World & | mWorld |
The scene World being partitioned by the partition. | |
A flat scene partitioning system.
Performs no partitioning on the scene and iterates over all objects in the scene to execute queries.
The implementation of this partition system is very trivial and only operates on the bounding boxes of the object. It won't perform a more fine-grained ray casting by looking at the actual geometry of the object.
Usage of this implementation is discouraged and a more optimized one such as BVHScenePartitionSystem or OctreeScenePartitionSystem should be used instead.
|
finalvirtual |
Adds a new scene object to the scene partition structure.
Implements CeresEngine::ScenePartition.
|
finalvirtual |
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. Implements CeresEngine::ScenePartition.
|
finalvirtual |
Rebuilds the scene partition after changes were done.
Implements CeresEngine::ScenePartition.
|
finalvirtual |
Removes an existing scene object from the scene partition structure.
Implements CeresEngine::ScenePartition.
|
finalvirtual |
Updates an existing scene object on the scene partition structure.
Implements CeresEngine::ScenePartition.
|
private |