Changeset 10620 for code/branches/presentationFS15merge/src/orxonox
- Timestamp:
- Oct 4, 2015, 3:18:10 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationFS15merge/src/orxonox/controllers/ScriptController.cc
r10614 r10620 47 47 #include "core/LuaState.h" 48 48 #include "core/LuaState.h" 49 #include <cmath> 50 49 #include "util/Math.h" 51 50 52 51 namespace orxonox … … 216 215 Vector3* ortho1 = new Vector3(direction.y, -direction.x, 0); 217 216 float absOrtho1 = sqrt(direction.y * direction.y + direction.x * direction.x); 218 *ortho1 = 400 * cos(2 * M_PI* dl) * (*ortho1)/absOrtho1;217 *ortho1 = 400 * cos(2 * math::pi * dl) * (*ortho1)/absOrtho1; 219 218 220 219 Vector3* ortho2 = new Vector3(0, direction.z, -direction.y); 221 220 float absOrtho2 = sqrt(direction.y * direction.y + direction.z * direction.z); 222 *ortho2 = 400 * sin(2 * M_PI* dl) * (*ortho2)/absOrtho2;221 *ortho2 = 400 * sin(2 * math::pi * dl) * (*ortho2)/absOrtho2; 223 222 224 223 this->entity_->setPosition( (1-dl)*startpos + dl * this->currentEvent.v1 + *ortho1 + *ortho2); … … 235 234 switch ((int) currentEvent.d) { 236 235 case 3: 237 a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2* M_PI*dl),238 this->currentEvent.v1.y + this->currentEvent.e*sin(2* M_PI*dl),236 a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2*math::pi*dl), 237 this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl), 239 238 this->currentEvent.v1.z); 240 239 break; 241 240 case 2: 242 a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2* M_PI*dl),241 a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*math::pi*dl), 243 242 this->currentEvent.v1.y, 244 this->currentEvent.v1.z + this->currentEvent.e*cos(2* M_PI*dl));243 this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl)); 245 244 break; 246 245 case 1: 247 246 a = new Vector3(this->currentEvent.v1.x, 248 this->currentEvent.v1.y + this->currentEvent.e*sin(2* M_PI*dl),249 this->currentEvent.v1.z + this->currentEvent.e*cos(2* M_PI*dl));247 this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl), 248 this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl)); 250 249 break; 251 250 }
Note: See TracChangeset
for help on using the changeset viewer.