void doMultiplyModelTransform(Transform3D t) { this.modelTransform.mul(t); computeCompositeTransform(); normalTransformNeedToUpdate = true; }
@Override void mergeTransform(TransformGroupRetained xform) { super.mergeTransform(xform); transform.mul(xform.transform, transform); }
/** * Multiplies the transpose of transform t1 by transform t2 and places * the result into this matrix (this = transpose(t1) * t2). * @param t1 the transform whose transpose is computed * @param t2 the transform on the right hand side of the multiplication */ public final void mulTransposeLeft(Transform3D t1, Transform3D t2){ Transform3D t3 = new Transform3D(); t3.autoNormalize = false; t3.transpose(t1); mul(t3, t2); }
/** * Multiplies this transform by the inverse of transform t1. The final * value is placed into this matrix (this = this*t1^-1). * @param t1 the matrix whose inverse is computed. */ public final void mulInverse(Transform3D t1) { Transform3D t2 = new Transform3D(); t2.autoNormalize = false; t2.invert(t1); this.mul(t2); }
/** * Multiplies transform t1 by the inverse of transform t2. The final * value is placed into this matrix (this = t1*t2^-1). * @param t1 the left transform in the multiplication * @param t2 the transform whose inverse is computed. */ public final void mulInverse(Transform3D t1, Transform3D t2) { Transform3D t3 = new Transform3D(); t3.autoNormalize = false; t3.invert(t2); this.mul(t1,t3); }
/** * Multiplies transform t1 by the transpose of transform t2 and places * the result into this transform (this = t1 * transpose(t2)). * @param t1 the transform on the left hand side of the multiplication * @param t2 the transform whose transpose is computed */ public final void mulTransposeRight(Transform3D t1, Transform3D t2) { Transform3D t3 = new Transform3D(); t3.autoNormalize = false; t3.transpose(t2); mul(t1, t3); }
private void getCoexistenceToVworld(CanvasInfo ci) { if (ci.updateCoeToVworld) { if (verbose) System.err.println("updating CoexistenceToVworld") ; if (ci.coeToVworld == null) ci.coeToVworld = new Transform3D() ; getCoexistenceToViewPlatform(ci) ; ci.coeToVworld.mul(vpi.viewPlatformToVworld, ci.coeToViewPlatform) ; ci.updateCoeToVworld = false ; } }
public void getTransform(final Transform3D transform) { transform.set(new Vector3f(center)); transform.mul(scale); }
/** * Copies the transform component of this TransformGroup into * the passed transform object. * @param t1 the transform object to be copied into */ void getTransform(Transform3D t1) { transform.getWithLock(t1); // if staticTransform exists for this node, need to // redetermine the original user specified transform if (staticTransform != null) { Transform3D invTransform = staticTransform.getInvTransform(); t1.mul(invTransform, t1); } }
final void volumeToIP(final Canvas3D canvas, final Transform3D ret) { canvas.getImagePlateToVworld(ret); ret.invert(); rootBranchGroup.getLocalToVworld(toVWorld); ret.mul(toVWorld); }
/** * Stores the matrix which transforms this VoltexGroup to the image plate in * the specified Transform3D. * * @param toImagePlate */ public void volumeToImagePlate(final Transform3D toImagePlate) { final Transform3D toVWorld = new Transform3D(); renderer.getVolumeNode().getLocalToVworld(toVWorld); toImagePlate.mul(toVWorld); }
boolean intersect(Transform3D thisLocalToVworld, Transform3D otherLocalToVworld, GeometryRetained geom) { Transform3D t3d = new Transform3D(); t3d.invert(otherLocalToVworld); t3d.mul(thisLocalToVworld); return intersect(t3d, geom); }
for(j=0; j<group.numChildren(); j++) { Node ni=group.getChild(j); if(ni instanceof TransformGroup) { Transform3D tdi=new Transform3D(); TransformGroup tgi=(TransformGroup)group.getChild(j); tgi.getTransform(tdi); Transform3D rotation = new Transform3D(); rotation.rotX(Math.toRadians(0.001*i)); tdi.mul(rotation); tgi.setTransform(tdi); } }
Transform3D rotation = new Transform3D(); Transform3D temp = new Transform3D(); rotation.rotX(Math.PI/2); temp.rotZ(Math.PI/2); rotation.mul(temp); // multiply the 2 transformation matrices together.
private void volumeToImagePlate(final Canvas3D canvas, final Transform3D volToIP) { canvas.getImagePlateToVworld(volToIP); volToIP.invert(); final Transform3D toVWorld = new Transform3D(); node.getLocalToVworld(toVWorld); volToIP.mul(toVWorld); }
public class Static3DWorld extends JFrame { private Transform3D rotate1 = new Transform3D(); private Transform3D rotate2 = new Transform3D(); .... private Transform3D rotateCube() { rotate1.rotX(Math.PI / 4.0d); rotate2.rotY(Math.PI / 4.0d); rotate1.mul(rotate2); return rotate1; } .... }
@Override void execute(Canvas3D cv, RenderAtom ra, boolean isNonUniformScale, boolean updateAlpha, float alpha, int screen, boolean ignoreVertexColors) { Transform3D trans = new Transform3D(); for (int i = 0; i < geometryList.length; i++) { trans.set(drawTransform); trans.mul(charTransforms[i]); cv.setModelViewMatrix(cv.ctx, vpcToEc.mat, trans); geometryList[i].execute(cv, ra, isNonUniformScale, updateAlpha, alpha, screen, ignoreVertexColors); } }
public void saveTransform(final Content c) { if (!checkSel(c)) return; final Transform3D t1 = new Transform3D(); c.getLocalTranslate().getTransform(t1); final Transform3D t2 = new Transform3D(); c.getLocalRotate().getTransform(t2); t1.mul(t2); final float[] matrix = new float[16]; t1.get(matrix); if (new TransformIO().saveAffineTransform(matrix)) record(SAVE_TRANSFORM, affine2string(matrix)); }