This class defines a view (position, size, etc.) ; you can consider it as a 2D camera. More...
#include <View.hpp>
Public Member Functions | |
| View (const FloatRect &ViewRect=FloatRect(0, 0, 1000, 1000)) | |
| Construct the view from a rectangle. | |
| View (const sf::Vector2f &Center, const sf::Vector2f &HalfSize) | |
| Construct the view from its center and half-size. | |
| void | SetCenter (float X, float Y) |
| Change the center of the view (take 2 values) | |
| void | SetCenter (const sf::Vector2f &Center) |
| Change the center of the view (take a vector) | |
| void | SetHalfSize (float HalfWidth, float HalfHeight) |
| Change the half-size of the view (take 2 values) | |
| void | SetHalfSize (const sf::Vector2f &HalfSize) |
| Change the half-size of the view (take a vector) | |
| void | SetFromRect (const FloatRect &ViewRect) |
| Rebuild the view from a rectangle. | |
| const sf::Vector2f & | GetCenter () const |
| Get the center of the view. | |
| const sf::Vector2f & | GetHalfSize () const |
| Get the half-size of the view. | |
| const sf::FloatRect & | GetRect () const |
| Get the bounding rectangle of the view. | |
| void | Move (float OffsetX, float OffsetY) |
| Move the view (take 2 values) | |
| void | Move (const sf::Vector2f &Offset) |
| Move the view (take a vector) | |
| void | Zoom (float Factor) |
| Resize the view rectangle to simulate a zoom / unzoom effect. | |
Friends | |
| class | RenderTarget |
This class defines a view (position, size, etc.) ; you can consider it as a 2D camera.
| sf::View::View | ( | const sf::Vector2f & | Center, |
| const sf::Vector2f & | HalfSize ) |
| const sf::Vector2f & sf::View::GetCenter | ( | ) | const |
| const sf::Vector2f & sf::View::GetHalfSize | ( | ) | const |
| const sf::FloatRect & sf::View::GetRect | ( | ) | const |
| void sf::View::Move | ( | const sf::Vector2f & | Offset | ) |
| void sf::View::SetCenter | ( | const sf::Vector2f & | Center | ) |
| void sf::View::SetHalfSize | ( | const sf::Vector2f & | HalfSize | ) |
|
friend |