mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-18 03:49:19 +01:00
Remove Point2f, replace with Vector2f
This commit is contained in:
@@ -6,20 +6,20 @@ class Camera
|
||||
{
|
||||
public:
|
||||
Camera();
|
||||
Camera(const Point2f& position, float scale = 1);
|
||||
Camera(const Vector2f& position, float scale = 1);
|
||||
~Camera() = default;
|
||||
|
||||
Camera(const Camera& other) = default;
|
||||
Camera& operator=(const Camera& other) = default;
|
||||
|
||||
void SetPosition(const Point2f& position) {
|
||||
void SetPosition(const Vector2f& position) {
|
||||
m_Position = position;
|
||||
}
|
||||
void SetScale(const float scale) {
|
||||
m_Scale = scale;
|
||||
}
|
||||
|
||||
const Point2f& GetPosition() const {
|
||||
const Vector2f& GetPosition() const {
|
||||
return m_Position;
|
||||
}
|
||||
float GetScale() const {
|
||||
@@ -33,13 +33,13 @@ public:
|
||||
m_FollowingPlayer = player;
|
||||
}
|
||||
|
||||
Point2f TransformMouse(const Point2f& mousePos) const;
|
||||
Point2f TransformWorld(const Point2f& worldPos) const;
|
||||
Vector2f TransformMouse(const Vector2f& mousePos) const;
|
||||
Vector2f TransformWorld(const Vector2f& worldPos) const;
|
||||
Rectf Viewport = Rectf { 0, 0, 846.f, 500.f };
|
||||
//TODO: Remove this and make it some static
|
||||
|
||||
private:
|
||||
Point2f m_Position;
|
||||
Vector2f m_Position;
|
||||
float m_Scale;
|
||||
Player* m_FollowingPlayer { nullptr };
|
||||
//TODO: Ask if the rule applies to the fact that the player is not managed by the camera
|
||||
|
||||
Reference in New Issue
Block a user