Dualie
Loading...
Searching...
No Matches
include
Dualie
Graphics
Transformable.hpp
1
//
2
// Created by caleb on 6/16/24.
3
//
4
5
#ifndef DUALIE_TRANSFORMABLE_HPP
6
#define DUALIE_TRANSFORMABLE_HPP
7
8
9
#include <Dualie/System/Vector2.hpp>
10
11
namespace
dl {
12
16
class
Transformable
{
17
18
protected
:
19
dl::Vector2f
m_position;
20
21
22
public
:
27
virtual
void
setPosition
(
const
dl::Vector2f
& position);
28
34
void
setPosition
(
float
x,
float
y);
35
40
virtual
void
move
(
const
dl::Vector2f
& offset);
41
47
void
move
(
float
xOffset,
float
yOffset);
48
52
const
dl::Vector2f
&
getPosition
()
const
;
53
54
};
55
56
}
57
58
59
#endif
//DUALIE_TRANSFORMABLE_HPP
dl::Transformable
A base class for anything that has a position on the screen.
Definition
Transformable.hpp:16
dl::Transformable::getPosition
const dl::Vector2f & getPosition() const
Definition
Transformable.cpp:16
dl::Transformable::setPosition
virtual void setPosition(const dl::Vector2f &position)
Sets the position of the transformable.
Definition
Transformable.cpp:8
dl::Transformable::move
virtual void move(const dl::Vector2f &offset)
Moves the transformable offset number of pixels.
Definition
Transformable.cpp:20
dl::Vector2< float >
Generated by
1.12.0