Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Set X and Y with:
- /*
- * I iterate through every vertex of an entity
- * transformResults is the the std::vector<VERTEX> that holds the entities vertices after adding in regular transforms
- */
- float dRotation = Entity::rotation * (M_PI / 180);
- newVertX = cos(dRotation) * (transformResults.at(x).X - Entity::centerPoint.X) - sin(dRotation) * (transformResults.at(x).Y - Entity::centerPoint.Y) + Entity::centerPoint.X
- newVertY = sin(dRotation) * (transformResults.at(x).X - Entity::centerPoint.X) + cos(dRotation) * (transformResults.at(x).Y - Entity::centerPoint.Y) + Entity::centerPoint.Y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement