Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
#include <Sphere.h>
Inheritance diagram for Sphere:
This class implements a spherical ball with radius, mass, position, and velocity parameters.
by Perry R. Cook, 1995 - 2004.
Public Member Functions | |
Sphere (StkFloat radius=1.0) | |
Constructor taking an initial radius value. | |
~Sphere () | |
Class destructor. | |
void | setPosition (StkFloat x, StkFloat y, StkFloat z) |
Set the 3D center position of the sphere. | |
void | setVelocity (StkFloat x, StkFloat y, StkFloat z) |
Set the 3D velocity of the sphere. | |
void | setRadius (StkFloat radius) |
Set the radius of the sphere. | |
void | setMass (StkFloat mass) |
Set the mass of the sphere. | |
Vector3D * | getPosition () |
Get the current position of the sphere as a 3D vector. | |
Vector3D * | getRelativePosition (Vector3D *position) |
Get the relative position of the given point to the sphere as a 3D vector. | |
StkFloat | getVelocity (Vector3D *velocity) |
Set the velcoity of the sphere as a 3D vector. | |
StkFloat | isInside (Vector3D *position) |
Returns the distance from the sphere boundary to the given position (< 0 if inside). | |
StkFloat | getRadius () |
Get the current sphere radius. | |
StkFloat | getMass () |
Get the current sphere mass. | |
void | addVelocity (StkFloat x, StkFloat y, StkFloat z) |
Increase the current sphere velocity by the given 3D components. | |
void | tick (StkFloat timeIncrement) |
Move the sphere for the given time increment. |
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |