Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 /***************************************************/ 00010 /***************************************************/ 00011 00012 #ifndef STK_SPHERE_H 00013 #define STK_SPHERE_H 00014 00015 #include "Stk.h" 00016 #include "Vector3D.h" 00017 00018 class Sphere : public Stk 00019 { 00020 public: 00022 Sphere(StkFloat radius = 1.0 ); 00023 00025 ~Sphere(); 00026 00028 void setPosition(StkFloat x, StkFloat y, StkFloat z); 00029 00031 void setVelocity(StkFloat x, StkFloat y, StkFloat z); 00032 00034 void setRadius(StkFloat radius); 00035 00037 void setMass(StkFloat mass); 00038 00040 Vector3D* getPosition(); 00041 00043 Vector3D* getRelativePosition(Vector3D *position); 00044 00046 StkFloat getVelocity(Vector3D* velocity); 00047 00049 StkFloat isInside(Vector3D *position); 00050 00052 StkFloat getRadius(); 00053 00055 StkFloat getMass(); 00056 00058 void addVelocity(StkFloat x, StkFloat y, StkFloat z); 00059 00061 void tick(StkFloat timeIncrement); 00062 00063 private: 00064 Vector3D position_; 00065 Vector3D velocity_; 00066 Vector3D workingVector_; 00067 StkFloat radius_; 00068 StkFloat mass_; 00069 }; 00070 00071 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |