public void setOrCreate(int i, FrameTuple3DReadOnly frameTuple) { getAndGrowIfNeeded(i).setIncludingFrame(frameTuple); }
public void set(int i, FrameTuple3DReadOnly frameTuple) { get(i).setIncludingFrame(frameTuple); }
private void unsafeSet(int i, FrameTuple3DReadOnly frameTuple) { unsafeGet(i).setIncludingFrame(frameTuple); }
public void copyFromListAndTrimSize(List<? extends FrameTuple3DReadOnly> otherList) { for (int i = 0; i < otherList.size(); i++) { getAndGrowIfNeeded(i).setIncludingFrame(otherList.get(i)); } while(size() > otherList.size()) { remove(size() - 1); } }
/** * Multiply this frameMatrix3D by the FrameTuple frameTupleOriginal and and place the result * into the FrameTuple frameTupleToPack (frameTupleToPack = this * frameTupleOriginal). * @param frameTupleOriginal the FrameTuple to be multiplied by this frameMatrix3D * @param frameTupleToPack the FrameTuple into which the product is placed * @throws ReferenceFrameMismatchException */ public void transform(FrameTuple3DReadOnly frameTupleOriginal, FrameTuple3DBasics frameTupleToPack) { checkReferenceFrameMatch(frameTupleOriginal); frameTupleToPack.setIncludingFrame(frameTupleOriginal); matrix.transform(frameTupleToPack); }
/** * Gets the position and orientation. * * @param positionToPack the tuple used to store the position. Modified. * @param orientationToPack the orientation used to store the orientation. Modified. */ default void get(FrameTuple3DBasics positionToPack, Orientation3DBasics orientationToPack) { positionToPack.setIncludingFrame(getPosition()); orientationToPack.set(getOrientation()); }
/** * Gets the position and orientation. * * @param positionToPack the tuple used to store the position. Modified. * @param orientationToPack the orientation used to store the orientation. Modified. */ default void get(FrameTuple3DBasics positionToPack, FrameOrientation3DBasics orientationToPack) { positionToPack.setIncludingFrame(getPosition()); orientationToPack.setIncludingFrame(getOrientation()); }
public void getDerivative(int order, double x, FrameTuple3DBasics dQuantity) { dQuantity.setIncludingFrame(referenceFrame, xTrajectory.getDerivative(order, x), yTrajectory.getDerivative(order, x), zTrajectory.getDerivative(order, x)); }
public void getDerivative(int order, double x, FrameTuple3DBasics dQuantity) { dQuantity.setIncludingFrame(referenceFrame, xTrajectory.getDerivative(order, x), yTrajectory.getDerivative(order, x), zTrajectory.getDerivative(order, x)); }
public void copyFromListAndTrimSize(FrameTupleArrayList<?> otherList) { for (int i = 0; i < otherList.size(); i++) { getAndGrowIfNeeded(i).setIncludingFrame(otherList.get(i)); } while(size() > otherList.size()) { remove(size() - 1); } }
Tuple3DBasics tuple = new Vector3D(); assertEquals(initialFrame, frameTuple.getReferenceFrame()); frameTuple.setIncludingFrame(newFrame, x, y, z); tuple.set(x, y, z); assertEquals(newFrame, frameTuple.getReferenceFrame()); Tuple3DBasics tuple = new Vector3D(); assertEquals(initialFrame, frameTuple.getReferenceFrame()); frameTuple.setIncludingFrame(newFrame, input, z); tuple.set(input, z); assertEquals(newFrame, frameTuple.getReferenceFrame()); Tuple3DBasics tuple = new Vector3D(); assertEquals(initialFrame, frameTuple.getReferenceFrame()); frameTuple.setIncludingFrame(newFrame, input); tuple.set(input); assertEquals(newFrame, frameTuple.getReferenceFrame()); frameTuple.setIncludingFrame(newFrame, input); if (expectedException != null) throw new AssertionError("Should have thrown an exception."); frameTuple.setIncludingFrame(newFrame, startIndex, input); if (expectedException != null) throw new AssertionError("Should have thrown an exception."); frameTuple.setIncludingFrame(newFrame, input); if (expectedException != null) throw new AssertionError("Should have thrown an exception.");