public Matrix4d shadow(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform, Matrix4d dest) { // compute plane equation by transforming (y = 0) double a = planeTransform.m10(); double b = planeTransform.m11(); double c = planeTransform.m12(); double d = -a * planeTransform.m30() - b * planeTransform.m31() - c * planeTransform.m32(); return shadow(lightX, lightY, lightZ, lightW, a, b, c, d, dest); }
public Matrix4d shadow(double lightX, double lightY, double lightZ, double lightW, Matrix4dc planeTransform, Matrix4d dest) { // compute plane equation by transforming (y = 0) double a = planeTransform.m10(); double b = planeTransform.m11(); double c = planeTransform.m12(); double d = -a * planeTransform.m30() - b * planeTransform.m31() - c * planeTransform.m32(); return shadow(lightX, lightY, lightZ, lightW, a, b, c, d, dest); }
public Vector3d mulDirection(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z; double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z; double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z; dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector3d mulTransposeDirection(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m01() * y + mat.m02() * z; double ry = mat.m10() * x + mat.m11() * y + mat.m12() * z; double rz = mat.m20() * x + mat.m21() * y + mat.m22() * z; dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector3f mulDirection(Matrix4dc mat, Vector3f dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z; double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z; double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z; dest.x = (float) rx; dest.y = (float) ry; dest.z = (float) rz; return dest; }
public Vector3d mulTransposeDirection(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m01() * y + mat.m02() * z; double ry = mat.m10() * x + mat.m11() * y + mat.m12() * z; double rz = mat.m20() * x + mat.m21() * y + mat.m22() * z; dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector3f mulDirection(Matrix4dc mat, Vector3f dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z; double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z; double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z; dest.x = (float) rx; dest.y = (float) ry; dest.z = (float) rz; return dest; }
public Matrix4d shadow(Vector4dc light, Matrix4dc planeTransform, Matrix4d dest) { // compute plane equation by transforming (y = 0) double a = planeTransform.m10(); double b = planeTransform.m11(); double c = planeTransform.m12(); double d = -a * planeTransform.m30() - b * planeTransform.m31() - c * planeTransform.m32(); return shadow(light.x(), light.y(), light.z(), light.w(), a, b, c, d, dest); }
public Matrix4d shadow(Vector4dc light, Matrix4dc planeTransform, Matrix4d dest) { // compute plane equation by transforming (y = 0) double a = planeTransform.m10(); double b = planeTransform.m11(); double c = planeTransform.m12(); double d = -a * planeTransform.m30() - b * planeTransform.m31() - c * planeTransform.m32(); return shadow(light.x(), light.y(), light.z(), light.w(), a, b, c, d, dest); }
public Vector3d mulTransposePosition(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m01() * y + mat.m02() * z + mat.m03(); double ry = mat.m10() * x + mat.m11() * y + mat.m12() * z + mat.m13(); double rz = mat.m20() * x + mat.m21() * y + mat.m22() * z + mat.m23(); dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector3d mulPosition(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30(); double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31(); double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32(); dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector4d mulAffine(Matrix4dc mat, Vector4d dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30() * w; double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31() * w; double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32() * w; dest.x = rx; dest.y = ry; dest.z = rz; dest.w = w; return dest; }
public Vector4d mulAffine(Matrix4dc mat, Vector4d dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30() * w; double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31() * w; double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32() * w; dest.x = rx; dest.y = ry; dest.z = rz; dest.w = w; return dest; }
public Vector3d mulPosition(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30(); double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31(); double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32(); dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector3d mulTransposePosition(Matrix4dc mat, Vector3d dest) { double rx = mat.m00() * x + mat.m01() * y + mat.m02() * z + mat.m03(); double ry = mat.m10() * x + mat.m11() * y + mat.m12() * z + mat.m13(); double rz = mat.m20() * x + mat.m21() * y + mat.m22() * z + mat.m23(); dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
public Vector3d mulProject(Matrix4dc mat, Vector3d dest) { double invW = 1.0 / (mat.m03() * x + mat.m13() * y + mat.m23() * z + mat.m33()); double rx = (mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30()) * invW; double ry = (mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31()) * invW; double rz = (mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32()) * invW; dest.x = rx; dest.y = ry; dest.z = rz; return dest; }
private Vector4d mulGeneric(Matrix4dc mat, Vector4d dest) { double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30() * w; double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31() * w; double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32() * w; double rw = mat.m03() * x + mat.m13() * y + mat.m23() * z + mat.m33() * w; dest.x = rx; dest.y = ry; dest.z = rz; dest.w = rw; return dest; }
public Vector4d mulProject(Matrix4dc mat, Vector4d dest) { double invW = 1.0 / (mat.m03() * x + mat.m13() * y + mat.m23() * z + mat.m33() * w); double rx = (mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30()) * invW; double ry = (mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31()) * invW; double rz = (mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32()) * invW; dest.x = rx; dest.y = ry; dest.z = rz; dest.w = 1.0; return dest; }
public double mulPositionW(Matrix4dc mat, Vector3d dest) { double w = mat.m03() * x + mat.m13() * y + mat.m23() * z + mat.m33(); double rx = mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30(); double ry = mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31(); double rz = mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32(); dest.x = rx; dest.y = ry; dest.z = rz; return w; }
public Vector3d mulProject(Matrix4dc mat, Vector3d dest) { double invW = 1.0 / (mat.m03() * x + mat.m13() * y + mat.m23() * z + mat.m33()); double rx = (mat.m00() * x + mat.m10() * y + mat.m20() * z + mat.m30()) * invW; double ry = (mat.m01() * x + mat.m11() * y + mat.m21() * z + mat.m31()) * invW; double rz = (mat.m02() * x + mat.m12() * y + mat.m22() * z + mat.m32()) * invW; dest.x = rx; dest.y = ry; dest.z = rz; return dest; }