Panda3D
Public Member Functions | Public Attributes
PhysxSphere Class Reference

Represents a sphere defined by its center point and radius. More...

#include "physxSphere.h"

List of all members.

Public Member Functions

 PhysxSphere (const PhysxSphere &sphere)
bool contains (const LPoint3f &p) const
 Tests if a point is contained within the sphere.
bool contains (const PhysxSphere &sphere) const
 Tests if a sphere is contained within the sphere.
bool contains (const LPoint3f &min, const LPoint3f &max) const
 Tests if an axis aligned box is contained within the sphere.
LPoint3f get_center () const
 Returns the center of the sphere.
float get_radius () const
 Returns the sphere's radius.
bool intersect (const PhysxSphere &sphere) const
 Tests if the sphere intersects another sphere.
bool is_valid () const
 Returns TRUE if this sphere is valid.
void set_center (LPoint3f value)
 Sets the center of the sphere.
void set_radius (float value)
 Sets the sphere's radius.

Public Attributes

NxSphere _sphere

Detailed Description

Represents a sphere defined by its center point and radius.

Definition at line 28 of file physxSphere.h.


Member Function Documentation

bool PhysxSphere::contains ( const LPoint3f p) const

Tests if a point is contained within the sphere.

Definition at line 35 of file physxSphere.cxx.

References LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

bool PhysxSphere::contains ( const PhysxSphere sphere) const

Tests if a sphere is contained within the sphere.

Definition at line 48 of file physxSphere.cxx.

bool PhysxSphere::contains ( const LPoint3f min,
const LPoint3f max 
) const

Tests if an axis aligned box is contained within the sphere.

The axis aligned box is defined by the minimum corner and the maximum corner.

Definition at line 61 of file physxSphere.cxx.

References LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

Returns the center of the sphere.

Definition at line 88 of file physxSphere.cxx.

References PhysxManager::nxVec3_to_vec3().

float PhysxSphere::get_radius ( ) const

Returns the sphere's radius.

Definition at line 112 of file physxSphere.cxx.

bool PhysxSphere::intersect ( const PhysxSphere sphere) const

Tests if the sphere intersects another sphere.

Returns TRUE if the spheres overlap.

Definition at line 77 of file physxSphere.cxx.

bool PhysxSphere::is_valid ( ) const

Returns TRUE if this sphere is valid.

Definition at line 24 of file physxSphere.cxx.

Sets the center of the sphere.

Definition at line 99 of file physxSphere.cxx.

References LVecBase3f::is_nan(), and PhysxManager::vec3_to_nxVec3().

void PhysxSphere::set_radius ( float  value)

Sets the sphere's radius.

Definition at line 123 of file physxSphere.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations