public final double getX() { return tuple.getX(); }
public final boolean containsInfinity() { return Double.isInfinite(tuple.getX()) || Double.isInfinite(tuple.getY()) || Double.isInfinite(tuple.getZ()); }
public final double[] toArray() { return new double[] {tuple.getX(), tuple.getY(), tuple.getZ()}; }
protected static final void cross(Vector3d resultToPack, Tuple3d t1, Tuple3d t2) { double x, y; x = t1.getY() * t2.getZ() - t1.getZ() * t2.getY(); y = t2.getX() * t1.getZ() - t2.getZ() * t1.getX(); resultToPack.setZ(t1.getX() * t2.getY() - t1.getY() * t2.getX()); resultToPack.setX(x); resultToPack.setY(y); }
public void setPosition(Tuple3d jointTranslation) { this.jointTranslation.set(jointTranslation.getX(), 0.0, jointTranslation.getZ()); afterJointFrame.setTranslation(this.jointTranslation); }
/** * Sets this transform to have rotation described by axisAngle and * translation described in the Vector3d argument vector. * * @param axisAngle */ public final void set(AxisAngle4d axisAngle, Tuple3d translation) { setRotation(axisAngle); setTranslation(translation.getX(), translation.getY(), translation.getZ()); }
/** * Set this transform to have translation described in vector * and a rotation equal to the Matrix3d matrix. * * @param matrix */ public final void set(Matrix3d matrix, Tuple3d translation) { setRotation(matrix); setTranslation(translation.getX(), translation.getY(), translation.getZ()); }
public final void scale(double scaleXFactor, double scaleYFactor, double scaleZFactor) { tuple.setX(tuple.getX() * scaleXFactor); tuple.setY(tuple.getY() * scaleYFactor); tuple.setZ(tuple.getZ() * scaleZFactor); }
public static void setDenseMatrixFromTuple3d(DenseMatrix64F matrixToPack, Tuple3d tuple, int startRow, int startColumn) { matrixToPack.set(startRow + 0, startColumn, tuple.getX()); matrixToPack.set(startRow + 1, startColumn, tuple.getY()); matrixToPack.set(startRow + 2, startColumn, tuple.getZ()); }
public static void insertTuple3dIntoEJMLVector(Tuple3d tuple3d, DenseMatrix64F ejmlVector, int startIndex) { ejmlVector.set(startIndex + 0, 0, tuple3d.getX()); ejmlVector.set(startIndex + 1, 0, tuple3d.getY()); ejmlVector.set(startIndex + 2, 0, tuple3d.getZ()); }
/** * Sets the value of this tuple to the sum of itself and tuple1. * @param tuple1 the other Tuple3d */ public final void add(double x, double y, double z) { tuple.setX(tuple.getX() + x); tuple.setY(tuple.getY() + y); tuple.setZ(tuple.getZ() + z); }
public void update(Tuple3d tuple) { xDot.update(tuple.getX()); yDot.update(tuple.getY()); zDot.update(tuple.getZ()); }
/** * Sets the value of this tuple to the difference of itself and tuple1 (this -= tuple1). * @param tuple1 the other Tuple3d */ public final void sub(double x, double y, double z) { tuple.setX(tuple.getX() - x); tuple.setY(tuple.getY() - y); tuple.setZ(tuple.getZ() - z); }
public static Vector3d generateRandomVector(Random random, Tuple3d boundary1, Tuple3d boundary2) { Vector3d ret = new Vector3d(); ret.setX(generateRandomDouble(random, boundary1.getX(), boundary2.getX())); ret.setY(generateRandomDouble(random, boundary1.getY(), boundary2.getY())); ret.setZ(generateRandomDouble(random, boundary1.getZ(), boundary2.getZ())); return ret; }
public static Affine createAffineFromQuaternionAndTuple(Quat4d quaternion, Tuple3d translation) { RigidBodyTransform transform = new RigidBodyTransform(); transform.setRotation(quaternion); transform.setTranslation(translation.getX(), translation.getY(), translation.getZ()); return convertRigidBodyTransformToAffine(transform); }
public static void vectorToSkewSymmetricMatrix(DenseMatrix64F matrixToPack, Tuple3d tuple) { matrixToPack.set(0, 0, 0.0); matrixToPack.set(0, 1, -tuple.getZ()); matrixToPack.set(0, 2, tuple.getY()); matrixToPack.set(1, 0, tuple.getZ()); matrixToPack.set(1, 1, 0.0); matrixToPack.set(1, 2, -tuple.getX()); matrixToPack.set(2, 0, -tuple.getY()); matrixToPack.set(2, 1, tuple.getX()); matrixToPack.set(2, 2, 0.0); }
public static void roundToGivenPrecisionForAngles(Tuple3d tuple3d, double precision) { tuple3d.setX(roundToGivenPrecisionForAngle(tuple3d.getX(), precision)); tuple3d.setY(roundToGivenPrecisionForAngle(tuple3d.getY(), precision)); tuple3d.setZ(roundToGivenPrecisionForAngle(tuple3d.getZ(), precision)); }
public static void roundToGivenPrecision(Tuple3d tuple3d, double precision) { tuple3d.setX(roundToPrecision(tuple3d.getX(), precision)); tuple3d.setY(roundToPrecision(tuple3d.getY(), precision)); tuple3d.setZ(roundToPrecision(tuple3d.getZ(), precision)); }
public static void subEquals(Translate translateToModify, Tuple3d offset) { translateToModify.setX(translateToModify.getX() - offset.getX()); translateToModify.setY(translateToModify.getY() - offset.getY()); translateToModify.setZ(translateToModify.getZ() - offset.getZ()); } }
public static void addEquals(Translate translateToModify, Tuple3d offset) { translateToModify.setX(translateToModify.getX() + offset.getX()); translateToModify.setY(translateToModify.getY() + offset.getY()); translateToModify.setZ(translateToModify.getZ() + offset.getZ()); }