Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
How to extract Rotation And Scale from sf::Transform
Print
Pages: [
1
]
Author
Topic: How to extract Rotation And Scale from sf::Transform (Read 4460 times)
0 Members and 1 Guest are viewing this topic.
person999
Newbie
Posts: 3
How to extract Rotation And Scale from sf::Transform
«
on:
July 24, 2024, 08:12:08 pm »
Context Of Question :
https://stackoverflow.com/questions/78779882/updating-transformable-child-objects-in-a-class-derived-from-sftransformable?noredirect=1#comment138905586_78779882
So, is there any way to extract rotation and scale from sf::Transform class?
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11030
Re: How to extract Rotation And Scale from sf::Transform
«
Reply #1 on:
July 28, 2024, 03:07:42 pm »
Not exactly.
sf::Transform
is essentially a 4x4 transformation matrix. So all the applied operations are calculated into the matrix and thus you can't extract the original inputs.
What you can do with a transformation matrix is decompose it into it's combined components (translation, rotation and scale), see also
this StackExchange answer
.
As for the StackOverflow question, I'll answer there directly.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
person999
Newbie
Posts: 3
Re: How to extract Rotation And Scale from sf::Transform
«
Reply #2 on:
August 01, 2024, 12:02:49 pm »
Thanks man, it helped me alot. I was very confused with the coordinate system and this transformation matrix because I am new.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
How to extract Rotation And Scale from sf::Transform
anything