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 aLocalFrame
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.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.final int
hashCode()
Returns a hash code value for this object.org.apache.commons.math3.geometry.euclidean.threed.Vector3D
lx()
Returns the value of thelx
record component.org.apache.commons.math3.geometry.euclidean.threed.Vector3D
ly()
Returns the value of thely
record component.org.apache.commons.math3.geometry.euclidean.threed.Vector3D
lz()
Returns the value of thelz
record 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 aLocalFrame
record class.- Parameters:
lx
- the value for thelx
record componently
- the value for thely
record componentlz
- the value for thelz
record 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 thelx
record component.- Returns:
- the value of the
lx
record component
-
ly
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D ly()Returns the value of thely
record component.- Returns:
- the value of the
ly
record component
-
lz
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D lz()Returns the value of thelz
record component.- Returns:
- the value of the
lz
record component
-