Interface GeomAPI

All Known Implementing Classes:
GeomModule

public interface GeomAPI
API definition for the geometry module, GeomModule.

The geometry module provides calls and methods to carry out geometrical operations directly within the scripting system.

  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    cross3(double[] vec1, double[] vec2)
    Computes the cross product between the two 3D vectors.
    double
    dot3(double[] vec1, double[] vec2)
    Computes the dot product between the two 3D vectors.
    double[]
    rotate2(double[] vector, double angle)
    Rotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the Y axis points up.
    double[]
    rotate3(double[] vector, double[] axis, double angle)
    Rotates a 3D vector around the given axis by the specified angle in degrees.
  • Method Details

    • rotate3

      double[] rotate3(double[] vector, double[] axis, double angle)
      Rotates a 3D vector around the given axis by the specified angle in degrees. Vectors are arrays with 3 components. If more components are there, they are ignored.
      Parameters:
      vector - Vector to rotate, with at least 3 components.
      axis - The axis, with at least 3 components.
      angle - Angle in degrees.
      Returns:
      The new vector, rotated.
    • rotate2

      double[] rotate2(double[] vector, double angle)
      Rotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the Y axis points up.
      Parameters:
      vector - Vector to rotate, with at least 2 components.
      Returns:
      The new vector, rotated.
    • cross3

      double[] cross3(double[] vec1, double[] vec2)
      Computes the cross product between the two 3D vectors.
      Parameters:
      vec1 - First 3D vector.
      vec2 - Second 3D vector.
      Returns:
      Cross product 3D vector.
    • dot3

      double dot3(double[] vec1, double[] vec2)
      Computes the dot product between the two 3D vectors.
      Parameters:
      vec1 - First 3D vector.
      vec2 - Second 3D vector.
      Returns:
      The dot product scalar.