Class Op
java.lang.Object
com.github.stephengold.joltjni.operator.Op
Java equivalents for the overloaded operators of Jolt Physics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RVec3Return the component-wise sum of the specified vectors.static Vec3Return the component-wise sum of the specified vectors.static Vec3Return a scaled version of the specified vector.static voiddivideEquals(RVec3 left, double right) Divide the left argument by the right argument.static booleanequals(ConstBodyId id1, ConstBodyId id2) Test whether the specified IDs are equal.static booleanequals(ConstColor c1, ConstColor c2) Test whether the specified colors are equal.static booleanTest whether the specified matrices are equal.static voidminusEquals(Vec3 left, Vec3Arg right) Subtract the 2nd argument from the first argument.static QuatReturn a scaled version of the specified quaternion.static Vec3Return a scaled version of the specified vector.static QuatReturn the product of the specified quaternions.static Vec3Return a scaled version of the specified vector.static Vec3Return the component-wise product of the specified vectors.static Vec3Return the negative of the specified vector.static booleannotEqual(ConstColor c1, ConstColor c2) Test whether the specified colors are unequal.static voidplusEquals(RVec3 left, RVec3Arg right) Add the right argument to the left argument.static voidplusEquals(RVec3 left, Vec3Arg right) Add the right argument to the left argument.static voidplusEquals(Vec3 left, Vec3Arg right) Add the 2nd argument to the first argument.static Vec3Rotate the specified vector by the specified unit quaternion.static RVec3Return the component-wise difference of the specified vectors.static RVec3Return the component-wise difference of the specified vectors.static Vec3Return the component-wise difference of the specified vectors.
-
Method Details
-
add
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
-
add
Return the component-wise sum of the specified vectors. (native operator: binary+)- Parameters:
v1- the first vector (not null, unaffected)v2- the 2nd vector (not null, unaffected)- Returns:
- a new vector
-
divide
Return a scaled version of the specified vector. (native operator: binary/)- Parameters:
v- the input vector (not null, unaffected)scale- the inverse scale to apply- Returns:
- a new vector
-
divideEquals
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)
-
equals
Test whether the specified IDs are equal. (native operator:==)- Parameters:
id1- the first ID to test (not null, unaffected)id2- the 2nd ID to test (not null, unaffected)- Returns:
- true if equal, false if unequal
-
equals
Test whether the specified colors are equal. (native operator:==)- Parameters:
c1- the first color to test (not null, unaffected)c2- the 2nd color to test (not null, unaffected)- Returns:
- true if equal, false if unequal
-
equals
Test whether the specified matrices are equal. (native operator:==)- Parameters:
m1- the first matrix (not null, unaffected)m2- the 2nd matrix (not null, unaffected)- Returns:
- true if equal, otherwise false
-
minusEquals
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)
-
multiply
Return a scaled version of the specified quaternion. (native operator: binary*)- Parameters:
scale- the scale to applyv- the input quaternion (not null, unaffected)- Returns:
- a new quaternion
-
multiply
Return a scaled version of the specified vector. (native operator: binary*)- Parameters:
scale- the scale to applyv- the input vector (not null, unaffected)- Returns:
- a new vector
-
multiply
Return the product of the specified quaternions. (native operator: binary*)- Parameters:
lhs- the left factor (not null, unaffected)rhs- the right factor (not null, unaffected)- Returns:
- a new quaternion
-
multiply
Return a scaled version of the specified vector. (native operator: binary*)- Parameters:
v- the input vector (not null, unaffected)scale- the scale to apply- Returns:
- a new vector
-
multiply
Return the component-wise product of the specified vectors. (native operator: binary*)- Parameters:
v1- the first vector (not null, unaffected)v2- the 2nd vector (not null, unaffected)- Returns:
- a new vector
-
negate
Return the negative of the specified vector. (native operator: unary-)- Parameters:
v- the input vector (not null, unaffected)- Returns:
- a new vector
-
notEqual
Test whether the specified colors are unequal. (native operator:!=)- Parameters:
c1- the first color to test (not null, unaffected)c2- the 2nd color to test (not null, unaffected)- Returns:
- false if equal, true if unequal
-
plusEquals
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
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
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)
-
rotate
Rotate the specified vector by the specified unit quaternion. (native operator: binary*)- Parameters:
lhs- the rotation to apply (not null, normalized, unaffected)rhs- the vector to apply it to (not null, unaffected)- Returns:
- a new vector
-
subtract
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
-
subtract
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
-
subtract
Return the component-wise difference of the specified vectors. (native operator: binary-)- Parameters:
v1- the first vector (not null, unaffected)v2- the vector to subtract (not null, unaffected)- Returns:
- a new vector
-