#include <H3DNetworkingUtils/CollisionSphere.h>
Public Member Functions | |
CollisionSphere (H3D::Inst< Radius > _radius=0) | |
Constructor. | |
H3D::H3DFloat | getGlobalRadius () |
Get the radius in the global coord system. | |
virtual void | initialize () |
Initialize. | |
virtual CollisionGeometry * | clone () |
Return a clone of this node. | |
virtual void | copy (CollisionGeometry *newP) |
Copy contents into newP. | |
virtual bool | contains (const H3D::Vec3f &pt) |
Return true of the given point is contained within the sphere. | |
Public Attributes | |
auto_ptr< Radius > | radius |
Radius of the sphere access type: inputOutput basic type: SFFloat default value: 0.01. | |
auto_ptr< H3D::SFBool > | debug |
Debug: if true, the sphere is graphicially rendered, to assist in positioning it correctly access type: inputOutput basic type: SFBool default value: FALSE. | |
Static Public Attributes | |
static H3D::H3DNodeDatabase | database |
Database. |
CollidableSpheres can be constructed around a piece of geometry and used by a CollisionGroup to test for these collisions.
Examples:
void CollisionSphere::initialize | ( | ) | [virtual] |
Initialize.
scaled_trans = translation->getValue();
Reimplemented from H3DNetworkingUtils::CollisionGeometry.
Reimplemented in H3DNetworkingUtils::CollisionSphereHierarchy.
References debug, H3DNetworkingUtils::CollisionGeometry::initialize(), and radius.
Referenced by H3DNetworkingUtils::CollisionSphereHierarchy::initialize().