- Main Page
- Modules
- Data Structures
- Files

# Sphere Class
[Collision Detection]

## Functions
ODE_API dGeomID | dCreateSphere (dSpaceID space, dReal radius)
| Create a sphere geom of the given radius, and return its ID.
ODE_API void | dGeomSphereSetRadius (dGeomID sphere, dReal radius)
| Set the radius of a sphere geom.
ODE_API dReal | dGeomSphereGetRadius (dGeomID sphere)
| Retrieves the radius of a sphere geom.
ODE_API dReal | dGeomSpherePointDepth (dGeomID sphere, dReal x, dReal y, dReal z)
| Calculate the depth of the a given point within a sphere.

## Function Documentation

ODE_API dGeomID dCreateSphere | ( | dSpaceID | space,
|  | dReal | radius
| ) |

  | Create a sphere geom of the given radius, and return its ID. Parameters:
  | space | a space to contain the new geom. May be null.
  | radius | the radius of the sphere.
Returns: A new sphere geom. Remarks: The point of reference for a sphere is its center. See also: dGeomDestroy dGeomSphereSetRadius

ODE_API dReal dGeomSphereGetRadius | ( | dGeomID | sphere | ) |

  | Retrieves the radius of a sphere geom. Parameters:
  | sphere | the sphere to query.
See also: dGeomSphereSetRadius

ODE_API dReal dGeomSpherePointDepth | ( | dGeomID | sphere,
|  | dReal | x,
|  | dReal | y,
|  | dReal | z
| ) |

  | Calculate the depth of the a given point within a sphere. Parameters:
  | sphere | the sphere to query.
  | x | the X coordinate of the point.
  | y | the Y coordinate of the point.
  | z | the Z coordinate of the point.
Returns: The depth of the point. Points inside the sphere will have a positive depth, points outside it will have a negative depth, and points on the surface will have a depth of zero.

ODE_API void dGeomSphereSetRadius | ( | dGeomID | sphere,
|  | dReal | radius
| ) |

  | Set the radius of a sphere geom. Parameters:
  | sphere | the sphere to set.
  | radius | the new radius.
See also: dGeomSphereGetRadius