cCollisionSpheresSphere Class Reference

cCollisionSpheresSphere is an abstract class for nodes of the collision sphere tree. More...

#include <CCollisionSpheres.h>

Inheritance diagram for cCollisionSpheresSphere:

cCollisionSpheresLeaf cCollisionSpheresNode List of all members.

Public Member Functions

 cCollisionSpheresSphere (cCollisionSpheresSphere *a_parent)
 Constructor of cCollisionSpheresSphere.
 cCollisionSpheresSphere ()
 Default constructor of cCollisionSpheresSphere.
virtual ~cCollisionSpheresSphere ()
 Destructor of cCollisionsSpheresSphere.
const cVector3dgetCenter ()
 Return the center of the sphere.
double getRadius ()
 Return the radius of the sphere.
virtual int isLeaf ()=0
 Return whether the node is a leaf node.
virtual void draw (int a_depth=-1)=0
 Draw the collision sphere for this node, if at the given depth.

Static Public Member Functions

static bool computeCollision (cCollisionSpheresSphere *a_sa, cGenericObject *&a_colObject, cTriangle *&a_colTriangle, cVector3d &a_colPoint, double &a_colSquareDistance, cCollisionSpheresSphere *a_sb)
 Calculate the distance between the two given collision spheres.

Public Attributes

cCollisionSpheresSpherem_parent
 The parent of the node in the tree.
cVector3d m_center
 The center of the node.
double m_radius
 The radius of the node.
int m_depth
 The depth of this node in the collision tree.

Friends

class cCollisionSpheresNode
 Internal nodes of the collision sphere tree.
class cCollisionSpheresLeaf
 Leaf nodes of the collision sphere tree.

Detailed Description

cCollisionSpheresSphere is an abstract class for nodes of the collision sphere tree.


Constructor & Destructor Documentation

cCollisionSpheresSphere::cCollisionSpheresSphere ( cCollisionSpheresSphere a_parent  ) 

Constructor of cCollisionSpheresSphere.

Constructor of cCollisionSpheresSphere.

Parameters:
a_parent Pointer to parent of this node in the sphere tree.
Returns:
Return a pointer to new cCollisionSpheresSphere instance.


Member Function Documentation

bool cCollisionSpheresSphere::computeCollision ( cCollisionSpheresSphere a_sa,
cGenericObject *&  a_colObject,
cTriangle *&  a_colTriangle,
cVector3d a_colPoint,
double &  a_colSquareDistance,
cCollisionSpheresSphere a_sb 
) [static]

Calculate the distance between the two given collision spheres.

Determine whether there is any intersection between the primitives (line and triangles) in the collision subtrees rooted at the two given collision spheres.

Parameters:
a_sa The root of one sphere tree to check for collision.
a_colObject Returns pointer to nearest collided object.
a_colTriangle Returns pointer to nearest colided triangle.
a_colPoint Returns position of nearest collision.
a_colSquareDistance Returns distance between ray origin and collision point.
a_sb Root of other sphere tree to check for collision.
Returns:
Return whether any primitives within the two sphere trees collide.


The documentation for this class was generated from the following files:
Generated on Mon Jun 11 09:41:47 2007 for CHAI 3D by  doxygen 1.5.2