/* (non-Javadoc)
@see org.joml.Matrix4fc#transformAffine(float, float, float, float, org.joml.Vector4f)
192436
public Vector4f transformAffine(float x, float y, float z, float w, Vector4f dest) {
        dest.x = x;
        dest.y = y;
        dest.z = z;
        dest.w = w;
        return dest.mulAffine(this, dest);
    }
1000338
public FloatBuffer getAsMatrix4f(FloatBuffer dest) {
        MemUtil.INSTANCE.putMatrix4f(this, dest.position(), dest);
        return dest;
    }
1094104
public Vector3d transform(Vector3d vec){
        return transform(vec.x, vec.y, vec.z, vec);
    }
78390
@Override
	public void transform(Transform3D transform) {
		if (transform!=null) {
			Point3D p = new Point3f();
			for(int i=0; i<this.numCoords;) {
				p.set(this.coords[i], this.coords[i+1], this.coords[i+2]);
				transform.transform(p);
				this.coords[i++] = p.getX();
				this.coords[i++] = p.getY();
				this.coords[i++] = p.getZ();
			}
			this.graphicalBounds = null;
			this.logicalBounds = null;
		}
	}
594676
public Vector3f transform(Vector3fc vec, Vector3f dest) {
        return transform(vec.x(), vec.y(), vec.z(), dest);
    }
302563
public Matrix4 setToTransform (IVector3 translation, IQuaternion rotation, IVector3 scale) {
        double sx = scale.x(), sy = scale.y(), sz = scale.z();
        return setToRotation(rotation).set(
            m00 * sx, m10 * sy, m20 * sz, translation.x(),
            m01 * sx, m11 * sy, m21 * sz, translation.y(),
            m02 * sx, m12 * sy, m22 * sz, translation.z(),
            0f, 0f, 0f, 1f);
    }
290293
public Matrix4f invert(Matrix4f dest) {
        if ((properties & PROPERTY_IDENTITY) != 0) {
            return dest.identity();
        } else if ((properties & PROPERTY_TRANSLATION) != 0)
            return invertTranslation(dest);
        else if ((properties & PROPERTY_ORTHONORMAL) != 0)
            return invertOrthonormal(dest);
        else if ((properties & PROPERTY_AFFINE) != 0)
            return invertAffine(dest);
        else if ((properties & PROPERTY_PERSPECTIVE) != 0)
            return invertPerspective(dest);
        return invertGeneric(dest);
    }
618709
public Vector3f transformProject(float x, float y, float z, Vector3f dest) {
        dest.x = x;
        dest.y = y;
        dest.z = z;
        return dest.mulProject(this);
    }
137932
public Vector4d transformAffine(double x, double y, double z, double w, Vector4d dest) {
        double rx = m00 * x + m10 * y + m20 * z + m30 * w;
        double ry = m01 * x + m11 * y + m21 * z + m31 * w;
        double rz = m02 * x + m12 * y + m22 * z + m32 * w;
        dest.x = rx;
        dest.y = ry;
        dest.z = rz;
        dest.w = w;
        return dest;
    }
504009
public Vector3f transformTranspose(Vector3fc v, Vector3f dest) {
        v.mulTranspose(this, dest);
        return dest;
    }
380349
@Override
	protected void doTransform(ITransformable.Scale transformable, float comp)
	{
		float fromX = reversed ? this.toX : this.fromX;
		float toX = reversed ? this.fromX : this.toX;
		float fromY = reversed ? this.toY : this.fromY;
		float toY = reversed ? this.fromY : this.toY;
		float fromZ = reversed ? this.toZ : this.fromZ;
		float toZ = reversed ? this.fromZ : this.toZ;

		transformable.scale(fromX + (toX - fromX) * comp, fromY + (toY - fromY) * comp, fromZ + (toZ - fromZ) * comp, offsetX, offsetY,
				offsetZ);
	}
1208075
public FDistort affine(double a11, double a12, double a21, double a22,
						   double dx, double dy) {

		PixelTransformAffine_F32 transform;

		if( outputToInput != null && outputToInput instanceof PixelTransformAffine_F32 ) {
			transform = (PixelTransformAffine_F32)outputToInput;
		} else {
			transform = new PixelTransformAffine_F32();
		}

		Affine2D_F32 m = new Affine2D_F32();

		m.a11 = (float)a11;
		m.a12 = (float)a12;
		m.a21 = (float)a21;
		m.a22 = (float)a22;
		m.tx = (float)dx;
		m.ty = (float)dy;

		m.invert(transform.getModel());

		return transform(transform);
	}
778722
@Override
	protected void doTransform(Size<T> transformable, float comp)
	{
		int fromWidth = reversed ? this.toWidth : this.fromWidth;
		int toWidth = reversed ? this.fromWidth : this.toWidth;
		int fromHeight = reversed ? this.toHeight : this.fromHeight;
		int toHeight = reversed ? this.fromHeight : this.toHeight;

		transformable.setSize((int) (fromWidth + (toWidth - fromWidth) * comp), (int) (fromHeight + (toHeight - fromHeight) * comp));
	}
840470
public Vector4d transformProject(double x, double y, double z, double w, Vector4d dest) {
        double invW = 1.0 / (m03 * x + m13 * y + m23 * z + m33 * w);
        dest.set((m00 * x + m10 * y + m20 * z + m30 * w) * invW,
                 (m01 * x + m11 * y + m21 * z + m31 * w) * invW,
                 (m02 * x + m12 * y + m22 * z + m32 * w) * invW,
                 1.0);
        return dest;
    }
1033150
public Surface transform (float m00, float m01, float m10, float m11, float tx, float ty) {
    AffineTransform top = tx();
    Transforms.multiply(top, m00, m01, m10, m11, tx, ty, top);
    return this;
  }
1225757
public Matrix transform(MatrixFunction function) {
        Matrix result = blank();
        MatrixIterator it = iterator();

        while (it.hasNext()) {
            double x  = it.next();
            int i = it.rowIndex();
            int j = it.columnIndex();
            result.set(i, j, function.evaluate(i, j, x));
        }

        return result;
    }
746493
public Matrix4 setToTransform (IVector3 translation, IQuaternion rotation, double scale) {
        return setToRotation(rotation).set(
            m00 * scale, m10 * scale, m20 * scale, translation.x(),
            m01 * scale, m11 * scale, m21 * scale, translation.y(),
            m02 * scale, m12 * scale, m22 * scale, translation.z(),
            0f, 0f, 0f, 1f);
}