Main Page   Class Hierarchy   Compound List   File List   Compound Members  

pointMass.hpp

00001 #ifndef weight_H
00002 #define weight_H
00003 
00004 
00005 #include "misc.hpp"
00006 
00007 #include <list>
00008 
00010 
00022 class pointMass
00023 {
00024 public:
00025 
00026         pointMass();
00027         pointMass(float DRAG);
00028         
00029         ~pointMass();
00030 
00031         float mass;
00032 
00034         vector3f force; 
00036         vector3f location;
00038         vector3f velocity;              
00040         vector3f newLocation;           
00041 
00042 
00044         void update(float seconds=1.0f);
00045 
00046 
00047         //vector3f *matchedVelocity;  //
00048 
00049         // Later there will be more that one possible thing to 
00050         // collide with, and an overarching system to test collisions
00051         // but for now just check with map.
00052         //surface *map;
00053 
00054         void collisionTest(void);
00055 
00056 
00058         std::list<void*> springs; 
00059 
00060         // primary constants
00061 
00062         float DRAG;
00063 
00065 
00067         static float planeTest( vector3f &location, vector3f &newLocation,
00068                                         vector3f &triangleVertex, vector3f &surfaceNorm );
00070         static float triangleTest(vector3f &intersection, 
00071                                         vector3f &tri1, vector3f &tri2, vector3f &tri3);
00072 
00073 private:
00074 
00075         void init();
00076 
00078         void collisionResponse(vector3f *intersection, vector3f *tri3, vector3f *surfaceNorm);
00079 };
00080 
00081 #endif
00082 

Generated on Sat May 10 10:09:36 2003 for volume-src-limited by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002