- Timestamp:
- Dec 31, 2004, 2:20:21 PM (20 years ago)
- Location:
- orxonox/branches/parenting/src
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/Makefile.am
r3310 r3311 31 31 null_parent.cc \ 32 32 base_object.cc \ 33 helper_parent.cc 33 helper_parent.cc \ 34 track_manager.cc 34 35 35 36 noinst_HEADERS = ability.h \ … … 68 69 null_parent.h \ 69 70 base_object.h \ 70 helper_parent.h 71 helper_parent.h \ 72 track_manager.h 71 73 72 74 -
orxonox/branches/parenting/src/Makefile.in
r3310 r3311 62 62 material.$(OBJEXT) list.$(OBJEXT) p_node.$(OBJEXT) \ 63 63 null_parent.$(OBJEXT) base_object.$(OBJEXT) \ 64 helper_parent.$(OBJEXT) 64 helper_parent.$(OBJEXT) track_manager.$(OBJEXT) 65 65 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 66 66 orxonox_LDADD = $(LDADD) … … 82 82 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \ 83 83 @AMDEP_TRUE@ ./$(DEPDIR)/player.Po ./$(DEPDIR)/story_entity.Po \ 84 @AMDEP_TRUE@ ./$(DEPDIR)/track.Po ./$(DEPDIR)/vector.Po \ 85 @AMDEP_TRUE@ ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po 84 @AMDEP_TRUE@ ./$(DEPDIR)/track.Po ./$(DEPDIR)/track_manager.Po \ 85 @AMDEP_TRUE@ ./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \ 86 @AMDEP_TRUE@ ./$(DEPDIR)/world_entity.Po 86 87 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 87 88 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 225 226 null_parent.cc \ 226 227 base_object.cc \ 227 helper_parent.cc 228 helper_parent.cc \ 229 track_manager.cc 228 230 229 231 noinst_HEADERS = ability.h \ … … 262 264 null_parent.h \ 263 265 base_object.h \ 264 helper_parent.h 266 helper_parent.h \ 267 track_manager.h 265 268 266 269 EXTRA_DIST = orxonox.conf … … 362 365 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@ 363 366 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track.Po@am__quote@ 367 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@ 364 368 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@ 365 369 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@ -
orxonox/branches/parenting/src/curve.cc
r3217 r3311 11 11 ### File Specific: 12 12 main-programmer: Benjamin Grauer 13 co-programmer: ... 13 co-programmer: Patrick Boenzli 14 15 ADD: Patrick Boenzli B-Spline 16 14 17 15 18 TODO: 16 19 local-Time implementation 17 closed Bezier Curve18 20 NURBS 19 21 -
orxonox/branches/parenting/src/curve.h
r3217 r3311 1 1 2 /*! 2 3 \file curve.h … … 57 58 }; 58 59 60 61 //! B-Spline 62 /** 63 class to handle b-spline in 3d space 64 */ 65 class BSplieCurve : public Curve 66 { 67 68 69 }; 70 71 59 72 int ncr(int n, int i); 60 73 -
orxonox/branches/parenting/src/null_parent.cc
r3306 r3311 22 22 using namespace std; 23 23 24 NullParent* NullParent::singletonRef = 0; 25 26 NullParent* NullParent::getInstance () 27 { 28 if( singletonRef == NULL) 29 singletonRef = new NullParent (); 30 return singletonRef; 31 } 24 32 25 33 /** … … 48 56 \todo this deconstructor is not jet implemented - do it 49 57 */ 50 NullParent::~NullParent () {} 58 NullParent::~NullParent () 59 { 60 delete singletonRef; 61 singletonRef = NULL; 62 } 51 63 52 64 -
orxonox/branches/parenting/src/null_parent.h
r3308 r3311 15 15 16 16 public: 17 static NullParent* getInstance (); 18 ~NullParent (); 19 20 static NullParent* singletonRef; 21 22 virtual void update (float timeStamp); 23 24 private: 17 25 NullParent (); 18 26 NullParent (Vector* absCoordinate); 19 ~NullParent ();20 21 virtual void update (float timeStamp);22 27 23 28 }; -
orxonox/branches/parenting/src/world.cc
r3309 r3311 25 25 #include "p_node.h" 26 26 #include "null_parent.h" 27 #include "helper_parent.h" 27 28 28 29 using namespace std; … … 84 85 } 85 86 87 GLfloat ctrlpoints[4][3] = { 88 {20.0, 10.0, 5.0}, {40.0, -10.0, 0.0}, 89 {60.0, -10.0, 5.0}, {80.0, 10.0, 5.0}}; 90 86 91 87 92 ErrorMessage World::init() … … 92 97 cn->enable(true); 93 98 94 /* this is only for test purposes */ 95 this->debug (); 96 } 99 glMap1f (GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]); 100 glEnable (GL_MAP1_VERTEX_3); 101 102 //theNurb = gluNewNurbsRenderer (); 103 //gluNurbsProperty (theNurb, GLU_NURBS_MODE, GLU_NURBS_TESSELLATOR); 104 //gluNurbsProperty (theNurb, GLU_NURBS_VERTEX, vertexCallback ); 105 } 106 107 97 108 98 109 ErrorMessage World::start() … … 124 135 125 136 } 137 138 139 126 140 127 141 void World::load() … … 139 153 case DEBUG_WORLD_0: 140 154 { 141 this->nullParent = new NullParent();155 this->nullParent = NullParent::getInstance (); 142 156 this->nullParent->setName ("NullParent"); 143 157 … … 160 174 // !\todo old track-system has to be removed 161 175 176 //create helper for player 177 HelperParent* hp = new HelperParent (); 178 /* the player has to be added to this helper */ 179 162 180 // create a player 163 WorldEntity* myPlayer = new Player ();181 WorldEntity* myPlayer = new Player (); 164 182 myPlayer->setName ("player"); 165 this->spawn (myPlayer);183 this->spawn (myPlayer); 166 184 this->localPlayer = myPlayer; 167 185 168 186 // bind input 169 Orxonox *orx = Orxonox::getInstance ();187 Orxonox *orx = Orxonox::getInstance (); 170 188 orx->getLocalInput()->bind (myPlayer); 171 189 … … 188 206 case DEBUG_WORLD_1: 189 207 { 190 this->nullParent = new NullParent (); 208 this->nullParent = NullParent::getInstance (); 209 this->nullParent->setName ("NullParent"); 191 210 192 211 // create some path nodes … … 199 218 this->pathnodes[5] = Vector(30, 50, 0); 200 219 220 221 222 201 223 // create the tracks 202 224 this->tracklen = 6; … … 400 422 //draw track 401 423 glBegin(GL_LINES); 402 glColor3f(0 ,1,1);424 glColor3f(0.0, 1.0, 1.0); 403 425 for( int i = 0; i < tracklen; i++) 404 426 { … … 407 429 } 408 430 glEnd(); 431 432 glBegin(GL_LINE_STRIP); 433 glColor3f(1.0, 5.0, 1.0); 434 for( int i = 0; i <= 30; i++) 435 { 436 glEvalCoord1f ((GLfloat) i/30.0); 437 } 438 glEnd(); 439 409 440 glEndList(); 410 441 } … … 470 501 // draw debug coord system 471 502 glCallList (objectList); 472 473 503 474 504 } … … 595 625 { 596 626 printf ("World::debug() - starting debug\n"); 597 PNode* p1 = new NullParent();627 PNode* p1 = NullParent::getInstance (); 598 628 PNode* p2 = new PNode (new Vector(2, 2, 2), p1); 599 629 PNode* p3 = new PNode (new Vector(4, 4, 4), p1); -
orxonox/branches/parenting/src/world.h
r3306 r3311 38 38 virtual void load (); 39 39 virtual void destroy (); 40 41 //static void vertexCallback (GLfloat* vertex); 40 42 41 43 void timeSlice (Uint32 deltaT);
Note: See TracChangeset
for help on using the changeset viewer.