Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Octree.h
Go to the documentation of this file.
1#ifndef ULT_OCTREE_H_INCLUDED
2#define ULT_OCTREE_H_INCLUDED
3
4#include "Math/Vector3D.h"
5
6namespace Ult
7{
8
13{
14public:
18 OctreeNode();
23
27 void CreateNode(
28 const Vector3D& center,
29 const float bbSize,
30 int currentLevel,
31 int maxLevel
32 );
33
37 bool IsLeaf() const { return mIsLeaf; }
41 Vector3D GetCenter() const { return mCenter; }
45 float GetSize() const { return mBbSize; }
49 OctreeNode** GetSubNodes() { return mChildNodes; }
50
51private:
52 bool mIsLeaf;
53 Vector3D mCenter;
54 float mBbSize;
55
56 OctreeNode* mChildNodes[8];
57};
58
59} // namespace Ult
60
61#endif // ULT_OCTREE_H_INCLUDED
62
Definition Octree.h:13
bool IsLeaf() const
Definition Octree.h:37
Vector3D GetCenter() const
Definition Octree.h:41
float GetSize() const
Definition Octree.h:45
void CreateNode(const Vector3D &center, const float bbSize, int currentLevel, int maxLevel)
Definition Octree.cpp:34
OctreeNode()
Definition Octree.cpp:15
OctreeNode ** GetSubNodes()
Definition Octree.h:49
~OctreeNode()
Definition Octree.cpp:24
Definition Vector3D.h:12
Definition Archive.h:13