18 #ifndef __H__OCULAR_CORE_SCENE_BVH_SCENE_TREE__H__
19 #define __H__OCULAR_CORE_SCENE_BVH_SCENE_TREE__H__
21 #include "ISceneTree.hpp"
22 #include "SceneObject.hpp"
23 #include "BVHSceneNode.hpp"
80 typedef std::pair<uint64_t, SceneObject*> MortonPair;
92 virtual void destroy()
override;
94 virtual void addObjects(std::vector<SceneObject*>
const& objects)
override;
96 virtual void removeObjects(std::vector<SceneObject*>
const& objects)
override;
97 virtual void getAllObjects(std::vector<SceneObject*>& objects)
const override;
105 virtual SceneTreeType
getType()
const override;
250 uint32_t
findSplit(std::vector<MortonPair>
const& pairs, uint32_t first, uint32_t last)
const;
264 std::vector<BVHSceneNode*> m_DirtyNodes;
265 std::vector<SceneObject*> m_AllObjects;
void insertNewObjects()
Definition: BVHSceneTree.cpp:359
void insertObject(SceneObject *object)
Definition: BVHSceneTree.cpp:407
virtual bool removeObject(SceneObject *object) override
Definition: BVHSceneTree.cpp:106
void createMortonPairs(std::vector< MortonPair > &pairs) const
Definition: BVHSceneTree.cpp:689
virtual void getAllVisibleObjects(Math::Frustum const &frustum, std::vector< SceneObject * > &objects) const override
Definition: BVHSceneTree.cpp:253
uint32_t findSplit(std::vector< MortonPair > const &pairs, uint32_t first, uint32_t last) const
Definition: BVHSceneTree.cpp:784
BVHSceneNode * findNearest(BVHSceneNode *node, uint64_t const &morton) const
Definition: BVHSceneTree.cpp:530
void destroyNode(BVHSceneNode *node) const
Definition: BVHSceneTree.cpp:395
Definition: Frustum.hpp:57
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: BoundsOBB.hpp:56
virtual void addObject(SceneObject *object) override
Definition: BVHSceneTree.cpp:81
virtual void getIntersections(Math::Ray const &ray, std::vector< SceneObject * > &objects) const override
Definition: BVHSceneTree.cpp:259
virtual SceneTreeType getType() const override
Definition: BVHSceneTree.cpp:319
void findVisible(BVHSceneNode *node, Math::Frustum const &frustum, std::vector< SceneObject * > &objects) const
Definition: BVHSceneTree.cpp:550
Definition: BVHSceneNode.hpp:44
bool rebuildNeeded() const
Definition: BVHSceneTree.cpp:379
void findIntersections(BVHSceneNode *node, Math::Ray const &ray, std::vector< std::pair< SceneObject *, float >> &objects) const
Definition: BVHSceneTree.cpp:576
Definition: SceneObject.hpp:93
void fitNodeBounds(BVHSceneNode *node) const
Definition: BVHSceneTree.cpp:832
Definition: BVHSceneTree.hpp:78
void rebuild()
Definition: BVHSceneTree.cpp:328
virtual void removeObjects(std::vector< SceneObject * > const &objects) override
Definition: BVHSceneTree.cpp:239
void build()
Definition: BVHSceneTree.cpp:662
virtual void restructure() override
Definition: BVHSceneTree.cpp:48
virtual void setDirty(UUID const &uuid) override
Definition: BVHSceneTree.cpp:314
virtual void addObjects(std::vector< SceneObject * > const &objects) override
Definition: BVHSceneTree.cpp:90
void updateDirtyNodes()
Definition: BVHSceneTree.cpp:374
BVHSceneNode * findParent(BVHSceneNode *node, SceneObject *object) const
Definition: BVHSceneTree.cpp:506
BVHSceneNode * generateTree(BVHSceneNode *parent, std::vector< MortonPair > const &pairs, uint32_t first, uint32_t last) const
Definition: BVHSceneTree.cpp:749
Definition: BoundsAABB.hpp:63
Definition: BoundsSphere.hpp:52
virtual void getAllObjects(std::vector< SceneObject * > &objects) const override
Definition: BVHSceneTree.cpp:247
virtual void destroy() override
Definition: BVHSceneTree.cpp:69
Definition: ISceneTree.hpp:51