Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Sphere.h

00001 /***************************************************/
00010 /***************************************************/
00011 
00012 #if !defined(__SPHERE_H)
00013 #define __SPHERE_H
00014 
00015 #include "Vector3D.h"
00016 
00017 class Sphere
00018 {
00019 public:
00021   Sphere(double initRadius);
00022 
00024   ~Sphere();
00025 
00027   void setPosition(double anX, double aY, double aZ);
00028 
00030   void setVelocity(double anX, double aY, double aZ);
00031 
00033   void setRadius(double aRadius);
00034 
00036   void setMass(double aMass);
00037 
00039   Vector3D* getPosition();
00040 
00042   Vector3D* getRelativePosition(Vector3D *aPosition);
00043 
00045   double getVelocity(Vector3D* aVelocity);
00046 
00048   double isInside(Vector3D *aPosition);
00049 
00051   double getRadius();
00052 
00054   double getMass();
00055 
00057   void addVelocity(double anX, double aY, double aZ);
00058 
00060   void tick(double timeIncrement);
00061    
00062 private:
00063   Vector3D *myPosition;
00064   Vector3D *myVelocity;
00065   Vector3D workingVector;
00066   double myRadius;
00067   double myMass;
00068 };
00069 
00070 #endif

The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.