equal
deleted
inserted
replaced
346 } |
346 } |
347 |
347 |
348 Vector PhysicsObject::getPreviousPosition (void) const { |
348 Vector PhysicsObject::getPreviousPosition (void) const { |
349 return previousPosition; |
349 return previousPosition; |
350 } |
350 } |
351 |
351 |
352 void PhysicsObject::setPosition (Vector pos) { |
|
353 this->previousPosition = this->position; |
|
354 this->position = pos; |
|
355 } |
|
356 |
|
357 PixelCoordinate PhysicsObject::getCoordinate (void) const { |
352 PixelCoordinate PhysicsObject::getCoordinate (void) const { |
358 return world.terrain.getPixelCoordinate(position); |
353 return world.terrain.getPixelCoordinate(position); |
359 } |
354 } |
360 |
355 |
361 Vector PhysicsObject::getVelocity (void) const { |
356 Vector PhysicsObject::getVelocity (void) const { |
467 if (p < 0) |
462 if (p < 0) |
468 return -1; |
463 return -1; |
469 else |
464 else |
470 return 1; |
465 return 1; |
471 } |
466 } |
|
467 |
|
468 void PhysicsObject::setPosition (Vector pos) { |
|
469 this->previousPosition = this->position; |
|
470 this->position = pos; |
|
471 } |
|
472 |
|
473 void PhysicsObject::setVelocity (Vector velocity) { |
|
474 this->velocity = velocity; |
|
475 } |