/** * Sets this wrench to {@code other} including the reference frames. * * @param other the other wrench used to update {@code this}. Not modified. */ default void setIncludingFrame(WrenchReadOnly other) { setIncludingFrame(other.getBodyFrame(), other); }
/** * Sets this wrench to {@code spatialVector} and updates all its reference frames. * * @param bodyFrame the body frame associated with the given spatial force. * @param spatialVector the spatial vector to copy values from. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, SpatialVectorReadOnly spatialVector) { setBodyFrame(bodyFrame); setIncludingFrame(spatialVector); }
/** * Sets this wrench's components from the given array {@code array} and updates all its reference * frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param startIndex the first index to start reading from in the array. * @param array the array containing the new values for this wrench's components. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, int startIndex, double[] array) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, startIndex, array); }
/** * Sets this wrench given an angular part and linear part and updates all its reference frames. * * @param bodyFrame the body frame associated with the given spatial force. * @param angularPart the vector holding the new values for the angular part. Not modified. * @param linearPart the vector holding the new values for the linear part. Not modified. * @throws ReferenceFrameMismatchException if the given {@code angularPart} and * {@code linearPart} are not expressed in the same reference frame. */ default void setIncludingFrame(ReferenceFrame bodyFrame, FrameVector3DReadOnly angularPart, FrameVector3DReadOnly linearPart) { setBodyFrame(bodyFrame); setIncludingFrame(angularPart, linearPart); }
/** * Sets this motion vector given an angular part and linear part and updates all its reference * frames. * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the given motion is expressed. * @param angularPart the vector holding the new values for the angular part. Not modified. * @param linearPart the vector holding the new values for the linear part. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, Vector3DReadOnly angularPart, Vector3DReadOnly linearPart) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, angularPart, linearPart); }
/** * Sets this wrench's components from the given array {@code array} and updates all its reference * frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param array the array containing the new values for this wrench's components. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, float[] array) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, array); }
/** * Sets this wrench's components from the given array {@code array} and updates all its reference * frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param startIndex the first index to start reading from in the array. * @param array the array containing the new values for this wrench's components. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, int startIndex, float[] array) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, startIndex, array); }
/** * Sets this wrench's components from the given column vector starting to read from * {@code startRow} at the column index {@code column} and updates all its reference frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param startRow the first row index to start reading in the dense-matrix. * @param matrix the column vector containing the new values for this wrench's components. Not * modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, int startRow, DenseMatrix64F matrix) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, startRow, matrix); }
/** * Sets this wrench's components from the given column vector starting to read from its first row * index and updates all its reference frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param startRow the first row index to start reading in the dense-matrix. * @param column the column index to read in the dense-matrix. * @param matrix the column vector containing the new values for this wrench's components. Not * modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, int startRow, int column, DenseMatrix64F matrix) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, startRow, column, matrix); }
/** * Sets this wrench's components from the given array {@code array} and updates all its reference * frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param array the array containing the new values for this wrench's components. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, double[] array) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, array); }
/** * Sets this wrench's components from the given column vector starting to read from * {@code startRow} and updates all its reference frames. * <p> * The components are read in the following order: {@code angularPartX}, {@code angularPartY}, * {@code angularPartZ}, {@code linearPartX}, {@code linearPartY}, {@code linearPartZ}. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the data is expressed. * @param matrix the column vector containing the new values for this wrench's components. Not * modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, DenseMatrix64F matrix) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, matrix); }
/** * Sets this wrench given a 3D moment and 3D force that are exerted at {@code pointOfApplication} * and updates this vector reference frame. * <p> * Effectively, this wrench is updated as follow: * * <pre> * τ<sub>this</sub> = τ<sub>new</sub> + P × f<sub>new</sub> * f<sub>this</sub> = f<sub>new</sub> * </pre> * * where τ and f are the angular and linear parts respectively, and P is the * {@code pointOfApplication}. * </p> * <p> * When the given {@code angularPart} is {@code null}, it is assumed to be zero. * </p> * * @param bodyFrame the body frame associated with the given spatial force. * @param expressedInFrame the reference frame in which the arguments are expressed. * @param angularPart the 3D moment that is applied. Can be {@code null}. Not modified. * @param linearPart the 3D force that is applied. Not modified. * @param pointOfApplication the location where the force is exerted. Not modified. */ default void setIncludingFrame(ReferenceFrame bodyFrame, ReferenceFrame expressedInFrame, Vector3DReadOnly angularPart, Vector3DReadOnly linearPart, Point3DReadOnly pointOfApplication) { setBodyFrame(bodyFrame); setIncludingFrame(expressedInFrame, angularPart, linearPart, pointOfApplication); }
setIncludingFrame(angularPart, linearPart, pointOfApplication);