libmove3d  3.13.0
Public Member Functions | Friends
gpKdTree Class Reference

#include <gpKdTree.h>

List of all members.

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

Detailed Description

A class for the Kd tree of a point set.


Constructor & Destructor Documentation

gpKdTree::gpKdTree ( std::list< class gpContact > &  contactList)

Constructor of the class gpKdTree.

Parameters:
contactLista list of contact (only their positions will be used to build the Kd tree)

Member Function Documentation

int gpKdTree::build ( std::list< class gpContact > &  contactList)

Sets the input points of the tree and builds it.

Parameters:
contactLista list of contact (only their positions will be used to build the Kd tree)
Returns:
GP_OK in case of success, GP_ERROR otherwise
int gpKdTree::draw ( unsigned int  level)

Draws a gpKdTree at the given level.

Parameters:
levelthe only AABB that will be displayed are the ones with a level less or equal than this parameter value
Returns:
GP_OK in case of success, GP_ERROR otherwise
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.

Parameters:
centersphere center
radiussphere radius
pointspoints that are inside the sphere
Returns:
GP_OK in case of success, GP_ERROR otherwise

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines