Skip to content

Commit

Permalink
Op: added RMat44 times Vec3 method
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Oct 15, 2024
1 parent 3b4f0d5 commit 0b575d6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/java/com/github/stephengold/joltjni/operator/Op.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ of this software and associated documentation files (the "Software"), to deal
import com.github.stephengold.joltjni.readonly.ConstColor;
import com.github.stephengold.joltjni.readonly.Mat44Arg;
import com.github.stephengold.joltjni.readonly.QuatArg;
import com.github.stephengold.joltjni.readonly.RMat44Arg;
import com.github.stephengold.joltjni.readonly.RVec3Arg;
import com.github.stephengold.joltjni.readonly.Vec3Arg;

Expand Down Expand Up @@ -247,6 +248,20 @@ public static Vec3 multiply(Mat44Arg left, Vec3Arg right) {
return result;
}

/**
* 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 {@code *})
*
* @param left the left factor (not null, unaffected)
* @param right the right factor (not null, unaffected)
* @return a new vector
*/
public static RVec3 multiply(RMat44Arg left, Vec3Arg right) {
RVec3 result = left.multiply3x4(right);
return result;
}

/**
* Return the product of the specified quaternions. (native operator: binary
* {@code *})
Expand Down

0 comments on commit 0b575d6

Please sign in to comment.