/** * Sets this tuple's components {@code x}, {@code y}, {@code z} in order from the given array * {@code tupleArray} and sets this tuple frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame for this tuple. * @param tupleArray the array containing the new values for this tuple's components. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, double[] tupleArray) { setReferenceFrame(referenceFrame); set(tupleArray); }
actual.set(initialFrame, expected); actual.set(createRandomFramelessTuple(random)); actual.set(differentFrame, createRandomFramelessTuple(random)); fail("Should have thrown a ReferenceFrameMismatchException"); actual.set(initialFrame, expected.getX(), expected.getY(), expected.getZ()); actual.set(createRandomFramelessTuple(random)); actual.set(differentFrame, random.nextDouble(), random.nextDouble(), random.nextDouble()); fail("Should have thrown a ReferenceFrameMismatchException");
/** * Sets this frame tuple to {@code tuple3DReadOnly} and sets its current frame to * {@code referenceFrame}. * * @param referenceFrame the new reference frame for this frame tuple. * @param tuple3DReadOnly the tuple to copy the values from. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, Tuple3DReadOnly tuple3DReadOnly) { setReferenceFrame(referenceFrame); set(tuple3DReadOnly); }
/** * Sets this frame tuple x and y components to {@code tuple2DReadOnly}'s x and y components, the * z-component to the given {@code z}, and sets the current frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame for this frame tuple. * @param tuple2DReadOnly the tuple to copy the values from. Not modified. * @param z the new z-coordinate for this frame tuple. */ default void setIncludingFrame(ReferenceFrame referenceFrame, Tuple2DReadOnly tuple2DReadOnly, double z) { setReferenceFrame(referenceFrame); set(tuple2DReadOnly, z); }
/** * Sets this tuple's components {@code x}, {@code y}, {@code z} in order from the given array * {@code tupleArray} and sets this tuple frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame for this tuple. * @param startIndex the first index to start reading from in the array. * @param tupleArray the array containing the new values for this tuple's components. Not modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, int startIndex, double[] tupleArray) { setReferenceFrame(referenceFrame); set(startIndex, tupleArray); }
/** * Sets this tuple's components {@code x}, {@code y}, {@code z} in order from the given column * vector starting to read from its first row index and sets this tuple frame to * {@code referenceFrame}. * * @param referenceFrame the new reference frame for this tuple. * @param matrix the column vector containing the new values for this tuple's components. Not * modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, DenseMatrix64F matrix) { setReferenceFrame(referenceFrame); set(matrix); }
/** * Sets this frame tuple's components to {@code x}, {@code y}, and {@code z} and sets its reference * frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame for this frame tuple. * @param x the new value for the x-component of this tuple. * @param y the new value for the y-component of this tuple. * @param z the new value for the z-component of this tuple. */ default void setIncludingFrame(ReferenceFrame referenceFrame, double x, double y, double z) { setReferenceFrame(referenceFrame); set(x, y, z); }
/** * Sets this tuple's components {@code x}, {@code y}, {@code z} in order from the given column * vector starting to read from {@code startRow} and sets this tuple frame to * {@code referenceFrame}. * * @param referenceFrame the new reference frame for this tuple. * @param startRow the first row index to start reading in the dense-matrix. * @param matrix the column vector containing the new values for this tuple's components. Not * modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, int startRow, DenseMatrix64F matrix) { setReferenceFrame(referenceFrame); set(startRow, matrix); }
/** * Sets this tuple's components {@code x}, {@code y}, {@code z} in order from the given matrix * starting to read from {@code startRow} at the column index {@code column} and sets this tuple * frame to {@code referenceFrame}. * * @param referenceFrame the new reference frame for this tuple. * @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 tuple's components. Not * modified. */ default void setIncludingFrame(ReferenceFrame referenceFrame, int startRow, int column, DenseMatrix64F matrix) { setReferenceFrame(referenceFrame); set(startRow, column, matrix); }
/** * Sets this frame tuple to {@code other}. * * @param other the other frame tuple to copy the values and reference frame from. Not modified. */ default void setIncludingFrame(FrameTuple3DReadOnly other) { setReferenceFrame(other.getReferenceFrame()); set((Tuple3DReadOnly) other); }
/** * Sets this frame tuple x and y components to {@code tuple2DReadOnly}'s x and y components, the * z-component to the given {@code z}, and sets the current frame to * {@code frameTuple2DReadOnly.getReferenceFrame()}. * * @param frameTuple2DReadOnly the tuple to copy the values and reference frame from. Not modified. * @param z the new z-coordinate for this frame tuple. */ default void setIncludingFrame(FrameTuple2DReadOnly frameTuple2DReadOnly, double z) { setReferenceFrame(frameTuple2DReadOnly.getReferenceFrame()); set((Tuple2DReadOnly) frameTuple2DReadOnly, z); }