123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef PLAYER_H
- #define PLAYER_H
- #include "common/utils/CollisionBox.h"
- #include "math/Quaternion.h"
- class Player {
- Vector3 lastPosition;
- Vector3 position;
- float lastLengthAngle;
- float lengthAngle;
- float lastWidthAngle;
- float widthAngle;
- Vector3 velocity;
- Vector3 acceleration;
- Vector3 size;
- bool onGround;
- public:
- Player();
- void tick();
- void addForce(const Vector3& force);
- const Vector3& getVelocity() const;
- void move(const Vector3& v);
- CollisionBox getCollisionBox() const;
- bool isOnGround() const;
- void setPosition(const Vector3& pos);
- void setPosition(const Vector3& pos, float lengthAngle, float widthAngle);
- Vector3 getRenderPosition(float lag) const;
- Quaternion getRotation() const;
- Quaternion getRenderRotation(float lag) const;
- void addLengthAngle(float angle);
- void addWidthAngle(float angle);
- };
- #endif
|