Class VectorHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.VectorHelper
A class containing utility methods for Vectors and Matrices
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.joml.Vector4f
copyVector4f
(org.joml.Vector4f src) static org.joml.Vector3f
crossProduct
(org.joml.Vector3f one, org.joml.Vector3f two) static org.joml.Vector3f
getInverse
(org.joml.Vector3f target) static org.joml.Matrix4f
matrix4fFromFloat
(float val) static org.joml.Matrix4f
matrix4FromFloatArray
(float[] vals) static org.joml.Matrix4f
matrix4FromLocRot
(float xl, float yl, float zl, float xr, float yr, float zr) static org.joml.Matrix4f
mul
(org.joml.Matrix4f target, float factor, org.joml.Matrix4f dest) static org.joml.Vector4f
mul
(org.joml.Vector4f target, float factor, org.joml.Vector4f dest) static double[]
rotate
(double x, double y, double radians) static org.joml.Vector3f
Vec3fFromStrings
(String x, String y, String z)
-
Constructor Details
-
VectorHelper
public VectorHelper()
-
-
Method Details
-
rotate
public static double[] rotate(double x, double y, double radians) -
matrix4FromLocRot
public static org.joml.Matrix4f matrix4FromLocRot(float xl, float yl, float zl, float xr, float yr, float zr) -
matrix4FromFloatArray
public static org.joml.Matrix4f matrix4FromFloatArray(float[] vals) -
matrix4fFromFloat
public static org.joml.Matrix4f matrix4fFromFloat(float val) -
mul
public static org.joml.Vector4f mul(org.joml.Vector4f target, float factor, org.joml.Vector4f dest) -
mul
public static org.joml.Matrix4f mul(org.joml.Matrix4f target, float factor, org.joml.Matrix4f dest) -
getInverse
public static org.joml.Vector3f getInverse(org.joml.Vector3f target) -
Vec3fFromStrings
-
copyVector4f
public static org.joml.Vector4f copyVector4f(org.joml.Vector4f src) -
crossProduct
public static org.joml.Vector3f crossProduct(org.joml.Vector3f one, org.joml.Vector3f two)
-