How do I get the coordinates of a rotated shape in SFML? [on hold]



I am trying to get collisions of bullets working, and am using SFML. I am using code to get the position of the points of the rectangle for collisions, however I think there's a way to do this without having to get points but by simply getting the points from SFML, since the shape is a rectangle and the points are stored in that way. Is there a way to do that? Through a combination of getPoint() and getGlobalBounds() maybe?

Related to : How do I get the coordinates of a rotated shape in SFML? [on hold]
How to have rotated Ellipse shape in Java?
Game Development

How to have rotated ellipse Shape in java? I.e. so that its semi-axes are not parallel to coordinate axes?


P.S. I need not just draw this ellipse but have it in memory as a shape object.


comparing rotated coordinates
Game Development

I'm having little trouble whit trying to compare rotated 2D Quads coordinates to rotated x and y coordinates. I'm trying to determine if mouse was clicked inside the quad.


1) the rot's are this classes objects: (note : the operator << is overloaded for the use of the rotate coords func)


class Vector{
private:
std::vector <float> Vertices;
public:
Vector(float, float);
float GetVertice(unsigned int);
void SetVertice(unsigned int, float);
std::vector<float> operator <<(double);
};
Vector::Vector(float X,float
SFML Shape::Line has 5 points
Game Development

I am trying to find the start and end points i defined when creating a line shape in SFML. but the shape that shape::line creates has 5 points. Isn't there any way to retrieve this? I am doing a line segment to line segment intersection in 2d, and for all my walls ETC i am using SFML's Shape::Line...


How do I get the point coords of a rotated SFML shaperect?
Game Development
I am trying to get collisions of bullets working, and am using SFML. I am using code to get the position of the points of the rectangle for collisions, however I think there's a way to do this without having to get points but by simply getting the points from SFML, since the shape is a rectangle and the points are stored in that way. Is there a way to do that? Through a combination of getPoint() and getGlobalBounds() maybe?While on this topic, is it better to use shapeRects or sprites? I used
How do I get the coordinates of a rotated shape in SFML? [on hold]
Game Development
I am trying to get collisions of bullets working, and am using SFML. I am using code to get the position of the points of the rectangle for collisions, however I think there's a way to do this without having to get points but by simply getting the points from SFML, since the shape is a rectangle and the points are stored in that way. Is there a way to do that? Through a combination of getPoint() and getGlobalBounds() maybe?
Rotated movieclip coordinates
Game Development
Rotated movieclip coordinates
 
Hi, guys.
Having the follow problem(forgot already the school trigonometry:)
1. I have a movieclip that is a simple square.
2. Its rotated via _rotation property.
3. But I need to calculate new corner coordinates.
They were (mc._x+mc._width/2), (mc._y+mc_height/2) originaly for the right top corner.
But how can I calculate them after rotation?
Thank you.


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .