Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

/home/rdbrown/doxygen/cse125g1/src/modules/arrows/Arrows.h

00001 #ifndef ARROWS_H
00002 #define ARROWS_H
00003 
00004 #include "math/matrix34.h"
00005 #include "math/vector3.h"
00006 #include "sceneManagement/sceneObject.h"
00007 #include "net/MMNet.h"
00008 #include "net/NetArrow.h"
00009 
00010 void setFlyingArrowSound(unsigned int sname);
00011 
00012 class Arrow : public SceneObject {
00013         // for sounds
00014         signed char sourceno;
00015 public:
00016         float Mass;             // Constant
00017         int TimeToLive;
00018         Vector3 Position;       // Evolves frame to frame
00019         Vector3 LastPosition;   // Evolves frame to frame
00020         Vector3 Velocity;       // Evolves frame to frame
00021         Vector3 Force;  // Reset and re-computed each frame
00022         Vector3 Normal;
00023         Vector3 Color;
00024         MMNet::NetArrow *netArrow;
00025         bool immuneToForces;
00026 
00027         Arrow() : sourceno(-1) { }
00028         void update(float deltaTime);
00029         void ReverseUpdate(float deltaTime);
00030         //void Draw();
00031         void ApplyForce(Vector3 f)      {Force.Add(f);}
00032         void Init(MMNet::Game *game, MMNet::NetArrow *na, float r, float g, float b);
00033         int objectType() {return arrow;}
00034         void init() {}
00035         void draw();
00036         //void update(float f) {Update(f);}
00037         const Vector3 & getPos() const {return netArrow->getPos();};
00038         float Arrow::getSquaredDistanceFromPlayer(void) const;
00039         const float getTop() const;
00040         const float getBottom() const;
00041         const float getRadius() const;
00042 };
00043 
00044 
00045 
00046 class ArrowSystem {
00047 private:
00048         int showGround;
00049         float Mass;
00050         bool ArrowShowerOn;
00051         float GroundY;
00052         Vector3 gravity;
00053 public:
00054 
00055         int NumArrows;
00056         Arrow *P;
00057         void DrawTarget(Vector3 pos, const Vector3 &vel, TNL::U32 chargeTime);
00058 
00059 
00060 };
00061 
00062 #endif

Generated on Thu Aug 18 16:03:09 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18