Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Sphere Class Reference

STK sphere class. More...

#include <Sphere.h>

List of all members.

Public Member Functions

 Sphere (double initRadius)
 Constructor taking an initial radius value.

 ~Sphere ()
 Class destructor.

void setPosition (double anX, double aY, double aZ)
 Set the 3D center position of the sphere.

void setVelocity (double anX, double aY, double aZ)
 Set the 3D velocity of the sphere.

void setRadius (double aRadius)
 Set the radius of the sphere.

void setMass (double aMass)
 Set the mass of the sphere.

Vector3DgetPosition ()
 Get the current position of the sphere as a 3D vector.

Vector3DgetRelativePosition (Vector3D *aPosition)
 Get the relative position of the given point to the sphere as a 3D vector.

double getVelocity (Vector3D *aVelocity)
 Set the velcoity of the sphere as a 3D vector.

double isInside (Vector3D *aPosition)
 Returns the distance from the sphere boundary to the given position (< 0 if inside).

double getRadius ()
 Get the current sphere radius.

double getMass ()
 Get the current sphere mass.

void addVelocity (double anX, double aY, double aZ)
 Increase the current sphere velocity by the given 3D components.

void tick (double timeIncrement)
 Move the sphere for the given time increment.


Detailed Description

STK sphere class.

This class implements a spherical ball with radius, mass, position, and velocity parameters.

by Perry R. Cook, 1995 - 2002.

Definition at line 17 of file Sphere.h.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.