Changeset 9991 in orxonox.OLD for branches/playability/src
- Timestamp:
- Dec 3, 2006, 5:40:09 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/hbolt.cc
r9989 r9991 46 46 47 47 this->angle = 0; 48 this->rotationSpeed = 90;48 this->rotationSpeed = 3; 49 49 50 50 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 135 135 this->deactivate(); 136 136 137 //this->updateAngle();137 this->updateAngle(); 138 138 139 139 } … … 154 154 void HBolt::draw () //const 155 155 { 156 157 glBegin(GL_TRIANGLES);158 this->getModel();159 glEnd();160 161 156 glPushAttrib(GL_ENABLE_BIT); 162 157 glDisable(GL_LIGHTING); 163 158 164 //glPushMatrix();165 //glRotatef(30, 0.0f, 1.0f, 0.0f);166 167 //WorldEntity::draw();168 159 glMatrixMode(GL_MODELVIEW); 169 160 glPushMatrix(); … … 177 168 glPopMatrix();*/ 178 169 179 this->updateAngle();170 //this->updateAngle(); 180 171 181 float matrix[4][4];182 172 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 183 this->getAbsDir().matrix (matrix); 184 glMultMatrixf((float*)matrix); 185 glScalef(4.0, 4.0, 4.0); 186 glRotatef(this->getAngle(), 0.0, 1.0, 0.0); 187 this->getModel()->draw(); 173 glRotatef(this->angle, 0.0, 0.0, -1.0); 174 //this->getModel()->draw(); 175 WorldEntity::draw(); 188 176 glPopMatrix(); 189 177 glPopAttrib(); -
branches/playability/src/world_entities/test_entity2.cc
r9989 r9991 85 85 86 86 this->angle = 0; 87 this->rotationSpeed = 10;87 this->rotationSpeed = 3; 88 88 89 89 //this->material->setDiffuseMap("maps/torp2.png"); … … 122 122 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 123 123 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 124 124 glRotatef(this->angle, 0.0, 0.0, -1.0); 125 125 //PRINTF(0)("axis: %f\n", axis); 126 126 … … 240 240 glEnd(); 241 241 242 //this->angle += this->rotationSpeed;243 glRotatef(this->angle, 0.0, 1.0, 0.0);244 245 242 glPopMatrix(); 246 243 glPopAttrib();
Note: See TracChangeset
for help on using the changeset viewer.