- Timestamp:
- May 14, 2009, 2:35:54 PM (15 years ago)
- Location:
- code/branches/map/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/map/src/orxonox/objects/RadarViewable.cc
r2956 r2977 117 117 //Vector3 v = this->getRVWorldPosition(); 118 118 //this->line_->setPoint(1, Vector3(0,v.y,0) ); 119 this->line_->setPoint(1, Vector3( 0, -this->getRVWorldPosition().y ,0));119 this->line_->setPoint(1, Vector3( 0, (int) -Map::getSingletonPtr()->movablePlane_->getDistance( this->getRVWorldPosition() ) ,0 )); 120 120 this->line_->update(); 121 this->LineNode_->setDirection(Vector3::UNIT_Y,Ogre::Node::TS_WORLD,Vector3::UNIT_Y); 121 if( Map::getSingletonPtr()->playerShipNode_ ) 122 this->LineNode_->setDirection( Map::getSingletonPtr()->playerShipNode_->getLocalAxes().GetColumn(1) ,Ogre::Node::TS_WORLD,Vector3::UNIT_Y); 122 123 } 123 124 } -
code/branches/map/src/orxonox/overlays/map/Map.cc
r2956 r2977 47 47 48 48 #include <OgreOverlay.h> 49 #include <OgreMovablePlane.h> 49 50 #include <OgreOverlayElement.h> 50 51 #include <OgreOverlayManager.h> … … 169 170 overlay_->hide(); 170 171 171 //Create plane in map172 //Create plane to show grid 172 173 Ogre::Entity* plane_ent = Map::getMapSceneManager()->createEntity( "MapPlane", "plane.mesh"); 173 174 planeNode_ = Map::getMapSceneManager()->getRootSceneNode()->createChildSceneNode(); 174 175 //Create plane for calculations 176 movablePlane_ = new Ogre::MovablePlane( Vector3::UNIT_Y, 0 ); 177 movablePlane_->normalise(); 178 175 179 //Ogre::MaterialPtr plane_mat = Ogre::MaterialManager::getSingleton().create("mapgrid", "General"); 176 180 //plane_mat->getTechnique(0)->getPass(0)->createTextureUnitState("mapgrid.tga"); … … 178 182 plane_ent->setMaterialName("Map/Grid"); 179 183 planeNode_->attachObject(plane_ent); 184 180 185 planeNode_->scale(10,1,10); 186 planeNode_->attachObject(movablePlane_); 181 187 //Ogre::Material plane_mat = Ogre::MaterialManager::getSingletonPtr()->getByName("rock"); 182 188 … … 272 278 this->Cam_->setPosition(0, 0, DISTANCE); 273 279 this->Cam_->pitch( (Degree)PITCH ); 274 //this->CamNodeHelper_->lookAt(Vector3(0,0,0), Ogre::Node::TS_PARENT);275 this->Cam_->setAutoTracking(true, this->playerShipNode_);280 this->Cam_->lookAt(Vector3(0,0,0)); 281 //this->Cam_->setAutoTracking(true, this->playerShipNode_); 276 282 } 277 283 … … 364 370 Map::singletonMap_s->CamNodeHelper_->lookAt(Vector3(0,0,0), Ogre::Node::TS_PARENT); 365 371 */ 366 singletonMap_s->CamNode_->pitch( (Degree)(value.y * singletonMap_s->mouseLookSpeed_), Ogre::Node::TS_ PARENT);372 singletonMap_s->CamNode_->pitch( (Degree)(value.y * singletonMap_s->mouseLookSpeed_), Ogre::Node::TS_LOCAL); 367 373 368 374 } -
code/branches/map/src/orxonox/overlays/map/Map.h
r2956 r2977 38 38 #include <OgreOverlayManager.h> 39 39 #include <OgreOverlayContainer.h> 40 #include <OgreMovablePlane.h> 40 41 41 42 #include <OgreBorderPanelOverlayElement.h> … … 114 115 Ogre::SceneNode* playerShipNode_; 115 116 Ogre::SceneNode* planeNode_; 116 117 Ogre::MovablePlane* movablePlane_; 117 118 int mouseLookSpeed_; 118 119 bool isVisible_; 120 121 friend class RadarViewable; 119 122 }; 120 123 } -
code/branches/map/src/util/SubString.cc
r2171 r2977 39 39 40 40 #include "SubString.h" 41 #include <stdio.h> 41 42 42 43 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.