You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ugeentity.cpp 959B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #include "ugeentity.h"
  2. UGEEntity::UGEEntity(QObject *parent) :
  3. QObject(parent)
  4. {
  5. }
  6. Vector3D UGEEntity::getPosition() const
  7. {
  8. return _position;
  9. }
  10. void UGEEntity::setPosition(const Vector3D &position)
  11. {
  12. _position = position;
  13. }
  14. void UGEEntity::move(const Vector3D &move)
  15. {
  16. _position += move;
  17. }
  18. Vector3D UGEEntity::getSpeed() const
  19. {
  20. return _speed;
  21. }
  22. void UGEEntity::setSpeed(const Vector3D &speed)
  23. {
  24. _speed = speed;
  25. }
  26. void UGEEntity::accelerate(const Vector3D &speed)
  27. {
  28. _speed += speed;
  29. }
  30. Vector3D UGEEntity::getRotation() const
  31. {
  32. return _rotation;
  33. }
  34. void UGEEntity::setRotation(const Vector3D &rotation)
  35. {
  36. _rotation = rotation;
  37. }
  38. void UGEEntity::rotate(const Vector3D &rotation)
  39. {
  40. _rotation += rotation;
  41. }
  42. Vector3D UGEEntity::getScale() const
  43. {
  44. return _scale;
  45. }
  46. void UGEEntity::setScale(const Vector3D &scale)
  47. {
  48. _scale = scale;
  49. }
  50. void UGEEntity::scale(const Vector3D &scale)
  51. {
  52. _scale += scale;
  53. }