/** * Copy constructor that creates a new <code>Matrix3f</code> object that * is the same as the provided matrix. * * @param mat * the matrix to copy. */ public Matrix3f(Matrix3f mat) { set(mat); }
public static com.jme3.math.Matrix3f convert(javax.vecmath.Matrix3f oldMatrix, com.jme3.math.Matrix3f newMatrix) { newMatrix.set(0, 0, oldMatrix.m00); newMatrix.set(0, 1, oldMatrix.m01); newMatrix.set(0, 2, oldMatrix.m02); newMatrix.set(1, 0, oldMatrix.m10); newMatrix.set(1, 1, oldMatrix.m11); newMatrix.set(1, 2, oldMatrix.m12); newMatrix.set(2, 0, oldMatrix.m20); newMatrix.set(2, 1, oldMatrix.m21); newMatrix.set(2, 2, oldMatrix.m22); return newMatrix; }
/** * <code>set</code> sets the values of this matrix from an array of * values assuming that the data is rowMajor order; * * @param matrix * the matrix to set the value to. * @return this */ public Matrix3f set(float[] matrix) { return set(matrix, true); }
orient.set(0, 0, left.z); orient.set(0, 1, 0); orient.set(0, 2, left.x); orient.set(1, 0, 0); orient.set(1, 1, 1); orient.set(1, 2, 0); orient.set(2, 0, -left.x); orient.set(2, 1, 0); orient.set(2, 2, left.z); } else if (axis.z == 1) { left.x *= invLength; orient.set(0, 0, left.y); orient.set(0, 1, left.x); orient.set(0, 2, 0); orient.set(1, 0, -left.y); orient.set(1, 1, left.x); orient.set(1, 2, 0); orient.set(2, 0, 0); orient.set(2, 1, 0); orient.set(2, 2, 1);
float val = -c1 * u.get(i) * u.get(j) - c2 * v.get(i) set(i, j, val); set(i, i, val + 1.0f); hvxz = hvx * v.z; hvyz = hvz * v.y; set(0, 0, e + hvx * v.x); set(0, 1, hvxy - v.z); set(0, 2, hvxz + v.y); set(1, 0, hvxy + v.z); set(1, 1, e + h * v.y * v.y); set(1, 2, hvyz - v.x); set(2, 0, hvxz - v.y); set(2, 1, hvyz + v.x); set(2, 2, e + hvz * v.z);
/** * @return the physicsLocation */ public Matrix3f getPhysicsRotationMatrix(Matrix3f rot) { if (rot == null) { rot = new Matrix3f(); } gObject.getWorldTransform(tempTrans); Converter.convert(tempTrans.getRotation(tempRot), physicsLocation.getRotation()); return rot.set(physicsLocation.getRotation()); }
Matrix3f tempRot = vars.tempMat3; tempRot.set(geometry.getLocalRotation()); childCollisionShape.rotation.mult(tempRot, tempRot); geometry.setLocalRotation(tempRot);
tempRot.set(geometry.getLocalRotation()); childCollisionShape.rotation.mult(tempRot, tempRot); geometry.setLocalRotation(tempRot);
this.value = new Matrix3f(m3); } else { ((Matrix3f)this.value).set(m3);
transMatrix.set(trans.getRotation());
/** * <code>set</code> sets the values of this matrix from an array of * values assuming that the data is rowMajor order; * * @param matrix * the matrix to set the value to. * @return this */ public Matrix3f set(float[] matrix) { return set(matrix, true); }
/** * Copy constructor that creates a new <code>Matrix3f</code> object that * is the same as the provided matrix. * * @param mat * the matrix to copy. */ public Matrix3f(Matrix3f mat) { set(mat); }
public static com.jme3.math.Matrix3f convert(javax.vecmath.Matrix3f oldMatrix, com.jme3.math.Matrix3f newMatrix) { newMatrix.set(0, 0, oldMatrix.m00); newMatrix.set(0, 1, oldMatrix.m01); newMatrix.set(0, 2, oldMatrix.m02); newMatrix.set(1, 0, oldMatrix.m10); newMatrix.set(1, 1, oldMatrix.m11); newMatrix.set(1, 2, oldMatrix.m12); newMatrix.set(2, 0, oldMatrix.m20); newMatrix.set(2, 1, oldMatrix.m21); newMatrix.set(2, 2, oldMatrix.m22); return newMatrix; }
/** * <code>set</code> sets the values of this matrix from an array of * values assuming that the data is rowMajor order; * * @param matrix * the matrix to set the value to. * @return this */ public Matrix3f set(float[] matrix) { return set(matrix, true); }
public static com.jme3.math.Matrix3f convert(javax.vecmath.Matrix3f oldMatrix, com.jme3.math.Matrix3f newMatrix) { newMatrix.set(0, 0, oldMatrix.m00); newMatrix.set(0, 1, oldMatrix.m01); newMatrix.set(0, 2, oldMatrix.m02); newMatrix.set(1, 0, oldMatrix.m10); newMatrix.set(1, 1, oldMatrix.m11); newMatrix.set(1, 2, oldMatrix.m12); newMatrix.set(2, 0, oldMatrix.m20); newMatrix.set(2, 1, oldMatrix.m21); newMatrix.set(2, 2, oldMatrix.m22); return newMatrix; }
/** * Copy constructor that creates a new <code>Matrix3f</code> object that * is the same as the provided matrix. * * @param mat * the matrix to copy. */ public Matrix3f(Matrix3f mat) { set(mat); }
public static Matrix3f vecMathMatrixToJMEMatrix3f(Matrix3D original) { Matrix3f target = new Matrix3f(); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) target.set(i, j, (float) original.getElement(i, j)); return target; }
/** * @return the physicsLocation */ public Matrix3f getPhysicsRotationMatrix(Matrix3f rot) { if (rot == null) { rot = new Matrix3f(); } gObject.getWorldTransform(tempTrans); Converter.convert(tempTrans.getRotation(tempRot), physicsLocation.getRotation()); return rot.set(physicsLocation.getRotation()); }