Changeset 10005 in orxonox.OLD for branches/playability/src
- Timestamp:
- Dec 3, 2006, 10:52:11 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
r10004 r10005 47 47 this->angle = 0; 48 48 this->rotationSpeed = 1000; 49 50 49 51 50 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 119 118 void HBolt::updateAngle (float time) 120 119 { 121 <<<<<<< .mine122 120 this->angle += this->rotationSpeed * time; 123 =======124 this->angle = this->angle + this->rotationSpeed * time;125 >>>>>>> .r10003126 121 } 127 122 … … 178 173 //this->updateAngle(); 179 174 180 <<<<<<< .mine181 //glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);182 //glRotatef(this->angle, 0.0, 0.0, -1.0);183 glTranslatef (this->getAbsCoor ().x,184 this->getAbsCoor ().y,185 this->getAbsCoor ().z);186 Vector tmpRot = this->getAbsDir().getSpacialAxis();187 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );188 glRotatef(this->angle, 0.0, 0.0, -1.0);189 =======190 175 //glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 191 176 //glRotatef(this->angle, 0.0, 0.0, -1.0); … … 196 181 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 197 182 glRotatef(this->angle, 0.0, 0.0, 1.0); 198 >>>>>>> .r10003199 183 this->getModel()->draw(); 200 184 glPopMatrix(); -
branches/playability/src/world_entities/test_entity2.cc
r10003 r10005 80 80 this->material = new Material(); 81 81 this->material->setIllum(3); 82 this->material->setDiffuse( 0.0,0.0,0.0);82 this->material->setDiffuse(1.0,1.0,1.0); 83 83 this->material->setSpecular(0.0,0.0,0.0); 84 this->material->setAmbient(1.0, 0.0, 1.0);84 this->material->setAmbient(1.0, 1.0, 1.0); 85 85 86 86 this->angle = 0; 87 87 this->rotationSpeed = 3; 88 88 89 this->material->setDiffuseMap("maps/ torp2.png");89 this->material->setDiffuseMap("maps/TE2.tga"); 90 90 } 91 91 … … 109 109 { 110 110 111 112 113 114 115 111 glPushAttrib(GL_ENABLE_BIT); 112 glDisable(GL_LIGHTING); 113 114 glPushMatrix(); 115 glMatrixMode(GL_MODELVIEW); 116 116 117 117 118 118 /* translate */ 119 119 glTranslatef (this->getAbsCoor ().x, 120 120 this->getAbsCoor ().y, 121 121 this->getAbsCoor ().z); 122 123 124 glRotatef(this->angle, 0.0, 0.0, -1.0);122 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 123 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 124 glRotatef(this->angle, 1.0, 1.0, 1.0); 125 125 //PRINTF(0)("axis: %f\n", axis); 126 126 127 127 128 glEnable(GL_TEXTURE_2D); 129 this->material->select(); 130 131 glColor3f(0.0, 1.0, 0.0); 132 133 glBindTexture( GL_TEXTURE_2D, 0 ); 128 glEnable(GL_TEXTURE_2D); 129 this->material->select(); 130 131 glColor3f(1.0, 1.0, 1.0); 134 132 135 133 glBegin(GL_QUADS); // +X 136 134 glTexCoord2f (0.0, 0.0); 137 135 glVertex3f( 0.0f, -0.5f, -0.5f); 138 glNormal3f(1.0, 0.0, 0.0);136 // glNormal3f(1.0, 0.0, 0.0); 139 137 140 138 glTexCoord2f (1.0, 0.0); 141 139 glVertex3f( 0.0f, -0.5f , 0.5f); 142 glNormal3f(1.0, 0.0, 0.0);140 // glNormal3f(1.0, 0.0, 0.0); 143 141 144 142 glTexCoord2f (1.0, 1.0); 145 143 glVertex3f( 0.0, 0.5f , 0.5f ); 146 glNormal3f(1.0, 0.0, 0.0);144 // glNormal3f(1.0, 0.0, 0.0); 147 145 148 146 149 147 glTexCoord2f (0.0, 1.0); 150 148 glVertex3f( 0.0, 0.5f, -0.5f ); 151 glNormal3f(1.0, 0.0, 0.0);149 // glNormal3f(1.0, 0.0, 0.0); 152 150 glEnd(); 153 151 … … 155 153 glTexCoord2f (0.0, 0.0); 156 154 glVertex3f(-0.5f, 0.0f, -0.5f); 157 glNormal3f(0.0, 1.0, 0.0);155 // glNormal3f(0.0, 1.0, 0.0); 158 156 159 157 glTexCoord2f (1.0, 0.0); 160 158 glVertex3f(-0.5f, 0.0f , 0.5f); 161 glNormal3f(0.0, 1.0, 0.0);159 // glNormal3f(0.0, 1.0, 0.0); 162 160 163 161 glTexCoord2f (1.0, 1.0); 164 162 glVertex3f( 0.5f, 0.0f , 0.5f ); 165 glNormal3f(0.0, 1.0, 0.0);163 // glNormal3f(0.0, 1.0, 0.0); 166 164 167 165 glTexCoord2f (0.0, 1.0); 168 166 glVertex3f( 0.5f, 0.0f, -0.5f ); 169 glNormal3f(0.0, 1.0, 0.0);167 // glNormal3f(0.0, 1.0, 0.0); 170 168 glEnd(); 171 169 … … 173 171 glTexCoord2f (0.0, 0.0); 174 172 glVertex3f(-0.5f, -0.5f, 0.0f); 175 glNormal3f(0.0, 0.0, 1.0);173 // glNormal3f(0.0, 0.0, 1.0); 176 174 177 175 glTexCoord2f (1.0, 0.0); 178 176 glVertex3f(-0.5f, 0.5f , 0.0f); 179 glNormal3f(0.0, 0.0, 1.0);177 // glNormal3f(0.0, 0.0, 1.0); 180 178 181 179 glTexCoord2f (1.0, 1.0); 182 180 glVertex3f( 0.5f, 0.5f , 0.0f ); 183 glNormal3f(0.0, 0.0, 1.0);181 // glNormal3f(0.0, 0.0, 1.0); 184 182 185 183 glTexCoord2f (0.0, 1.0); 186 184 glVertex3f( 0.5f, -0.5f, 0.0f ); 187 glNormal3f(0.0, 0.0, 1.0);188 glEnd(); 189 190 glBegin(GL_QUADS); 185 // glNormal3f(0.0, 0.0, 1.0); 186 glEnd(); 187 188 glBegin(GL_QUADS);// -X 191 189 glTexCoord2f (0.0, 0.0); 192 190 glVertex3f( 0.0f, -0.5f, -0.5f); 193 glNormal3f(-1.0, 0.0, 0.0);191 // glNormal3f(-1.0, 0.0, 0.0); 194 192 195 193 glTexCoord2f (1.0, 0.0); 196 194 glVertex3f( 0.0f, 0.5f , -0.5f); 197 glNormal3f(-1.0, 0.0, 0.0);195 // glNormal3f(-1.0, 0.0, 0.0); 198 196 199 197 glTexCoord2f (1.0, 1.0); 200 198 glVertex3f( 0.0, 0.5f , 0.5f ); 201 glNormal3f(-1.0, 0.0, 0.0);199 // glNormal3f(-1.0, 0.0, 0.0); 202 200 203 201 glTexCoord2f (0.0, 1.0); 204 202 glVertex3f( 0.0, -0.5f, 0.5f ); 205 glNormal3f(-1.0, 0.0, 0.0);206 glEnd(); 207 208 glBegin(GL_QUADS); 203 // glNormal3f(-1.0, 0.0, 0.0); 204 glEnd(); 205 206 glBegin(GL_QUADS);// -Y 209 207 glTexCoord2f (0.0, 0.0); 210 208 glVertex3f(-0.5f, 0.0f, -0.5f); 211 glNormal3f(0.0, -1.0, 0.0);209 // glNormal3f(0.0, -1.0, 0.0); 212 210 213 211 glTexCoord2f (1.0, 0.0); 214 212 glVertex3f(0.5f, 0.0f , -0.5f); 215 glNormal3f(0.0, -1.0, 0.0);213 // glNormal3f(0.0, -1.0, 0.0); 216 214 217 215 glTexCoord2f (1.0, 1.0); 218 216 glVertex3f( 0.5f, 0.0f , 0.5f ); 219 glNormal3f(0.0, -1.0, 0.0);217 // glNormal3f(0.0, -1.0, 0.0); 220 218 221 219 glTexCoord2f (0.0, 1.0); 222 220 glVertex3f( -0.5f, 0.0f, 0.5f ); 223 glNormal3f(0.0, -1.0, 0.0);224 glEnd(); 225 226 glBegin(GL_QUADS); 221 // glNormal3f(0.0, -1.0, 0.0); 222 glEnd(); 223 224 glBegin(GL_QUADS);// -Z 227 225 glTexCoord2f (0.0, 0.0); 228 226 glVertex3f(-0.5f, -0.5f, 0.0f); 229 glNormal3f(0.0, 0.0, -1.0);227 // glNormal3f(0.0, 0.0, -1.0); 230 228 231 229 glTexCoord2f (1.0, 0.0); 232 230 glVertex3f(0.5f, -0.5f , 0.0f); 233 glNormal3f(0.0, 0.0, -1.0);231 // glNormal3f(0.0, 0.0, -1.0); 234 232 235 233 glTexCoord2f (1.0, 1.0); 236 234 glVertex3f( 0.5f, 0.5f , 0.0f ); 237 glNormal3f(0.0, 0.0, -1.0);235 // glNormal3f(0.0, 0.0, -1.0); 238 236 239 237 glTexCoord2f (0.0, 1.0); 240 238 glVertex3f( -0.5f, 0.5f, 0.0f ); 241 glNormal3f(0.0, 0.0, -1.0);239 // glNormal3f(0.0, 0.0, -1.0); 242 240 glEnd(); 243 241
Note: See TracChangeset
for help on using the changeset viewer.