I have this code:
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow Window(sf::VideoMode(1024, 600), "Test");
sf::Texture Texture;
Texture.loadFromFile("A.png");
sf::Sprite Sprite(Texture);
Sprite.setOrigin(36.0f, 36.0f);
Sprite.setPosition(512.0f, 300.0f);
while (Window.isOpen()) {
sf::Event Event;
while (Window.pollEvent(Event)) {
switch (Event.type) {
case sf::Event::Closed:
Window.close();
break;
}
}
Window.clear(sf::Color::White);
sf::Transform B(std::cos(30.0f), 0.0f, std::sin(30.0f), 0.0f, 1.0f, 0.0f, -std::sin(30.0f), 0.0f, std::cos(30.0f));
Window.draw(Sprite, B);
Window.display();
}
}
What do you actually mean by "transformation origin"?