libmove3d
3.13.0
|
#include <gpKdTree.h>
Public Member Functions | |
gpAABB (gpKdTree *tree, std::list< unsigned int > &inner_points) | |
gpAABB (gpAABB *previous, std::list< unsigned int > &inner_points) | |
int | divide () |
int | draw (unsigned int level) |
int | sphereIntersection (p3d_vector3 center, double radius, std::list< class gpContact > &points) |
A class for Axis-Aligned Bounding Box of a point set. It is used in an associated Kd tree class.
gpAABB::gpAABB | ( | gpKdTree * | tree, |
std::list< unsigned int > & | inner_points | ||
) |
constructor for root AABB
Constructor for root gpAABB.
tree | pointer to the Kd tree, the AABB will belong to |
inner_points | list of the points the AABB must bound |
gpAABB::gpAABB | ( | gpAABB * | previous, |
std::list< unsigned int > & | inner_points | ||
) |
constructor for non root AABB
Constructor for non root gpAABB.
previous | pointer to the previous AABB in the tree |
inner_points | list of the points the AABB must bound |
int gpAABB::divide | ( | ) |
Divides an AABB along its larger dimension.
int gpAABB::draw | ( | unsigned int | level | ) |
int gpAABB::sphereIntersection | ( | p3d_vector3 | center, |
double | radius, | ||
std::list< class gpContact > & | points | ||
) |
Finds all the points belonging to the AABB that are inside a sphere.
center | sphere center |
radius | sphere radius |
points | points that are inside the sphere |