How to translate object using Center point
I have a rectangle which has a center point away from the position of rectangle.
when i rotate rectangle it rotates around its center axis.
if i multyply position before rotation in the modelView matrix
ModelViewMatrix = Rotation * Scaling * Position
Suppose if i want to do these translations.
1) Translate the rectangle position by x = 10 units.
1) Rotate the rectangle by 35 degree with the center point at the center of the rectangle.
2) Translate the rectangle position by x = 10 units.
3) change the x position of the center point by 10 units( rectangle should not be affected by the change in the center point position)
4) Now rotate the rectangle using the new center point.
If someone could please guide me how do we use Center point in transformations.
How do i build by ModelView Matrix if i am using a center Point.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…