public final static Transform mul(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulUnsafe(A.q, B.q, C.q); Rot.mulToOutUnsafe(A.q, B.p, C.p); C.p.addLocal(A.p); return C; }
public final static Transform mulTrans(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulTransUnsafe(A.q, B.q, C.q); pool.set(B.p).subLocal(A.p); Rot.mulTransUnsafe(A.q, pool, C.p); return C; }
public final static Transform mul(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulUnsafe(A.q, B.q, C.q); Rot.mulToOutUnsafe(A.q, B.p, C.p); C.p.addLocal(A.p); return C; }
@Override public void initTest(boolean argDeserialized) { input.transformA = new Transform(); input.transformB = new Transform(); { m_transformA = new Transform(); m_transformA.setIdentity(); m_transformA.p.set(0.0f, -0.2f); m_polygonA = new PolygonShape(); m_polygonA.setAsBox(10.0f, 0.2f); } { m_positionB = new Vec2(); m_positionB.set(12.017401f, 0.13678508f); m_angleB = -0.0109265f; m_transformB = new Transform(); m_transformB.set(m_positionB, m_angleB); m_polygonB = new PolygonShape(); m_polygonB.setAsBox(2.0f, 0.1f); } for (int i = 0; i < v.length; i++) { v[i] = new Vec2(); } }
public final static Transform mulTrans(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulTransUnsafe(A.q, B.q, C.q); pool.set(B.p).subLocal(A.p); Rot.mulTransUnsafe(A.q, pool, C.p); return C; }
var t = new Transform(); t.m = [1,tan(-0.2),0,1,0,0]; t.apply(ctx); ctx.beginPath(); ctx.moveTo(10,0); //point a ctx.lineTo(200,0); //point b ctx.stroke(); var mapped = t.transformPoint(200, 0); console.log(mapped[0], mapped[1]);
float mat[] = new float[16]; Transform t = new Transform(); t = body.getWorldTransform(t); t.origin.get(mat); x = mat[0]; y = mat[1]; z = mat[2]; gl.glRotatef(xrot, 1, 0, 0); //rotate our camera on teh x-axis (left and right) gl.glRotatef(yrot, 0, 1, 0); //rotate our camera on the y-axis (up and down) gl.glTranslatef(-x, -y, -z); //translate the screen to the position of our camera
var t = new Transform(); t.rotate(5); var m = t.m; ctx.setTransform(m[0], m[1], m[2], m[3], m[4], m[5]);
Polygon polygonA = new Polygon(1.5, .5, .5); Polygon polygonB = new Polygon(1.5, .5, 1.0); Polygon polygonL = new Polygon(1.5, .5, .5); Coordinate coordH = new Coordinate(); Coordinate coordB = new Coordinate(); Transform transformA = new Transform(0, .6); Transform transformL = new Transform(0, .6);
Transform transform = new Transform(); transform.setIdentity(); transform.origin.set(input.getX(), input.getY(), input.getZ()); myMotionState.setWorldTransform(transform); rigidBody.setCenterOfMassTransform(myMotionState.getWorldTransform());
Transform transform = new Transform(); transform.setIdentity(); MotionState motion = new DefaultMotionState(transform);
public final static Transform mul(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulUnsafe(A.q, B.q, C.q); Rot.mulToOutUnsafe(A.q, B.p, C.p); C.p.addLocal(A.p); return C; }
public final static Transform mul(final Transform A, final Transform B) { Transform C = new Transform(); Rotation.mulUnsafe(A.q, B.q, C.q); Rotation.mulToOutUnsafe(A.q, B.p, C.p); C.p.addLocal(A.p); return C; }
public final static Transform mul(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulUnsafe(A.q, B.q, C.q); Rot.mulToOutUnsafe(A.q, B.p, C.p); C.p.addLocal(A.p); return C; }
public final static Transform mulTrans(final Transform A, final Transform B) { Transform C = new Transform(); Rotation.mulTransUnsafe(A.q, B.q, C.q); pool.set(B.p).subLocal(A.p); Rotation.mulTransUnsafe(A.q, pool, C.p); return C; }
PolygonShape src = (PolygonShape) f.getShape(); Transform t = new Transform(); t.set(new Vec2(0,0), body.getAngle()); for (int i = 0; i < src.getVertexCount(); ++i) { Vec2 srcPt = Transform.mul(t, src.getVertex(i)); // build polygon up of these points and draw ...
public final static Transform mulTrans(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulTransUnsafe(A.q, B.q, C.q); pool.set(B.p).subLocal(A.p); Rot.mulTransUnsafe(A.q, pool, C.p); return C; }
public final static Transform mulTrans(final Transform A, final Transform B) { Transform C = new Transform(); Rot.mulTransUnsafe(A.q, B.q, C.q); pool.set(B.p).subLocal(A.p); Rot.mulTransUnsafe(A.q, pool, C.p); return C; }