Changeset 1400 for code/trunk/src/orxonox/objects
- Timestamp:
- May 24, 2008, 12:24:30 AM (17 years ago)
- Location:
- code/trunk/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/SpaceShip.cc
r1399 r1400 112 112 this->setConfigValues(); 113 113 114 initialDir_ = Vector3(1.0, 0.0, 0.0); 115 currentDir_ = initialDir_; 116 initialOrth_ = Vector3(0.0, 0.0, 1.0); 117 currentOrth_ = initialOrth_; 114 118 115 119 this->setRotationAxis(1, 0, 0); … … 247 251 this->camNode_ = this->getNode()->createChildSceneNode(camName_); 248 252 COUT(4) << "position: (this)" << this->getNode()->getPosition() << std::endl; 249 this->camNode_->setPosition(Vector3( -50,0,10));253 this->camNode_->setPosition(Vector3(0,0,0));//-50,0,10)); 250 254 // Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0)); 251 255 // Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(0,0,-1)); … … 395 399 } 396 400 397 Vector3 SpaceShip::get SPosition() {398 return SpaceShip::getLocalShip()->getPosition();399 } 400 401 Quaternion SpaceShip::getSOrientation(){402 return SpaceShip::getLocalShip()->getOrientation();401 Vector3 SpaceShip::getDir() { 402 return currentDir_; 403 } 404 405 Vector3 SpaceShip::getOrth(){ 406 return currentOrth_; 403 407 } 404 408 … … 407 411 void SpaceShip::tick(float dt) 408 412 { 413 currentDir_ = getOrientation()*initialDir_; 414 currentOrth_ = getOrientation()*initialOrth_; 415 409 416 if (this->cam_) 410 417 this->cam_->tick(dt); -
code/trunk/src/orxonox/objects/SpaceShip.h
r1399 r1400 64 64 void setTransDamp(float value); 65 65 void setRotDamp(float value); 66 void getFocus(); 66 67 67 void getFocus();68 Camera* getCamera();69 68 static SpaceShip* instance_s; 70 static Vector3 getSPosition();71 static Quaternion getSOrientation();72 69 static std::string whereAmI(); 73 70 static void setMaxSpeedTest(float value) … … 81 78 82 79 float getMaxSpeed(); 80 Vector3 getDir(); 81 Vector3 getOrth(); 82 Camera* getCamera(); 83 83 84 84 private: … … 86 86 87 87 Vector3 testvector_; 88 Vector3 initialDir_; 89 Vector3 currentDir_; 90 Vector3 initialOrth_; 91 Vector3 currentOrth_; 88 92 bool bInvertYAxis_; 89 93 bool setMouseEventCallback_;
Note: See TracChangeset
for help on using the changeset viewer.