libmove3d
3.13.0
|
#include <gpKdTree.h>
Public Member Functions | |
gpKdTree () | |
Default onstructor of the class gpKdTree. | |
gpKdTree (std::list< class gpContact > &contactList) | |
int | build (std::list< class gpContact > &contactList) |
int | draw (unsigned int level) |
int | sphereIntersection (p3d_vector3 center, double radius, std::list< class gpContact > &points) |
unsigned int | depth () |
Friends | |
class | gpAABB |
A class for the Kd tree of a point set.
gpKdTree::gpKdTree | ( | std::list< class gpContact > & | contactList | ) |
Constructor of the class gpKdTree.
contactList | a list of contact (only their positions will be used to build the Kd tree) |
int gpKdTree::build | ( | std::list< class gpContact > & | contactList | ) |
Sets the input points of the tree and builds it.
contactList | a list of contact (only their positions will be used to build the Kd tree) |
int gpKdTree::draw | ( | unsigned int | level | ) |
Draws a gpKdTree at the given level.
level | the only AABB that will be displayed are the ones with a level less or equal than this parameter value |
int gpKdTree::sphereIntersection | ( | p3d_vector3 | center, |
double | radius, | ||
std::list< class gpContact > & | points | ||
) |
Finds all the points of the tree that are inside a sphere.
center | sphere center |
radius | sphere radius |
points | points that are inside the sphere |