Changeset 5000 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Aug 13, 2005, 9:07:56 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/camera.cc
r4998 r5000 142 142 case VIEW_FRONT: 143 143 this->toFovy = 120.0; 144 //this->softReparent("Player");145 //this->target->softReparent("Player");146 //this->setRelCoorSoft(4, 0, 0);147 //this->target->setRelCoorSoft(10,0,0);148 this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0)));144 this->softReparent("Player"); 145 this->target->softReparent("Player"); 146 this->setRelCoorSoft(4, 0, 0); 147 this->target->setRelCoorSoft(10,0,0); 148 //this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0))); 149 149 break; 150 150 case VIEW_LEFT: -
orxonox/trunk/src/world_entities/player.cc
r4998 r5000 121 121 void Player::init() 122 122 { 123 this->setAbsDir(0,1,0);123 // this->setAbsDir(0,1,0); 124 124 125 125 this->setClassID(CL_PLAYER, "Player"); -
orxonox/trunk/src/world_entities/weapons/test_gun.cc
r4982 r5000 178 178 179 179 pj->setParent(NullParent::getInstance()); 180 /* 181 PNode* target = this->getWeaponManager()->getFixedTarget(); 182 if (target != NULL) 183 { 184 pj->setVelocity(this->getVelocity()+(target->getAbsCoor() - this->getAbsCoor())*.5);//this->getVelocity()); 185 } 186 else*/ 180 187 181 pj->setVelocity(this->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*20); 188 182 … … 219 213 void TestGun::draw () 220 214 { 221 this->getWeaponManager()->getFixedTarget()->debugDraw(10);222 223 215 /* draw gun body */ 224 216 glMatrixMode(GL_MODELVIEW); 225 217 glPushMatrix(); 226 float matrix[4][4];227 218 glTranslatef (this->getAbsCoor ().x, 228 219 this->getAbsCoor ().y, 229 220 this->getAbsCoor ().z); 230 this->getAbsDir ().matrix (matrix); 231 glMultMatrixf((float*)matrix); 221 222 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 223 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 224 232 225 if( this->leftRight == W_RIGHT) 233 226 glScalef(1.0, 1.0, -1.0); … … 241 234 this->objectComponent1->getAbsCoor ().y, 242 235 this->objectComponent1->getAbsCoor ().z); 243 t his->objectComponent1->getAbsDir ().matrix (matrix);244 gl MultMatrixf((float*)matrix);236 tmpRot = this->objectComponent1->getAbsDir().getSpacialAxis(); 237 glRotatef (this->objectComponent1->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 245 238 this->model->draw(0); 246 239 glPopMatrix(); -
orxonox/trunk/src/world_entities/weapons/turret.cc
r4982 r5000 164 164 glMatrixMode(GL_MODELVIEW); 165 165 glPushMatrix(); 166 float matrix[4][4];167 166 glTranslatef (this->getAbsCoor ().x, 168 167 this->getAbsCoor ().y, 169 168 this->getAbsCoor ().z); 170 this->getAbsDir ().matrix (matrix);171 gl MultMatrixf((float*)matrix);169 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 170 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 172 171 173 172 this->model->draw();
Note: See TracChangeset
for help on using the changeset viewer.