Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3374 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Jan 8, 2005, 12:04:19 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/trackManager: deleted old track-system

Location:
orxonox/branches/trackManager/src
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/trackManager/src/Makefile.am

    r3369 r3374  
    1818                 ini_parser.cc \
    1919                 keynames.cc \
    20                  track.cc \
    2120                 base_entity.cc \
    2221                 game_loader.cc \
     
    5150                 error.h \
    5251                 player.h \
    53                  track.h \
    5452                 camera.h \
    5553                 ini_parser.h \
  • orxonox/branches/trackManager/src/Makefile.in

    r3369 r3374  
    5757        world_entity.$(OBJEXT) vector.$(OBJEXT) camera.$(OBJEXT) \
    5858        command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
    59         track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
    60         campaign.$(OBJEXT) story_entity.$(OBJEXT) \
    61         environment.$(OBJEXT) model.$(OBJEXT) array.$(OBJEXT) \
    62         material.$(OBJEXT) texture.$(OBJEXT) list.$(OBJEXT) \
    63         p_node.$(OBJEXT) null_parent.$(OBJEXT) base_object.$(OBJEXT) \
    64         helper_parent.$(OBJEXT) track_manager.$(OBJEXT) \
    65         matrix.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
     59        base_entity.$(OBJEXT) game_loader.$(OBJEXT) campaign.$(OBJEXT) \
     60        story_entity.$(OBJEXT) environment.$(OBJEXT) model.$(OBJEXT) \
     61        array.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
     62        list.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) \
     63        base_object.$(OBJEXT) helper_parent.$(OBJEXT) \
     64        track_manager.$(OBJEXT) matrix.$(OBJEXT) curve.$(OBJEXT) \
     65        glmenu_imagescreen.$(OBJEXT)
    6666orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    6767orxonox_LDADD = $(LDADD)
     
    8585@AMDEP_TRUE@    ./$(DEPDIR)/p_node.Po ./$(DEPDIR)/player.Po \
    8686@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/texture.Po \
    87 @AMDEP_TRUE@    ./$(DEPDIR)/track.Po ./$(DEPDIR)/track_manager.Po \
    88 @AMDEP_TRUE@    ./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
    89 @AMDEP_TRUE@    ./$(DEPDIR)/world_entity.Po
     87@AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \
     88@AMDEP_TRUE@    ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
    9089CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    9190        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    216215                 ini_parser.cc \
    217216                 keynames.cc \
    218                  track.cc \
    219217                 base_entity.cc \
    220218                 game_loader.cc \
     
    248246                 error.h \
    249247                 player.h \
    250                  track.h \
    251248                 camera.h \
    252249                 ini_parser.h \
     
    377374@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
    378375@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
    379 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track.Po@am__quote@
    380376@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
    381377@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
  • orxonox/branches/trackManager/src/curve.cc

    r3369 r3374  
    142142
    143143  // rebuilding the Derivation curve
    144   if(this->derivation == 0)
     144  if(this->derivation <= 1)
    145145    {
    146146      tmpNode = firstNode;
     
    202202}
    203203
     204Vector BezierCurve::calcAcc (float t)
     205{
     206  return dirCurve->dirCurve->calcPos(t);
     207}
     208
    204209/**
    205210   \brief Calculates the Quaternion needed for our rotations
     
    374379}
    375380
     381Vector UPointCurve::calcAcc (float t)
     382{
     383}
     384
    376385/**
    377386   \brief Calculates the Quaternion needed for our rotations
  • orxonox/branches/trackManager/src/curve.h

    r3369 r3374  
    2323  Vector curvePoint;     //!< The point on the Cureve at a local Time.
    2424  float localTime;       //!< If the time of one point is asked more than once the programm will not calculate it again.
    25   Curve* dirCurve;       //!< The derivation-curve of this Curve.
    2625  int derivation;        //!< Which derivation of a Curve is this.
    2726
     
    4241  virtual void rebuild(void) = 0;
    4342 public:
     43  Curve* dirCurve;       //!< The derivation-curve of this Curve.
    4444  void addNode(const Vector& newNode);
    4545  Vector getNode(unsigned int nodeToFind);
     
    4848  virtual Vector calcPos(float t) = 0;
    4949  virtual Vector calcDir(float t) = 0;
     50  virtual Vector calcAcc(float t) = 0;
    5051  virtual Quaternion calcQuat(float t) = 0;
    5152 
     
    6970  Vector calcPos(float t);
    7071  Vector calcDir(float t);
     72  Vector calcAcc(float t);
    7173  Quaternion calcQuat(float t);
    7274 
     
    105107  Vector calcPos(float t);
    106108  Vector calcDir(float t);
     109  Vector calcAcc(float t);
    107110  Quaternion calcQuat(float t);
    108111 
  • orxonox/branches/trackManager/src/environment.cc

    r3372 r3374  
    2929Environment::Environment () : WorldEntity()
    3030{
    31   this->model = new Model("reaplow.obj");
     31  this->model = new Model("fighter.obj", .3);
    3232}
    3333
  • orxonox/branches/trackManager/src/game_loader.cc

    r3225 r3374  
    2525#include "command_node.h"
    2626#include "vector.h"
    27 #include "track.h"
    2827
    2928#include <string.h>
  • orxonox/branches/trackManager/src/track_manager.cc

    r3373 r3374  
    466466    {
    467467      Vector tmp = this->calcPos();
    468       Quaternion quat = Quaternion(this->calcDir(), Vector(0,1,0));
     468      Quaternion quat = Quaternion(this->calcDir(), Vector(0,1,this->currentTrackElem->curve->calcAcc((localTime-this->currentTrackElem->startingTime)/this->currentTrackElem->duration).z));
    469469      this->bindSlave->setAbsCoor(&tmp);
    470470      this->bindSlave->setAbsDir(&quat);
  • orxonox/branches/trackManager/src/world.cc

    r3373 r3374  
    1919#include "collision.h"
    2020#include "track_manager.h"
    21 #include "track.h"
    2221#include "player.h"
    2322#include "command_node.h"
     
    250249            this->nullParent->setName ("NullParent");
    251250
    252             // create some path nodes
    253             this->pathnodes = new Vector[6];
    254             this->pathnodes[0] = Vector(0, 0, 0);
    255             this->pathnodes[1] = Vector(1000, 0, 0);
    256             //      this->pathnodes[2] = Vector(-100, 140, 0);
    257             //      this->pathnodes[3] = Vector(0, 180, 0);
    258             //      this->pathnodes[4] = Vector(100, 140, 0);
    259             //      this->pathnodes[5] = Vector(100, 40, 0);
    260            
    261             // create the tracks
    262             this->tracklen = 2;
    263             this->track = new Track[2];
    264             for( int i = 0; i < this->tracklen; i++)
    265               {
    266                 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
    267               }
    268251            // !\todo old track-system has to be removed
    269252
     
    323306
    324307
    325 
    326             // create the tracks
    327             this->tracklen = 6;
    328             this->track = new Track[6];
    329             for( int i = 0; i < this->tracklen; i++)
    330               {
    331                 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
    332               }
    333308
    334309            // create a player
     
    522497    }
    523498  */ 
    524   //draw track
    525   glBegin(GL_LINES);
    526   glColor3f(0.0, 1.0, 1.0);
    527   for( int i = 0; i < tracklen; i++)
    528     {
    529       glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z);
    530       glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z);
    531     }
    532   glEnd();
    533  
    534499  /*
    535500  glBegin(GL_LINE_STRIP);
     
    710675void World::unload()
    711676{
    712   if( pathnodes) delete []pathnodes;
    713   if( track) delete []pathnodes;
    714 }
    715 
    716 
    717 void World::setTrackLen(Uint32 len)
    718 {
    719   this->tracklen = len;
    720 }
    721 
    722 int World::getTrackLen()
    723 {
    724   return this->tracklen;
    725 }
    726 
     677
     678}
    727679
    728680
  • orxonox/branches/trackManager/src/world.h

    r3369 r3374  
    1212
    1313class TrackManager;
    14 class Track;
    1514class WorldEntity;
    1615class Camera;
     
    4847  virtual void releaseLoadScreen();
    4948 
    50   void setTrackLen (Uint32 tracklen);
    51   int getTrackLen ();
    5249  //bool system_command (Command* cmd);
    5350  Camera* getCamera ();
     
    6057  // base level data
    6158  TrackManager* trackManager;
    62   Track* track;
    63   Uint32 tracklen;   // number of Tracks the World consist of
    6459  Vector* pathnodes;
    6560  Camera* localCamera; 
Note: See TracChangeset for help on using the changeset viewer.