libmove3d  3.13.0
Public Member Functions
gpAABB Class Reference

#include <gpKdTree.h>

List of all members.

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)

Detailed Description

A class for Axis-Aligned Bounding Box of a point set. It is used in an associated Kd tree class.


Constructor & Destructor Documentation

gpAABB::gpAABB ( gpKdTree tree,
std::list< unsigned int > &  inner_points 
)

constructor for root AABB

Constructor for root gpAABB.

Parameters:
treepointer to the Kd tree, the AABB will belong to
inner_pointslist 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.

Parameters:
previouspointer to the previous AABB in the tree
inner_pointslist of the points the AABB must bound

Member Function Documentation

int gpAABB::divide ( )

Divides an AABB along its larger dimension.

Returns:
GP_OK in case of success, GP_ERROR otherwise
int gpAABB::draw ( unsigned int  level)

Draws a gpAABB, as a wire box, if its level is equal to the input value or if it is a leaf.

Parameters:
levelthe value to compare to the gpAABB level
Returns:
GP_OK in case of success, GP_ERROR otherwise
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.

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