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
6
namespace
Ult
7
{
8
12
class
OctreeNode
13
{
14
public
:
18
OctreeNode
();
22
~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
51
private
:
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
Vector3D.h
Ult::OctreeNode
Definition
Octree.h:13
Ult::OctreeNode::IsLeaf
bool IsLeaf() const
Definition
Octree.h:37
Ult::OctreeNode::GetCenter
Vector3D GetCenter() const
Definition
Octree.h:41
Ult::OctreeNode::GetSize
float GetSize() const
Definition
Octree.h:45
Ult::OctreeNode::CreateNode
void CreateNode(const Vector3D ¢er, const float bbSize, int currentLevel, int maxLevel)
Definition
Octree.cpp:34
Ult::OctreeNode::OctreeNode
OctreeNode()
Definition
Octree.cpp:15
Ult::OctreeNode::GetSubNodes
OctreeNode ** GetSubNodes()
Definition
Octree.h:49
Ult::OctreeNode::~OctreeNode
~OctreeNode()
Definition
Octree.cpp:24
Ult::Vector3D
Definition
Vector3D.h:12
Ult
Definition
Archive.h:13
include
Ult
Octree.h
Generated by
1.13.0