Module org.elasticsearch.geo
Record Class SimplificationErrorCalculator.RotationMatrix
java.lang.Object
java.lang.Record
org.elasticsearch.geometry.simplify.SimplificationErrorCalculator.RotationMatrix
- Enclosing interface:
SimplificationErrorCalculator
This 3D rotation matrix allows for rotating 3D vectors (eg. Point3D above) about a specified axis (also Point3D)
and by a specified angle in radian.
-
Constructor Summary
ConstructorsConstructorDescriptionRotationMatrix(double[][] matrix) Creates an instance of aRotationMatrixrecord class.RotationMatrix(SimplificationErrorCalculator.Point3D axis, double angleInRadian) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.double[][]matrix()Returns the value of thematrixrecord component.Perform the rotation by multiplying this matrix by the incoming vectorfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RotationMatrix
public RotationMatrix(double[][] matrix) Creates an instance of aRotationMatrixrecord class.- Parameters:
matrix- the value for thematrixrecord component
-
RotationMatrix
-
-
Method Details
-
multiply
public SimplificationErrorCalculator.Point3D multiply(SimplificationErrorCalculator.Point3D incoming) Perform the rotation by multiplying this matrix by the incoming vector -
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. All components in this record class are compared withObjects::equals(Object,Object). -
matrix
public double[][] matrix()Returns the value of thematrixrecord component.- Returns:
- the value of the
matrixrecord component
-