 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   24   Sphere( StkFloat radius = 1.0 ) { radius_ = radius; mass_ = 1.0; };
 
   33   void setRadius( StkFloat radius ) { radius_ = radius; };
 
   36   void setMass( StkFloat mass ) { mass_ = mass; };
 
   54   StkFloat 
getMass( 
void ) { 
return mass_; };
 
   57   void addVelocity( StkFloat x, StkFloat y, StkFloat z );
 
   60   void tick( StkFloat timeIncrement );
 
   72   position_.
setX(position_.
getX() + (timeIncrement * velocity_.
getX()));
 
   73   position_.
setY(position_.
getY() + (timeIncrement * velocity_.
getY()));
 
   74   position_.
setZ(position_.
getZ() + (timeIncrement * velocity_.
getZ()));
 
  
STK sphere class.
Definition: Sphere.h:20
void setMass(StkFloat mass)
Set the mass of the sphere.
Definition: Sphere.h:36
void setZ(StkFloat z)
Set the Z value.
Definition: Vector3D.h:48
StkFloat getMass(void)
Get the current sphere mass.
Definition: Sphere.h:54
StkFloat getVelocity(Vector3D *velocity)
Set the velocity of the sphere as a 3D vector.
void setPosition(StkFloat x, StkFloat y, StkFloat z)
Set the 3D center position of the sphere.
Definition: Sphere.h:27
Sphere(StkFloat radius=1.0)
Constructor taking an initial radius value.
Definition: Sphere.h:24
Vector3D * getRelativePosition(Vector3D *position)
Get the relative position of the given point to the sphere as a 3D vector.
StkFloat getZ(void)
Get the current Z value.
Definition: Vector3D.h:33
StkFloat getX(void)
Get the current X value.
Definition: Vector3D.h:27
Vector3D * getPosition(void)
Get the current position of the sphere as a 3D vector.
Definition: Sphere.h:39
void tick(StkFloat timeIncrement)
Move the sphere for the given time increment.
Definition: Sphere.h:70
void setVelocity(StkFloat x, StkFloat y, StkFloat z)
Set the 3D velocity of the sphere.
Definition: Sphere.h:30
void setRadius(StkFloat radius)
Set the radius of the sphere.
Definition: Sphere.h:33
void setXYZ(StkFloat x, StkFloat y, StkFloat z)
Set the X, Y, and Z values simultaniously.
Definition: Vector3D.h:39
void setY(StkFloat y)
Set the Y value.
Definition: Vector3D.h:45
void addVelocity(StkFloat x, StkFloat y, StkFloat z)
Increase the current sphere velocity by the given 3D components.
STK 3D vector class.
Definition: Vector3D.h:19
void setX(StkFloat x)
Set the X value.
Definition: Vector3D.h:42
The STK namespace.
Definition: ADSR.h:6
StkFloat getY(void)
Get the current Y value.
Definition: Vector3D.h:30
StkFloat getRadius(void)
Get the current sphere radius.
Definition: Sphere.h:51
StkFloat isInside(Vector3D *position)
Returns the distance from the sphere boundary to the given position (< 0 if inside).
STK base class.
Definition: Stk.h:132