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 get world coodinates of sf::ConvexShape points?
Print
Pages: [
1
]
Author
Topic: How to get world coodinates of sf::ConvexShape points? (Read 1080 times)
0 Members and 1 Guest are viewing this topic.
buynnnmmm1
Newbie
Posts: 2
How to get world coodinates of sf::ConvexShape points?
«
on:
December 01, 2013, 01:39:44 am »
I try to use .getPoint() of sf::ConvexShape, but I got local coodinate of the point.
I roate sf::ConvexShape, but I get same value.
How can I get world coodinates of sf::ConvexShapes points?
Logged
buynnnmmm1
Newbie
Posts: 2
Re: How to get world coodinates of sf::ConvexShape points?
«
Reply #1 on:
December 01, 2013, 02:10:49 am »
I read api document of sf::ConvexShape, and I notice the getTransform() method.
I got world coodinats with sf::ConvexShape::getTransform.
sf::ConvexShape a;
sf::Transform t=a.getTransform();
sf::Vector2f p=t.transformPoint(a.getPoint(0));
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
How to get world coodinates of sf::ConvexShape points?