rotation of a local vector
trying to work this out
if you have a box , that has 4 corners at vectors
-2,5 2,5
-2,5 2,-5
these positions are local to the center of the box/model.
if the box/model is rotated , by a number
i can get the matrices of the rotation ect , but how do i calculate the 4 corners relitilve to the world?
Your corner points are in local coordinates relative to the box center? Then apply the rotation matrix to the four corner points and add the box's world position to the four points.
Quote:Original post by Waterwalker
Your corner points are in local coordinates relative to the box center? Then apply the rotation matrix to the four corner points and add the box's world position to the four points.
i kind of understand that , could you point me to the correct tutorail for this please, or overview please
The center of your box is at
The local coordinate of one of the corners is
The world coordinate of this corner is
To rotate the corner around the center of the box, apply the rotation matrix to the local coordinates
The new world space coordinate is
The local coordinate of one of the corners is
The world coordinate of this corner is
To rotate the corner around the center of the box, apply the rotation matrix to the local coordinates
The new world space coordinate is
Quote:Original post by Eric_Brown
The center of your box is at
The local coordinate of one of the corners is
The world coordinate of this corner is
To rotate the corner around the center of the box, apply the rotation matrix to the local coordinates
The new world space coordinate is
Thank you , this i understand perfectly :) cheers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement