#ifndef ENTITY_H #define ENTITY_H #include "common/utils/CollisionBox.h" #include "math/Quaternion.h" struct Entity { Vector3 lastPosition; Vector3 position; float lastLengthAngle; float lengthAngle; float lastWidthAngle; float widthAngle; Vector3 velocity; Vector3 acceleration; Vector3 size; Vector3 drag; float speed; float jumpPower; bool onGround; bool skip; Entity(); virtual ~Entity() = default; virtual 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); float getMaxXZVelocity() const; void jump(); }; #endif