public final static Mat22 createScaleTransform(float scale) { Mat22 mat = new Mat22(); mat.ex.x = scale; mat.ey.y = scale; return mat; }
/** * Return the matrix composed of the absolute values of all elements. * * @return Absolute value matrix */ public final static Mat22 abs(final Mat22 R) { return R.abs(); }
public void setCamera(float x, float y, float scale) { box.center.set(x, y); Mat22.createScaleTransform(scale, box.R); }
public void getScreenToWorld(Vec2 screen, Vec2 world) { world.x = screen.x - box.extents.x; world.y = screen.y - box.extents.y; if (yFlip) { yFlipMat.mulToOut(world, world); } box.R.invertToOut(inv2); inv2.mulToOut(world, world); world.x += box.center.x; world.y += box.center.y; } }
Mat22.mulToOutUnsafe(m_linearMass, Cdot, impulse); impulse.negateLocal(); final Vec2 oldImpulse = pool.popVec2();
vc.K.ey.x = k12; vc.K.ey.y = k22; vc.K.invertToOut(vc.normalMass); } else {
K.ey.x = K.ex.y; K.ey.y = mA + mB + iA * rA.x * rA.x + iB * rB.x * rB.x; K.solveToOut(C, impulse); impulse.negateLocal();
/** * @see IViewportTransform#getScreenVectorToWorld(Vec2, Vec2) */ public void getScreenVectorToWorld(Vec2 argScreen, Vec2 argWorld) { inv.set(box.R); inv.invertLocal(); inv.mulToOut(argScreen, argWorld); if (yFlip) { yFlipMatInv.mulToOut(argWorld, argWorld); } }
public final Mat22 mulTransLocal(final Mat22 B) { mulTransToOut(B, this); return this; }
/** * Multiplies the obb transform by the given transform */ @Override public void mulByTransform(Mat22 transform) { box.R.mulLocal(transform); }
public void getScreenVectorToWorld(Vec2 screen, Vec2 world) { box.R.invertToOut(inv); inv.mulToOut(screen, world); if (yFlip) { yFlipMat.mulToOut(world, world); } }
Mat22.mulToOutUnsafe(m_mass, temp, impulse);
K.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x; K.invertToOut(m_linearMass);
public final Mat22 mulLocal(final Mat22 R) { mulToOut(R, this); return this; }
K.solveToOut(C1.negateLocal(), temp); C1.negateLocal();
public final Mat22 mulTransLocal(final Mat22 B) { mulTransToOut(B, this); return this; }
/** * Multiplies the obb transform by the given transform */ @Override public void mulByTransform(Mat22 transform) { box.R.mulLocal(transform); }