/** * Sets the X coordinate of the linear velocity part of the spatial motion vector */ public void setLinearPartX(double val) { linearPart.setX(val); }
/** * Sets the X coordinate of the angular part of the spatial force vector */ public void setAngularPartX(double val) { angularPart.setX(val); }
/** * Sets the X coordinate of the linear part of the spatial force vector */ public void setLinearPartX(double val) { linearPart.setX(val); }
public void packPosition(Vector3d position) { position.setX(this.position[0]); position.setY(this.position[1]); position.setZ(this.position[2]); }
public Vector3d getAngularVelocityForReading() { Vector3d angularVelocity = jointTwist.getAngularPart(); angularVelocity.setX(0.0); angularVelocity.setZ(0.0); return angularVelocity; }
/** * Pack the standard deviation along each principal axis in the Vector3d. * @param principalStandardDeviationToPack The standard deviation is stored in the Vector3d as follows: x is the standard deviation on the principal axis, y on the secondary axis, and z on the third axis. */ public void getStandardDeviation(Vector3d principalStandardDeviationToPack) { principalStandardDeviationToPack.setX(Math.sqrt(variance.getX())); principalStandardDeviationToPack.setY(Math.sqrt(variance.getY())); principalStandardDeviationToPack.setZ(Math.sqrt(variance.getZ())); }
/** * Computes and returns the scale. * * @return */ public final void getScale(Vector3d scaleToPack) { computeScale(); scaleToPack.setX(scale1); scaleToPack.setY(scale2); scaleToPack.setZ(scale3); }
public void getLinearAcceleration(Vector3d linearAccelerationToPack) { linearAccelerationToPack.setX(jointAcceleration.getLinearPartX()); linearAccelerationToPack.setY(0.0); linearAccelerationToPack.setZ(jointAcceleration.getLinearPartZ()); }
/** * Pack the variance along each principal axis in the given Vector3d. * @param principalVarianceToPack The variance is stored in the Vector3d as follows: x is the variance on the principal axis, y on the secondary axis, and z on the third axis. */ public void getVariance(Vector3d principalVarianceToPack) { principalVarianceToPack.setX(variance.getX()); principalVarianceToPack.setY(variance.getY()); principalVarianceToPack.setZ(variance.getZ()); }
public void getYawPitchRoll(Vector3d yawPitchRoll) { yawPitchRoll.setX(yaw.getDoubleValue()); yawPitchRoll.setY(pitch.getDoubleValue()); yawPitchRoll.setZ(roll.getDoubleValue()); }
/** * Retrieves the normal of this planar region and stores it in the given {@link Vector3d}. * @param normalToPack used to store the normal of this planar region. */ public void getNormal(Vector3d normalToPack) { normalToPack.setX(fromLocalToWorldTransform.getM02()); normalToPack.setY(fromLocalToWorldTransform.getM12()); normalToPack.setZ(fromLocalToWorldTransform.getM22()); }
public void getPosition(Vector3d position) { position.setX(x.getDoubleValue()); position.setY(y.getDoubleValue()); position.setZ(z.getDoubleValue()); }
public void getVector(Vector3d vector3d) { vector3d.setX(x.getDoubleValue()); vector3d.setY(y.getDoubleValue()); vector3d.setZ(z.getDoubleValue()); }
public void getLinearAcceleration(Vector3d linearAccelerationToPack) { linearAccelerationToPack.setX(jointAcceleration.getLinearPartX()); linearAccelerationToPack.setY(jointAcceleration.getLinearPartY()); linearAccelerationToPack.setZ(jointAcceleration.getLinearPartZ()); } }
public void setTranslationAndUpdate(FrameVector2d translation) { translation.checkReferenceFrameMatch(parentFrame); this.translation.setX(translation.getX()); this.translation.setY(translation.getY()); this.update(); }
private void extractTandR(RigidBodyTransform tran, Vector3d T, Vector3d R) { tran.getTranslation(T); tran.getRotation(rotationMatrix); MatrixTools.matrix3DToDenseMatrix(rotationMatrix, m, 0, 0); ConvertRotation3D_F64.matrixToEuler(m, EulerType.XYZ, euler); R.setX(euler[0]); R.setY(euler[1]); R.setZ(euler[2]); }
public void setFramePose2DAndUpdate(FramePose2d framePose2d) { framePose2d.checkReferenceFrameMatch(parentFrame); this.rotation = framePose2d.getYaw(); this.translation.setX(framePose2d.getX()); this.translation.setY(framePose2d.getY()); this.update(); }
@Override public void setConfiguration(DenseMatrix64F matrix, int rowStart) { int index = rowStart; MatrixTools.extractQuat4dFromEJMLVector(jointRotation, matrix, rowStart); RotationTools.checkQuaternionNormalized(jointRotation); index += RotationTools.QUATERNION_SIZE; jointTranslation.setX(matrix.get(index++, 0)); jointTranslation.setY(matrix.get(index++, 0)); jointTranslation.setZ(matrix.get(index++, 0)); this.afterJointFrame.setRotation(jointRotation); this.afterJointFrame.setTranslation(jointTranslation); }
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; }
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); }