예제 #1
0
 private Vector2 BoxToWorld(Vector2 p)
 {
     // // translate p to obb center basis
     // var offset = p-Center;
     // // rotate around center and translate back
     // return Matrix23.Rotation(Turn)*offset+Center;
     return(Matrix23.Rotation(Turn) * p);
 }
예제 #2
0
 private void WorldToBox(ref Vector2 p)
 {
     // // translate p to obb center basis
     // var offset = p-Center;
     // // rotate around center and translate back
     // p = Matrix23.Rotation(-Turn)*offset+Center;
     p = Matrix23.Rotation(-Turn) * p;
 }