java.lang.Object
com.github.stephengold.joltjni.operator.Op

public final class Op extends Object
Java equivalents for the overloaded operators of Jolt Physics.
  • Method Details

    • assign

      public static ConstColor assign(Color left, ConstColor right)
      Copy the right argument to the left one. (native operator: binary =)
      Parameters:
      left - the matrix to modify (not null)
      right - the value to assign (not null, unaffected)
      Returns:
      the assigned value, for chaining
    • assign

      public static Mat44Arg assign(Mat44 left, Mat44Arg right)
      Copy the right argument to the left one. (native operator: binary =)
      Parameters:
      left - the matrix to modify (not null)
      right - the value to assign (not null, unaffected)
      Returns:
      the assigned value, for chaining
    • assign

      public static RMat44Arg assign(RMat44 left, RMat44Arg right)
      Copy the right argument to the left one. (native operator: binary =)
      Parameters:
      left - the matrix to modify (not null)
      right - the value to assign (not null, unaffected)
      Returns:
      the assigned value, for chaining
    • assign

      public static RVec3Arg assign(RVec3 left, RVec3Arg right)
      Copy the right argument to the left one. (native operator: binary =)
      Parameters:
      left - the vector to modify (not null)
      right - the value to assign (not null, unaffected)
      Returns:
      the assigned value, for chaining
    • assign

      public static Vec3Arg assign(Vec3 left, Vec3Arg right)
      Copy the right argument to the left one. (native operator: binary =)
      Parameters:
      left - the vector to modify (not null)
      right - the value to assign (not null, unaffected)
      Returns:
      the assigned value, for chaining
    • isEqual

      public static boolean isEqual(ConstColor left, ConstColor right)
      Test whether the specified colors are equal. (native operator: binary ==)
      Parameters:
      left - the first color to test (not null, unaffected)
      right - the 2nd color to test (not null, unaffected)
      Returns:
      true if equal, false if unequal
    • isEqual

      public static boolean isEqual(Mat44Arg left, Mat44Arg right)
      Test whether the specified matrices are equal. (native operator: binary ==)
      Parameters:
      left - the first matrix (not null, unaffected)
      right - the 2nd matrix (not null, unaffected)
      Returns:
      true if equal, otherwise false
    • minus

      public static RVec3 minus(RVec3Arg right)
      Return the negative of the specified vector. (native operator: unary -)
      Parameters:
      right - the input vector (not null, unaffected)
      Returns:
      a new vector
    • minus

      public static RVec3 minus(RVec3Arg left, RVec3Arg right)
      Return the component-wise difference of the specified vectors. (native operator: binary -)
      Parameters:
      left - the base vector (not null, unaffected)
      right - the offset to subtract (not null, unaffected)
      Returns:
      a new vector
    • minus

      public static RVec3 minus(RVec3Arg left, Vec3Arg right)
      Return the component-wise difference of the specified vectors. (native operator: binary -)
      Parameters:
      left - the base vector (not null, unaffected)
      right - the offset to subtract (not null, unaffected)
      Returns:
      a new vector
    • minus

      public static Vec3 minus(Vec3Arg right)
      Return the negative of the specified vector. (native operator: unary -)
      Parameters:
      right - the input vector (not null, unaffected)
      Returns:
      a new vector
    • minus

      public static Vec3 minus(Vec3Arg left, Vec3Arg right)
      Return the component-wise difference of the specified vectors. (native operator: binary -)
      Parameters:
      left - the first vector (not null, unaffected)
      right - the vector to subtract (not null, unaffected)
      Returns:
      a new vector
    • minusEquals

      public static void minusEquals(Vec3 left, Vec3Arg right)
      Subtract the 2nd argument from the first argument. (native operator: binary -=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the vector to subtract (not null, unaffected)
    • notEqual

      public static boolean notEqual(ConstColor left, ConstColor right)
      Test whether the specified colors are unequal. (native operator: binary !=)
      Parameters:
      left - the first color to test (not null, unaffected)
      right - the 2nd color to test (not null, unaffected)
      Returns:
      false if equal, true if unequal
    • plus

      public static RVec3 plus(RVec3Arg left, Float3 right)
      Return the component-wise sum of the specified vectors. (native operator: binary +)
      Parameters:
      left - the first vector (not null, unaffected)
      right - the 2nd vector (not null, unaffected)
      Returns:
      a new vector
    • plus

      public static RVec3 plus(RVec3Arg left, RVec3Arg right)
      Return the component-wise sum of the specified vectors. (native operator: binary +)
      Parameters:
      left - the first vector (not null, unaffected)
      right - the 2nd vector (not null, unaffected)
      Returns:
      a new vector
    • plus

      public static RVec3 plus(RVec3Arg left, Vec3Arg right)
      Return the component-wise sum of the specified vectors. (native operator: binary +)
      Parameters:
      left - the base vector (not null, unaffected)
      right - the offset to add (not null, unaffected)
      Returns:
      a new vector
    • plus

      public static RVec3 plus(Vec3Arg left, RVec3Arg right)
      Return the component-wise sum of the specified vectors. (native operator: binary +)
      Parameters:
      left - the first vector (not null, unaffected)
      right - the 2nd vector (not null, unaffected)
      Returns:
      a new vector
    • plus

      public static Vec3 plus(Vec3Arg left, Vec3Arg right)
      Return the component-wise sum of the specified vectors. (native operator: binary +)
      Parameters:
      left - the first vector (not null, unaffected)
      right - the 2nd vector (not null, unaffected)
      Returns:
      a new vector
    • plusEquals

      public static void plusEquals(RVec3 left, RVec3Arg right)
      Add the right argument to the left argument. (native operator: binary +=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the vector to add (not null, unaffected)
    • plusEquals

      public static void plusEquals(RVec3 left, Vec3Arg right)
      Add the right argument to the left argument. (native operator: binary +=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the vector to add (not null, unaffected)
    • plusEquals

      public static void plusEquals(Vec3 left, RVec3Arg right)
      Add the 2nd argument to the first argument. (native operator: binary +=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the vector to add (not null, unaffected)
    • plusEquals

      public static void plusEquals(Vec3 left, Vec3Arg right)
      Add the 2nd argument to the first argument. (native operator: binary +=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the vector to add (not null, unaffected)
    • slash

      public static RVec3 slash(RVec3Arg left, double right)
      Return a scaled version of the specified vector. (native operator: binary /)
      Parameters:
      left - the input vector (not null, unaffected)
      right - the inverse scale to apply
      Returns:
      a new vector
    • slash

      public static Vec3 slash(Vec3Arg left, float right)
      Return a scaled version of the specified vector. (native operator: binary /)
      Parameters:
      left - the input vector (not null, unaffected)
      right - the inverse scale to apply
      Returns:
      a new vector
    • slashEquals

      public static void slashEquals(RVec3 left, double right)
      Divide the left argument by the right argument. (native operator: binary /=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the denominator (not null, unaffected)
    • slashEquals

      public static void slashEquals(Vec3 left, float right)
      Divide the left argument by the right argument. (native operator: binary /=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the denominator (not null, unaffected)
    • star

      public static RVec3 star(double left, RVec3Arg right)
      Return a scaled version of the specified vector. (native operator: binary *)
      Parameters:
      left - the scale to apply
      right - the input vector (not null, unaffected)
      Returns:
      a new vector
    • star

      public static Quat star(float left, QuatArg right)
      Return a scaled version of the specified quaternion. (native operator: binary *)
      Parameters:
      left - the scale to apply
      right - the input quaternion (not null, unaffected)
      Returns:
      a new quaternion
    • star

      public static Vec3 star(float left, Vec3Arg right)
      Return a scaled version of the specified vector. (native operator: binary *)
      Parameters:
      left - the scale to apply
      right - the input vector (not null, unaffected)
      Returns:
      a new vector
    • star

      public static Vec3 star(Mat44Arg left, Vec3Arg right)
      Return the specified matrix multiplied by the specified column vector, with the 4th component of the right factor implied to be one. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new vector
    • star

      public static Mat44 star(Mat44Arg left, Mat44Arg right)
      Return the product of the specified matrices. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new matrix
    • star

      public static Quat star(QuatArg left, QuatArg right)
      Return the product of the specified quaternions. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new quaternion
    • star

      public static Vec3 star(QuatArg left, Vec3Arg right)
      Rotate the specified vector by the specified unit quaternion. (native operator: binary *)
      Parameters:
      left - the rotation to apply (not null, normalized, unaffected)
      right - the vector to apply it to (not null, unaffected)
      Returns:
      a new vector
    • star

      public static RMat44 star(RMat44Arg left, Mat44Arg right)
      Return the product of the specified matrices. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new matrix
    • star

      public static RMat44 star(RMat44Arg left, RMat44Arg right)
      Return the product of the specified matrices. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new vector
    • star

      public static RVec3 star(RMat44Arg left, RVec3Arg right)
      Return the specified matrix multiplied by the specified column vector, with the 4th component of the right factor implied to be one. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new vector
    • star

      public static RVec3 star(RMat44Arg left, Vec3Arg right)
      Return the specified matrix multiplied by the specified column vector, with the 4th component of the right factor implied to be one. (native operator: binary *)
      Parameters:
      left - the left factor (not null, unaffected)
      right - the right factor (not null, unaffected)
      Returns:
      a new vector
    • star

      public static Vec3 star(Vec3Arg left, float right)
      Return a scaled version of the specified vector. (native operator: binary *)
      Parameters:
      left - the input vector (not null, unaffected)
      right - the scale to apply
      Returns:
      a new vector
    • star

      public static Vec3 star(Vec3Arg left, QuatArg right)
      Rotate the specified vector by the conjugate of the specified unit quaternion. (native operator: binary *)
      Parameters:
      left - the input vector (not null, unaffected)
      right - the conjugate of the rotation to apply (not null, normalized, unaffected)
      Returns:
      a new vector
    • star

      public static Vec3 star(Vec3Arg left, Vec3Arg right)
      Return the component-wise product of the specified vectors. (native operator: binary *)
      Parameters:
      left - the first vector (not null, unaffected)
      right - the 2nd vector (not null, unaffected)
      Returns:
      a new vector
    • starEquals

      public static void starEquals(Vec3 left, float right)
      Scale the left argument by the right argument. (native operator: binary *=)
      Parameters:
      left - the accumulating vector (not null, modified)
      right - the scale factor to apply (not null, unaffected)