geolib2
Public Member Functions | Protected Attributes | List of all members
geo::OctreeNode Class Reference

#include <OctreeNode.h>

Public Member Functions

void add (const Vector3 &p)
 
OctreeNodeclone (Octree *tree) const
 
bool contains (const Vector3 &p) const
 
void getCubes (std::vector< Box > &cubes, const Vector3 &offset) const
 
bool intersect (const Box &b) const
 
bool intersect (const Ray &r, float t0, float t1, double &distance, const Vector3 &offset) const
 
 OctreeNode (const OctreeNode &orig, Octree *tree)
 
 OctreeNode (double size, Octree *octree)
 
void raytrace (const Vector3 &o, const Vector3 &dir, float t0, float t1, const Vector3 &offset)
 
virtual ~OctreeNode ()
 

Protected Attributes

OctreeNodechildren_ [8]
 
bool occupied_
 
double size_
 
double split_
 
Octreetree_
 

Detailed Description

Definition at line 12 of file OctreeNode.h.

Constructor & Destructor Documentation

◆ OctreeNode() [1/2]

geo::OctreeNode::OctreeNode ( double  size,
Octree octree 
)

Definition at line 7 of file OctreeNode.cpp.

◆ OctreeNode() [2/2]

geo::OctreeNode::OctreeNode ( const OctreeNode orig,
Octree tree 
)

Definition at line 14 of file OctreeNode.cpp.

◆ ~OctreeNode()

geo::OctreeNode::~OctreeNode ( )
virtual

Definition at line 25 of file OctreeNode.cpp.

Member Function Documentation

◆ add()

void geo::OctreeNode::add ( const Vector3 p)

Definition at line 31 of file OctreeNode.cpp.

◆ clone()

OctreeNode* geo::OctreeNode::clone ( Octree tree) const

◆ contains()

bool geo::OctreeNode::contains ( const Vector3 p) const

Definition at line 150 of file OctreeNode.cpp.

◆ getCubes()

void geo::OctreeNode::getCubes ( std::vector< Box > &  cubes,
const Vector3 offset 
) const

Definition at line 55 of file OctreeNode.cpp.

◆ intersect() [1/2]

bool geo::OctreeNode::intersect ( const Box b) const

Definition at line 172 of file OctreeNode.cpp.

◆ intersect() [2/2]

bool geo::OctreeNode::intersect ( const Ray r,
float  t0,
float  t1,
double &  distance,
const Vector3 offset 
) const

Definition at line 74 of file OctreeNode.cpp.

◆ raytrace()

void geo::OctreeNode::raytrace ( const Vector3 o,
const Vector3 dir,
float  t0,
float  t1,
const Vector3 offset 
)

Definition at line 116 of file OctreeNode.cpp.

Member Data Documentation

◆ children_

OctreeNode* geo::OctreeNode::children_[8]
protected

Definition at line 42 of file OctreeNode.h.

◆ occupied_

bool geo::OctreeNode::occupied_
protected

Definition at line 44 of file OctreeNode.h.

◆ size_

double geo::OctreeNode::size_
protected

Definition at line 38 of file OctreeNode.h.

◆ split_

double geo::OctreeNode::split_
protected

Definition at line 40 of file OctreeNode.h.

◆ tree_

Octree* geo::OctreeNode::tree_
protected

Definition at line 46 of file OctreeNode.h.


The documentation for this class was generated from the following files: