# H3DNetworkingUtils::CollisionSphere Class Reference

The CollisiopnSphere class is a sphere which is used by a CollidableDynamic, to represent a portion of the geometry that can be tested for collisions against another sphere. More...

`#include <H3DNetworkingUtils/CollisionSphere.h>`

Inheritance diagram for H3DNetworkingUtils::CollisionSphere:

List of all members.

## 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.

## Detailed Description

The CollisiopnSphere class is a sphere which is used by a CollidableDynamic, to represent a portion of the geometry that can be tested for collisions against another sphere.

CollidableSpheres can be constructed around a piece of geometry and used by a CollisionGroup to test for these collisions.
Examples:

- CollisionGroupTest.x3d

## Member Function Documentation

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().

The documentation for this class was generated from the following files:

- CollisionSphere.h
- CollisionSphere.cpp