/// <seealso cref="IViewportTransform.getWorldToScreen(Vec2, Vec2)"> /// </seealso> public virtual void getWorldToScreen(Vec2 argWorld, Vec2 argScreen) { argScreen.set_Renamed(argWorld); argScreen.subLocal(box.center); box.R.mulToOut(argScreen, argScreen); if (yFlip) { yFlipMat.mulToOut(argScreen, argScreen); } argScreen.addLocal(box.extents); }
/// <seealso cref="IViewportTransform.getScreenToWorld(Vec2, Vec2)"> /// </seealso> public virtual void getScreenToWorld(Vec2 argScreen, Vec2 argWorld) { argWorld.set_Renamed(argScreen); argWorld.subLocal(box.extents); box.R.invertToOut(inv2); inv2.mulToOut(argWorld, argWorld); if (yFlip) { yFlipMatInv.mulToOut(argWorld, argWorld); } argWorld.addLocal(box.center); }