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. If null, 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

    Constructors
    Constructor
    Description
    IcpTransformation(javax.vecmath.Vector3d translation, Quaternion rotation, double scaleFactor, javax.vecmath.Tuple3d rotCenter)
    Creates an instance of a IcpTransformation record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the rotation record component.
    javax.vecmath.Tuple3d
    Returns the value of the rotCenter record component.
    double
    Returns the value of the scaleFactor record component.
    final String
    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 the translation record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • IcpTransformation

      public IcpTransformation(javax.vecmath.Vector3d translation, Quaternion rotation, double scaleFactor, javax.vecmath.Tuple3d rotCenter)
      Creates an instance of a IcpTransformation record class.
      Parameters:
      translation - the value for the translation record component
      rotation - the value for the rotation record component
      scaleFactor - the value for the scaleFactor record component
      rotCenter - the value for the rotCenter 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 point
      scale - 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • translation

      public javax.vecmath.Vector3d translation()
      Returns the value of the translation record component.
      Returns:
      the value of the translation record component
    • rotation

      public Quaternion rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • scaleFactor

      public double scaleFactor()
      Returns the value of the scaleFactor record component.
      Returns:
      the value of the scaleFactor record component
    • rotCenter

      public javax.vecmath.Tuple3d rotCenter()
      Returns the value of the rotCenter record component.
      Returns:
      the value of the rotCenter record component