Changeset 7077
- Timestamp:
- Jun 2, 2010, 1:52:21 AM (14 years ago)
- Location:
- code/branches/presentation3/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/modules/designtools/CreateStars.cc
r7039 r7077 34 34 #include "core/XMLPort.h" 35 35 #include "graphics/Billboard.h" 36 36 37 37 namespace orxonox 38 38 { … … 56 56 CreateStars::~CreateStars() 57 57 { 58 while( billboards_.size()!=0 ) 58 while( billboards_.size()!=0 ) 59 59 { 60 delete(billboards_.back());60 billboards_.back()->destroy(); 61 61 billboards_.pop_back(); 62 62 … … 69 69 { 70 70 71 for(int i=0; i < numStars_; i++) 71 for(int i=0; i < numStars_; i++) 72 72 { 73 73 Billboard* bb = new Billboard(this); … … 88 88 float teta; 89 89 90 while(1) 90 while(1) 91 91 { 92 92 phi = rnd(2*pi); … … 101 101 } 102 102 103 Vector3 CreateStars::PolarToCartesian(float phi, float teta, float radius) 103 Vector3 CreateStars::PolarToCartesian(float phi, float teta, float radius) 104 104 { 105 105 float x = radius * cos(phi) * sin(teta); -
code/branches/presentation3/src/orxonox/worldentities/Drone.cc
r7060 r7077 44 44 45 45 this->myController_ = 0; 46 46 47 47 this->localLinearAcceleration_.setValue(0, 0, 0); 48 48 this->localAngularAcceleration_.setValue(0, 0, 0); 49 49 this->setRadarVisibility(false); 50 50 this->setCollisionType(WorldEntity::Dynamic); 51 51 52 52 myController_ = new DroneController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator. 53 53 myController_->setDrone(this); … … 63 63 { 64 64 if( this->isInitialized() && this->myController_ ) 65 delete this->myController_;65 this->myController_->destroy(); 66 66 } 67 67 … … 92 92 { 93 93 SUPER(Drone, tick, dt); 94 94 95 95 //if (this->hasLocalController()) 96 96 //{ … … 103 103 this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_); 104 104 this->localLinearAcceleration_.setValue(0, 0, 0); 105 105 106 106 this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_; 107 107 this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_); … … 109 109 //} 110 110 } 111 111 112 112 /** 113 113 @brief … … 175 175 this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x); 176 176 } 177 177 178 178 }
Note: See TracChangeset
for help on using the changeset viewer.