Changeset 9932 in orxonox.OLD for branches/test/src/world_entities
- Timestamp:
 - Nov 14, 2006, 4:13:15 PM (19 years ago)
 - File:
 - 
          
- 1 edited
 
- 
          branches/test/src/world_entities/test_entity.cc (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
branches/test/src/world_entities/test_entity.cc
r9931 r9932 72 72 void TestEntity::init() 73 73 { 74 this->rtri = 0;75 76 74 this->registerObject(this, TestEntity::_objectList); 77 75 this->toList(OM_GROUP_01); … … 95 93 void TestEntity::tick (float time) 96 94 { 97 this->rtri += 2.0f;98 95 99 96 } … … 110 107 glMatrixMode(GL_MODELVIEW); 111 108 glDisable(GL_LIGHTING); 112 //glDisable(GL_BLEND); 113 /* Move the object */109 110 /* Move the object near the starting point of our spaceship*/ 114 111 glTranslatef(-1200.0f, 300.0f, 700.0f); 115 glRotatef(rtri, 0.0f, 1.0f, 0.0f);116 /* Rotate The Triangle On The Y axis */117 112 118 /* Drawing the Triangles4 */119 glBegin(GL_TRIANGLES); /* Drawing Using Triangles */120 glColor3f( 20, 0.0f, 0.0f); /* Red */121 glVertex3f( 0.0f, 20, 0.0f); /* Top Of Triangle (Front) */122 glColor3f( 0.0f, 20, 0.0f); /* Green */123 glVertex3f(-20, -20, 20); /* Left Of Triangle (Front) */124 glColor3f( 0.0f, 0.0f, 20); /* Blue */125 glVertex3f( 20, -20, 20); /* Right Of Triangle (Front) */126 113 127 glColor3f( 20, 0.0f, 0.0f); /* Red */128 glVertex3f( 0.0f, 20, 0.0f); /* Top Of Triangle (Right) */129 glColor3f( 0.0f, 0.0f, 20); /* Blue */130 glVertex3f( 20, -20, 20); /* Left Of Triangle (Right) */131 glColor3f( 0.0f, 20, 0.0f); /* Green */132 glVertex3f( 20, -20, -20); /* Right Of Triangle (Right) */133 114 134 glColor3f( 20, 0.0f, 0.0f); /* Red */135 glVertex3f( 0.0f, 20, 0.0f); /* Top Of Triangle (Back) */136 glColor3f( 0.0f, 20, 0.0f); /* Green */137 glVertex3f( 20, -20, -20); /* Left Of Triangle (Back) */138 glColor3f( 0.0f, 0.0f, 20); /* Blue */139 glVertex3f(-20, -20, -20); /* Right Of Triangle (Back) */140 115 141 glColor3f( 20, 0.0f, 0.0f); /* Red */ 142 glVertex3f( 0.0f, 20, 0.0f); /* Top Of Triangle (Left) */ 143 glColor3f( 0.0f, 0.0f, 20); /* Blue */ 144 glVertex3f(-20, -20, -20); /* Left Of Triangle (Left) */ 145 glColor3f( 0.0f, 20, 0.0f); /* Green */ 146 glVertex3f(-20, -20, 20); /* Right Of Triangle (Left) */ 147 glEnd(); /* Finished Drawing The Triangles */ 148 116 117 149 118 glPopAttrib(); 150 119 glPopMatrix();  
Note: See TracChangeset
          for help on using the changeset viewer.
      


            






