/[enigma]/enigma/src/world.hh
ViewVC logotype

Diff of /enigma/src/world.hh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by reallysoft, Mon Jul 21 08:21:35 2003 UTC revision 1.33 by dheck, Tue Aug 12 18:28:05 2003 UTC
# Line 49  namespace world Line 49  namespace world
49      class ActorInfo {      class ActorInfo {
50      public:      public:
51          ActorInfo(V2 p, V2 v)          ActorInfo(V2 p, V2 v)
52              : pos(p), oldpos(p), vel(v), oldvel(v),          : pos(p), vel(v), forceacc(),
53                forceacc(),            charge(0), mass(1), radius(1),
54                charge(0), mass(1), radius(1),            grabbed(false),
55                grabbed(false)            last_pos(), oldpos(), oldvel(v), force()
56          {}          {}
57    
58          V2 pos, oldpos;         // Absolute position          //
59          V2 vel, oldvel;         // Velocity          // Public variables
60            //
61            V2 pos;                 // Absolute position
62            V2 vel;                 // Velocity
63          V2 forceacc;            // Force accumulator          V2 forceacc;            // Force accumulator
         V2 forceacc2;  
64          double charge;          // Electric charge          double charge;          // Electric charge
65          double mass;            // Mass          double mass;            // Mass
66          double radius;          // Radius of the sphere          double radius;          // Radius of the sphere
67          bool grabbed;           // Actor not controlled by the physics engine          bool grabbed;           // Actor not controlled by the physics engine
68    
69            //
70            // Variables used internally by the physics engine
71            //
72            V2 last_pos;            // Position befure current tick
73            V2 oldpos;              // Backup position for adaptive stepsize control
74            V2 oldvel;              // Backup velocity (see oldpos)
75            V2 force;               // Force used during tick
76      };      };
77    
78      /*      /*
# Line 104  namespace world Line 114  namespace world
114          GridPos         stonepos;          GridPos         stonepos;
115          StoneResponse   response;          StoneResponse   response;
116    
117          V2      contact_point;  // where do the shapes meet? (world coords)          V2      contact_point;  // Where do the shapes meet? (world coords)
118          V2      normal;         // the surface normal at the contact point          V2      normal;         // The surface normal at the contact point
119          bool    is_collision;   // actor moves towards the stone, not away          bool    is_collision;   // Actor moves towards the stone, not away
120          bool    fake_collision;          bool    fake_collision;
121          bool    is_contact;          bool    new_collision;  // True if actor did not touch the stone before
122            bool    is_contact;     // if false, contact_point is actually closest feature
123          std::string sound;          std::string sound;
124      };      };
125    
# Line 256  namespace world Line 267  namespace world
267      void SwapStones (GridPos p, GridPos newp);      void SwapStones (GridPos p, GridPos newp);
268      void MoveStone(GridPos oldPos, GridPos newPos);      void MoveStone(GridPos oldPos, GridPos newPos);
269    
270      // puzzle stone scrambling      // Puzzle stone scrambling
271    
272      void SetScrambleIntensity(int intensity);      void SetScrambleIntensity(int intensity);
273      void AddScramble(GridPos p, Direction d);      void AddScramble(GridPos p, Direction d);

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26