java.lang.Object
java.lang.Record
simpa.core.api.utils.LocalFrame
public record LocalFrame(org.apache.commons.math3.geometry.euclidean.threed.Vector3D lx, org.apache.commons.math3.geometry.euclidean.threed.Vector3D ly, org.apache.commons.math3.geometry.euclidean.threed.Vector3D lz)
extends Record
Object representing a local coordinate system.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalFrame(org.apache.commons.math3.geometry.euclidean.threed.Vector3D lx, org.apache.commons.math3.geometry.euclidean.threed.Vector3D ly, org.apache.commons.math3.geometry.euclidean.threed.Vector3D lz) Creates an instance of aLocalFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.org.apache.commons.math3.geometry.euclidean.threed.Vector3DgetLocalShiftedPoint(org.apache.commons.math3.geometry.euclidean.threed.Vector3D basePoint, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift) Get a point near the given base point shifted by the a vector which is rotated to the local frame.final inthashCode()Returns a hash code value for this object.org.apache.commons.math3.geometry.euclidean.threed.Vector3Dlx()Returns the value of thelxrecord component.org.apache.commons.math3.geometry.euclidean.threed.Vector3Dly()Returns the value of thelyrecord component.org.apache.commons.math3.geometry.euclidean.threed.Vector3Dlz()Returns the value of thelzrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
LocalFrame
public LocalFrame(org.apache.commons.math3.geometry.euclidean.threed.Vector3D lx, org.apache.commons.math3.geometry.euclidean.threed.Vector3D ly, org.apache.commons.math3.geometry.euclidean.threed.Vector3D lz) Creates an instance of aLocalFramerecord class.- Parameters:
lx- the value for thelxrecord componently- the value for thelyrecord componentlz- the value for thelzrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
getLocalShiftedPoint
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getLocalShiftedPoint(org.apache.commons.math3.geometry.euclidean.threed.Vector3D basePoint, org.apache.commons.math3.geometry.euclidean.threed.Vector3D shift) Get a point near the given base point shifted by the a vector which is rotated to the local frame.- Parameters:
basePoint- The point to be shiftedshift- Shift in the local system.- Returns:
- - A point in the global frame shifted by the given vector in the local frame.
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
lx
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D lx()Returns the value of thelxrecord component.- Returns:
- the value of the
lxrecord component
-
ly
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D ly()Returns the value of thelyrecord component.- Returns:
- the value of the
lyrecord component
-
lz
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D lz()Returns the value of thelzrecord component.- Returns:
- the value of the
lzrecord component
-