Examples of Matrix4d


Examples of javax.vecmath.Matrix4d

/*     */
/*     */   void createJava3dObject(LwsObject cloneObject, int loadBehaviors)
/*     */     throws IncorrectFormatException, ParsingErrorException, FileNotFoundException
/*     */   {
/* 407 */     String seqToken = new String("_sequence_");
/* 408 */     Matrix4d mat = new Matrix4d();
/* 409 */     mat.setIdentity();
/*     */
/* 412 */     LwsFrame firstFrame = this.motion.getFirstFrame();
/* 413 */     firstFrame.setMatrix(mat);
/* 414 */     Transform3D t1 = new Transform3D();
/* 415 */     t1.set(mat);
View Full Code Here

Examples of javax.vecmath.Matrix4d

/*     */
/*     */   void setMatrix(Matrix4d mat)
/*     */   {
/* 269 */     setRotationMatrix(mat);
/* 270 */     mat.setTranslation(new Vector3d(this.x, this.y, this.z));
/* 271 */     Matrix4d m = new Matrix4d();
/* 272 */     m.setColumn(0, this.xScale, 0.0D, 0.0D, 0.0D);
/* 273 */     m.setColumn(1, 0.0D, this.yScale, 0.0D, 0.0D);
/* 274 */     m.setColumn(2, 0.0D, 0.0D, this.zScale, 0.0D);
/* 275 */     m.setColumn(3, 0.0D, 0.0D, 0.0D, 1.0D);
/* 276 */     mat.mul(m);
/*     */   }
View Full Code Here

Examples of javax.vecmath.Matrix4d

/*     */   void setRotationMatrix(Matrix4d mat)
/*     */   {
/* 284 */     debugOutputLn(1, "setRotMat()");
/* 285 */     debugOutputLn(2, " p, h, b = " + this.pitch + ", " + this.heading + ", " + this.bank);
/*     */
/* 289 */     Matrix4d pitchMat = new Matrix4d();
/* 290 */     pitchMat.rotX(-this.pitch);
/* 291 */     Matrix4d bankMat = new Matrix4d();
/* 292 */     bankMat.rotZ(this.bank);
/* 293 */     mat.rotY(-this.heading);
/* 294 */     mat.mul(pitchMat);
/* 295 */     mat.mul(bankMat);
/* 296 */     debugOutputLn(2, "setRotMat(), mat = " + mat);
/*     */   }
View Full Code Here

Examples of javax.vecmath.Matrix4d

/* 173 */     return this.parent;
/*     */   }
/*     */
/*     */   void createJava3dObject(int loadBehaviors)
/*     */   {
/* 180 */     Matrix4d mat = new Matrix4d();
/* 181 */     mat.setIdentity();
/*     */
/* 184 */     LwsFrame firstFrame = this.motion.getFirstFrame();
/* 185 */     firstFrame.setMatrix(mat);
/* 186 */     debugOutputLn(2, "Light transform = " + mat);
/* 187 */     Transform3D t1 = new Transform3D();
View Full Code Here

Examples of javax.vecmath.Matrix4d

/* 106 */     return this.parent;
/*     */   }
/*     */
/*     */   void createJava3dObject(int loadBehaviors)
/*     */   {
/* 116 */     Matrix4d mat = new Matrix4d();
/* 117 */     mat.setIdentity();
/*     */
/* 120 */     LwsFrame firstFrame = this.motion.getFirstFrame();
/* 121 */     firstFrame.setMatrix(mat);
/* 122 */     debugOutputLn(2, "  Camera Matrix = \n" + mat);
/* 123 */     Transform3D t1 = new Transform3D();
/* 124 */     Matrix4d m = new Matrix4d();
/* 125 */     double scale = 0.1D;
/* 126 */     m.setColumn(0, scale, 0.0D, 0.0D, 0.0D);
/* 127 */     m.setColumn(1, 0.0D, scale, 0.0D, 0.0D);
/* 128 */     m.setColumn(2, 0.0D, 0.0D, scale, 0.0D);
/* 129 */     m.setColumn(3, 0.0D, 0.0D, 0.0D, 1.0D);
/* 130 */     Transform3D scaleTrans = new Transform3D(m);
/* 131 */     TransformGroup scaleGroup = new TransformGroup(scaleTrans);
/* 132 */     scaleGroup.setCapability(18);
/* 133 */     scaleGroup.setCapability(17);
/*     */
View Full Code Here

Examples of javax.vecmath.Matrix4d

/*  97 */     MultiTransformGroup mtg = this.universe.getViewingPlatform().getMultiTransformGroup();
/*  98 */     int mtgSize = mtg.getNumTransforms();
/*  99 */     out.writeInt(mtgSize);
/*     */
/* 102 */     Transform3D trans = new Transform3D();
/* 103 */     Matrix4d matrix = new Matrix4d();
/* 104 */     for (int i = 0; i < mtgSize; i++) {
/* 105 */       TransformGroup tg = mtg.getTransformGroup(i);
/* 106 */       tg.getTransform(trans);
/* 107 */       trans.get(matrix);
/* 108 */       this.control.writeMatrix4d(out, matrix);
View Full Code Here

Examples of javax.vecmath.Matrix4d

/*     */     else {
/* 122 */       this.universe = new ConfiguredUniverse(ConfiguredUniverse.getConfigURL(), mtgSize);
/*     */     }
/* 124 */     MultiTransformGroup mtg = this.universe.getViewingPlatform().getMultiTransformGroup();
/*     */
/* 127 */     Matrix4d matrix = new Matrix4d();
/* 128 */     for (int i = 0; i < mtgSize; i++) {
/* 129 */       TransformGroup tg = mtg.getTransformGroup(i);
/* 130 */       matrix = this.control.readMatrix4d(in);
/* 131 */       Transform3D trans = new Transform3D(matrix);
/* 132 */       tg.setTransform(trans);
View Full Code Here

Examples of javax.vecmath.Matrix4d

/* 246 */           this.transformX.rotX(this.x_angle);
/* 247 */           this.transformY.rotY(this.y_angle);
/*     */
/* 249 */           this.transformGroup.getTransform(this.currXform);
/*     */
/* 251 */           Matrix4d mat = new Matrix4d();
/*     */
/* 253 */           this.currXform.get(mat);
/*     */
/* 256 */           this.currXform.setTranslation(new Vector3d(0.0D, 0.0D, 0.0D));
/* 257 */           if (this.invert) {
View Full Code Here

Examples of javax.vecmath.Matrix4d

/*     */   public Matrix4d readMatrix4d(DataInput in) throws IOException {
/* 772 */     double[] elements = new double[16];
/* 773 */     for (int c = 0; c < 16; c++) {
/* 774 */       elements[c] = in.readDouble();
/*     */     }
/* 776 */     return new Matrix4d(elements);
/*     */   }
View Full Code Here

Examples of javax.vecmath.Matrix4d

/* 831 */     tuple.w = in.readFloat();
/* 832 */     return tuple;
/*     */   }
/*     */
/*     */   public void writeTransform3D(DataOutput out, Transform3D tran) throws IOException {
/* 836 */     Matrix4d matrix = new Matrix4d();
/* 837 */     tran.get(matrix);
/* 838 */     writeMatrix4d(out, matrix);
/*     */   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.