SFML community forums
Help => Graphics => Topic started by: Travnick on February 02, 2011, 10:10:04 pm
-
there is function
Polygon.GetPointPosition(i)
but it only returns posiotion which was defined at the creating shape.
i wanna get actual position of points that is actualy rendered on the screen (shape was moved, rotated, scaled etc. and i wanna know where exactly is my point on the screen)
as far as I found there is
const Matrix3& GetMatrix() const;
and it probably contains what I want, but this function is protected
any solution?
-
The points are still right, but relative to the Shape Position, i think you could do it easy calculating yourself
Not sure if there is any other way : )
-
I can calculate them, but it will be wasting time, because positions have been already calculated (they are rendered at this positions)
-
They are calculated by opengl every draw using the transform matrix for the vertex set.
:)
-
Polygon.TransformToGlobal(point);
-
sounds nice, I'll check it
thx