33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
106 explicit View(
const RectF& rect);
114 View(Vector2f center, Vector2f size);
176 m_rotation = rotation;
211 m_viewport = viewport;
234 void reset(
const RectF& rect);
243 void move(Vector2f offset);
268 void zoom(
float factor);
397 #ifndef DOXYGEN_SHOULD_SKIP_THIS
float getRotation() const
Get the current orientation of the view.
Definition: View.h:186
View(Vector2f center, Vector2f size)
Construct the view from its center and size.
2D camera that defines what region is shown on screen
Definition: View.h:92
AdaptativeView(const RectF &rect)
Construct the view from a rectangle.
Definition: View.h:363
virtual void onScreenResize(Vector2u screenSize)=0
Callback when the screen has just been resized.
View()
Default constructor.
Matrix3f getTransform() const
Get the projection transform of the view.
const RectF & getViewport() const
Get the target viewport rectangle of the view.
Definition: View.h:221
void zoom(float factor)
Resize the view rectangle relatively to its current size.
Vector2f getCenter() const
Get the center of the view.
Definition: View.h:139
void setViewport(const RectF &viewport)
Set the target viewport.
Definition: View.h:210
void rotate(float angle)
Rotate the view relatively to its current orientation.
Matrix3f getInverseTransform() const
Get the inverse projection transform of the view.
Vector2f getSize() const
Get the size of the view.
Definition: View.h:162
virtual void onWorldResize(Vector2f worldSize)
Callback when the world has just been resized.
void move(Vector2f offset)
Move the view relatively to its current position.
void setSize(Vector2f size)
Set the size of the view.
Definition: View.h:150
View(const RectF &rect)
Construct the view from a rectangle.
AdaptativeView()
Default constructor.
Definition: View.h:352
#define GF_API
Definition: Portability.h:35
Adaptative view.
Definition: View.h:345
void setRotation(float rotation)
Set the orientation of the view.
Definition: View.h:175
virtual ~View()
Destructor.
AdaptativeView(Vector2f center, Vector2f size)
Construct the view from its center and size.
Definition: View.h:375
void setWorldSize(Vector2f size)
Set the world size, without calling onWorldResize()
Definition: View.h:301
void setInitialScreenSize(Vector2u screenSize)
Set the initial screen size.
void reset(const RectF &rect)
Reset the view to the given rectangle.
void setCenter(Vector2f center)
Set the center of the view.
Definition: View.h:128