Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3236 in orxonox.OLD


Ignore:
Timestamp:
Dec 20, 2004, 1:39:51 AM (19 years ago)
Author:
patrick
Message:

/orxonox/trunk: unstable - problems getting collision to compile

Location:
orxonox/trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/Makefile.am

    r3203 r3236  
    1010                 world.cc \
    1111                 player.cc \
     12                 collision.cc \
    1213                 data_tank.cc \
    1314                 world_entity.cc \
    1415                 vector.cc \
    1516                 camera.cc \
    16                  collision.cc \
    1717                 command_node.cc \
    1818                 ini_parser.cc \
     
    3131noinst_HEADERS = ability.h \
    3232                 data_tank.h \
     33                 collision.h \
    3334                 npc.h \
    3435                 stdincl.h \
     
    4546                 power_up.h \
    4647                 vector.h \
    47                  collision.h \
    4848                 keynames.h \
    4949                 proto_class.h \
  • orxonox/trunk/src/Makefile.in

    r3219 r3236  
    5454PROGRAMS = $(bin_PROGRAMS)
    5555am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \
    56         player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \
    57         vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \
     56        player.$(OBJEXT) collision.$(OBJEXT) data_tank.$(OBJEXT) \
     57        world_entity.$(OBJEXT) vector.$(OBJEXT) camera.$(OBJEXT) \
    5858        command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
    5959        track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
     
    117117DEFS = @DEFS@
    118118DEPDIR = @DEPDIR@
    119 DOXYGEN = @DOXYGEN@
    120 DOXYGEN_FALSE = @DOXYGEN_FALSE@
    121 DOXYGEN_TRUE = @DOXYGEN_TRUE@
    122119ECHO_C = @ECHO_C@
    123120ECHO_N = @ECHO_N@
     
    199196                 world.cc \
    200197                 player.cc \
     198                 collision.cc \
    201199                 data_tank.cc \
    202200                 world_entity.cc \
    203201                 vector.cc \
    204202                 camera.cc \
    205                  collision.cc \
    206203                 command_node.cc \
    207204                 ini_parser.cc \
     
    220217noinst_HEADERS = ability.h \
    221218                 data_tank.h \
     219                 collision.h \
    222220                 npc.h \
    223221                 stdincl.h \
     
    234232                 power_up.h \
    235233                 vector.h \
    236                  collision.h \
    237234                 keynames.h \
    238235                 proto_class.h \
  • orxonox/trunk/src/camera.cc

    r3228 r3236  
    4242  this->t = 0.0;
    4343
    44   this->actual_place.r.x = 0.0;
    45   this->actual_place.r.y = 10.0;
    46   this->actual_place.r.z = -5.0;
     44  this->actualPlace.r.x = 0.0;
     45  this->actualPlace.r.y = 10.0;
     46  this->actualPlace.r.z = -5.0;
    4747}
    4848
     
    6666    {this->t += deltaT;}
    6767  //printf("time is: t=%f\n", t );
    68   update_desired_place();
     68  updateDesiredPlace();
    6969  jump(NULL);
    7070}
     
    8989        if( bound != NULL)
    9090          {
    91             bound->get_lookat (&lookat);
     91            bound->getLookat (&lookat);
    9292            orx->getWorld()->calcCameraPos (&lookat, &plFocus);
    9393            Quaternion *fr;
     
    169169        if(bound != null)
    170170          {
    171             Placement *plBound = bound->get_placement();
     171            Placement *plBound = bound->getPlacement();
    172172            Vector vDirection(0.0, 0.0, 1.0);
    173173            Vector eclipticOffset(0.0, 0.0, 5.0);
     
    237237  // rotation
    238238  float matrix[4][4];
    239   actual_place.w.conjugate().matrix (matrix);
     239  actualPlace.w.conjugate().matrix (matrix);
    240240  /* orientation and */
    241241  glMultMatrixf ((float*)matrix);
    242242  /*  translation */
    243   glTranslatef (-actual_place.r.x, -actual_place.r.y,- actual_place.r.z);
     243  glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z);
    244244//Placement *plBound = bound->get_placement();
    245245
  • orxonox/trunk/src/camera.h

    r3228 r3236  
    2626 private:
    2727  WorldEntity* bound;           //!< the WorldEntity the Camera is bound to
    28   Placement actual_place;               //!< the Camera's current position
     28  Placement actualPlace;                //!< the Camera's current position
    2929  Placement desiredPlace;        //!< where the Camera should be according to calculations
    3030  World* world;
  • orxonox/trunk/src/command_node.cc

    r3225 r3236  
    5454  this->bEnabled = true;
    5555  this->world = NULL;
    56   this->load_bindings (filename);
     56  this->loadBindings (filename);
    5757}
    5858
     
    139139  int* index;
    140140 
    141   while( parser.next_var (namebuf, valuebuf) != -1)
    142     {
    143       index = name_to_index (namebuf);
     141  while( parser.nextVar (namebuf, valuebuf) != -1)
     142    {
     143      index = nameToIndex (namebuf);
    144144      switch( index[0])
    145145        {
     
    208208}
    209209
    210 void CommandNode::process_local ()
     210void CommandNode::processLocal ()
    211211{
    212212  SDL_Event event;
  • orxonox/trunk/src/command_node.h

    r3225 r3236  
    6161  void reset ();
    6262  void enable (bool bEnabled);
    63   void load_bindings (char* filename);
     63  void loadBindings (char* filename);
    6464  void bind (WorldEntity* entity);
    6565  void unbind (WorldEntity* entity);
  • orxonox/trunk/src/environment.cc

    r3194 r3236  
    7171  float matrix[4][4];
    7272 
    73   glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z);
    74   get_placement()->w.matrix (matrix);
     73  glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z);
     74  getPlacement()->w.matrix (matrix);
    7575  glMultMatrixf ((float*)matrix);
    7676
  • orxonox/trunk/src/player.h

    r3227 r3236  
    1919  ~Player();
    2020 
    21   virtual void post_spawn();
     21  virtual void postSpawn();
    2222  virtual void tick(float time);
    2323  virtual void hit(WorldEntity* weapon, Vector loc);
  • orxonox/trunk/src/world.h

    r3226 r3236  
    8585};
    8686
    87 /**
    88     \brief spawn a new WorldEntity at a Location
    89     \param loc: the Location where the Entity should be spawned
    90     \param owner: a pointer to the parent of the Entity
    91     \return a pointer to the new WorldEntity or NULL if there was an error
    92    
    93     You can use this function to spawn any derivation of WorldEntity you want, just specify the desired
    94     class within the template specification brackets. Do not attempt to spawn any classes that have NOT been
    95     derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()
    96     works with both free and bound WorldEntities.
    97 */
    98 template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL)
    99 {
    100   Location zeroloc;
    101   T* entity = new T();
    102   entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
    103   if( loc == NULL)
    104     {
    105       zeroloc.dist = 0;
    106       zeroloc.part = 0;
    107       zeroloc.pos = Vector();
    108       zeroloc.rot = Quaternion();
    109       loc = &zeroloc;
    110     }
    111   entity->init (loc, owner);
    112   if (entity->bFree)
    113     {
    114       track[loc->part].map_coords( loc, entity->get_placement());
    115     }
    116   entity->post_spawn ();
    117   return entity;
    118 }
    119 
    120 /**
    121     \brief spawn a new WorldEntity at a Placement
    122     \param lplc: the placement where the Entity should be spawned
    123     \param owner: a pointer to the parent of the Entity
    124     \return a pointer to the new WorldEntity or NULL if there was an error
    125    
    126     You can use this function to spawn any FREE derivation of WorldEntity you want, just specify the desired
    127     class within the template specification brackets. Do not attempt to spawn any classes that have NOT been
    128     derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()
    129     works with free WorldEntities only, you will provoke an error message if you try to spawn a bound Entity with
    130     a Placement.
    131 */
    132 template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL)
    133 {
    134   T* entity = new T();
    135   entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
    136   entity->init (plc, owner);
    137   if (!entity->bFree)
    138     {
    139       printf("Can't spawn unfree entity with placement\n");
    140       entities->remove( (WorldEntity*)entity, LIST_FIND_FW);
    141       return NULL;
    142     }
    143   entity->post_spawn ();
    144   return entity;
    145 }
    146 
    14787#endif /* _WORLD_H */
Note: See TracChangeset for help on using the changeset viewer.