Package cz.fidentis.analyst.engines.icp
Record Class IcpTransformation
java.lang.Object
java.lang.Record
cz.fidentis.analyst.engines.icp.IcpTransformation
- Record Components:
translation
- Translation represents translation of ComputedFacet on x, y, z axis.rotation
- Rotation is represented by Quaternion (x, y, z coordinate and scalar component).scaleFactor
- ScaleFactor represents scale between two objects. In case there is no scale the value is 1.rotCenter
- Center of rotation of the transformed object. It is the center of the static object towards which the transform object is to be registered. Ifnull
, then the center of the origin is taken into account.
public record IcpTransformation(javax.vecmath.Vector3d translation, Quaternion rotation, double scaleFactor, javax.vecmath.Tuple3d rotCenter)
extends Record
IcpTransformation class is holding computed data for transformation.
-
Constructor Summary
ConstructorsConstructorDescriptionIcpTransformation
(javax.vecmath.Vector3d translation, Quaternion rotation, double scaleFactor, javax.vecmath.Tuple3d rotCenter) Creates an instance of aIcpTransformation
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.rotation()
Returns the value of therotation
record component.javax.vecmath.Tuple3d
Returns the value of therotCenter
record component.double
Returns the value of thescaleFactor
record component.final String
toString()
Returns a string representation of this record class.javax.vecmath.Vector3d
transformNormal
(javax.vecmath.Vector3d normal) Rotates the normal vector accordingly.javax.vecmath.Point3d
transformPoint
(javax.vecmath.Point3d point, boolean scale) Apply transformation to given 3D point.javax.vecmath.Vector3d
Returns the value of thetranslation
record component.
-
Constructor Details
-
IcpTransformation
public IcpTransformation(javax.vecmath.Vector3d translation, Quaternion rotation, double scaleFactor, javax.vecmath.Tuple3d rotCenter) Creates an instance of aIcpTransformation
record class.- Parameters:
translation
- the value for thetranslation
record componentrotation
- the value for therotation
record componentscaleFactor
- the value for thescaleFactor
record componentrotCenter
- the value for therotCenter
record component
-
-
Method Details
-
transformPoint
public javax.vecmath.Point3d transformPoint(javax.vecmath.Point3d point, boolean scale) Apply transformation to given 3D point.- Parameters:
point
- Original pointscale
- Whether to scale as well- Returns:
- transformed point or
null
-
transformNormal
public javax.vecmath.Vector3d transformNormal(javax.vecmath.Vector3d normal) Rotates the normal vector accordingly.- Parameters:
normal
- Normal vector- Returns:
- transformed point or
null
-
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. -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
translation
public javax.vecmath.Vector3d translation()Returns the value of thetranslation
record component.- Returns:
- the value of the
translation
record component
-
rotation
Returns the value of therotation
record component.- Returns:
- the value of the
rotation
record component
-
scaleFactor
public double scaleFactor()Returns the value of thescaleFactor
record component.- Returns:
- the value of the
scaleFactor
record component
-
rotCenter
public javax.vecmath.Tuple3d rotCenter()Returns the value of therotCenter
record component.- Returns:
- the value of the
rotCenter
record component
-