예제 #1
0
 public void GetScreenVectorToWorld(Vec2 argScreen, Vec2 argWorld)
 {
     inv.Set(Box.R);
     inv.InvertLocal();
     inv.MulToOut(argScreen, argWorld);
     if (YFlip)
     {
         yFlipMatInv.MulToOut(argWorld, argWorld);
     }
 }
예제 #2
0
 public void GetWorldToScreen(Vec2 argWorld, Vec2 argScreen)
 {
     argScreen.Set(argWorld);
     argScreen.SubLocal(Box.Center);
     Box.R.MulToOut(argScreen, argScreen);
     if (YFlip)
     {
         yFlipMat.MulToOut(argScreen, argScreen);
     }
     argScreen.AddLocal(Box.Extents);
 }
예제 #3
0
 public void GetScreenToWorld(Vec2 argScreen, Vec2 argWorld)
 {
     argWorld.Set(argScreen);
     argWorld.SubLocal(Box.Extents);
     Box.R.InvertToOut(inv2);
     inv2.MulToOut(argWorld, argWorld);
     if (YFlip)
     {
         yFlipMatInv.MulToOut(argWorld, argWorld);
     }
     argWorld.AddLocal(Box.Center);
 }