All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.euclid.referenceFrame.interfaces.FixedFrameVector3DBasics Maven / Gradle / Ivy

package us.ihmc.euclid.referenceFrame.interfaces;

import us.ihmc.euclid.referenceFrame.ReferenceFrame;
import us.ihmc.euclid.referenceFrame.exceptions.ReferenceFrameMismatchException;
import us.ihmc.euclid.tuple3D.interfaces.Tuple3DReadOnly;
import us.ihmc.euclid.tuple3D.interfaces.Vector3DBasics;

/**
 * Write and read interface for a 3D vector expressed in a constant reference frame, i.e. the
 * reference frame of this object cannot be changed via this interface.
 * 

* In addition to representing a {@link Vector3DBasics}, a {@link ReferenceFrame} is associated to a * {@code FixedFrameVector3DBasics}. This allows, for instance, to enforce, at runtime, that * operations on vectors occur in the same coordinate system. *

*

* Because a {@code FixedFrameVector3DBasics} extends {@code Vector3DBasics}, it is compatible with * methods only requiring {@code Vector3DBasics}. However, these methods do NOT assert that the * operation occur in the proper coordinate system. Use this feature carefully and always prefer * using methods requiring {@code FixedFrameVector3DBasics}. *

*/ public interface FixedFrameVector3DBasics extends FrameVector3DReadOnly, FixedFrameTuple3DBasics, Vector3DBasics { /** * Sets this frame vector to the cross product of {@code this} and {@code other}. *

* this = this × other *

* * @param other the second frame vector in the cross product. Not modified. * @throws ReferenceFrameMismatchException if {@code other} is not expressed in the same reference * frame as {@code this}. */ default void cross(FrameVector3DReadOnly other) { cross((FrameTuple3DReadOnly) other); } /** * Sets this frame vector to the cross product of {@code this} and {@code frameTuple3DReadOnly}. *

* this = this × frameTuple3DReadOnly *

* * @param frameTuple3DReadOnly the second frame tuple in the cross product. Not modified. * @throws ReferenceFrameMismatchException if {@code frameTuple3DReadOnly} is not expressed in the * same reference frame as {@code this}. */ default void cross(FrameTuple3DReadOnly frameTuple3DReadOnly) { checkReferenceFrameMatch(frameTuple3DReadOnly); Vector3DBasics.super.cross(frameTuple3DReadOnly); } /** * Sets this frame vector to the cross product of {@code frameVector1} and {@code frameVector2}. *

* this = frameVector1 × frameVector2 *

* * @param frameVector1 the first frame vector in the cross product. Not modified. * @param frameVector2 the second frame vector in the cross product. Not modified. * @throws ReferenceFrameMismatchException if either {@code frameVector1} or {@code frameVector2} is * not expressed in the same reference frame as * {@code this}. */ default void cross(FrameVector3DReadOnly frameVector1, FrameVector3DReadOnly frameVector2) { cross((FrameTuple3DReadOnly) frameVector1, (FrameTuple3DReadOnly) frameVector2); } /** * Sets this frame vector to the cross product of {@code frameTuple1} and {@code frameTuple2}. *

* this = frameTuple1 × frameTuple2 *

* * @param frameTuple1 the first frame tuple in the cross product. Not modified. * @param frameTuple2 the second frame tuple in the cross product. Not modified. * @throws ReferenceFrameMismatchException if either {@code frameTuple1} or {@code frameTuple2} is * not expressed in the same reference frame as * {@code this}. */ default void cross(FrameTuple3DReadOnly frameTuple1, FrameTuple3DReadOnly frameTuple2) { checkReferenceFrameMatch(frameTuple1, frameTuple2); Vector3DBasics.super.cross(frameTuple1, frameTuple2); } /** * Sets this frame vector to the cross product of {@code frameTuple1} and {@code tuple2}. *

* this = frameTuple1 × tuple2 *

* * @param frameTuple1 the first frame tuple in the cross product. Not modified. * @param tuple2 the second tuple in the cross product. Not modified. * @throws ReferenceFrameMismatchException if {@code frameTuple1} is not expressed in the same * reference frame as {@code this}. */ default void cross(FrameTuple3DReadOnly frameTuple1, Tuple3DReadOnly tuple2) { checkReferenceFrameMatch(frameTuple1); Vector3DBasics.super.cross(frameTuple1, tuple2); } /** * Sets this frame vector to the cross product of {@code tuple1} and {@code frameTuple2}. *

* this = tuple1 × frameTuple2 *

* * @param tuple1 the first tuple in the cross product. Not modified. * @param frameTuple2 the second frame tuple in the cross product. Not modified. * @throws ReferenceFrameMismatchException if {@code frameTuple2} is not expressed in the same * reference frame as {@code this}. */ default void cross(Tuple3DReadOnly tuple1, FrameTuple3DReadOnly frameTuple2) { checkReferenceFrameMatch(frameTuple2); Vector3DBasics.super.cross(tuple1, frameTuple2); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy