Sets this to a rotation matrix that rotates one vector onto another.

@return a reference to this matrix, for chaining.
351768
public Matrix3 setToRotation (IVector3 from, IVector3 to) {
        float angle = from.angle(to);
        return (angle < 0.0001f) ?
            setToIdentity() : setToRotation(angle, from.cross(to).normalizeLocal());
    }
1139071
public Matrix4 set (IMatrix4 other) {
        return set(other.m00(), other.m10(), other.m20(), other.m30(),
                   other.m01(), other.m11(), other.m21(), other.m31(),
                   other.m02(), other.m12(), other.m22(), other.m32(),
                   other.m03(), other.m13(), other.m23(), other.m33());
    }
33717
public Matrix4f set(Matrix4x3fc m) {
        if (m instanceof Matrix4x3f) {
            MemUtil.INSTANCE.copy((Matrix4x3f) m, this);
        } else {
            setMatrix4x3fc(m);
        }
        this._properties(m.properties() | PROPERTY_AFFINE);
        return this;
    }
636940
public Matrix4f getOffsetMatrix()
    {
        Matrix4f offsetMatrix = new Matrix4f();
        offsetMatrix.set(NativeBone.getOffsetMatrix(getNative()));
        return offsetMatrix;
    }
880920
public Matrix copy()
    {
        Matrix X = new Matrix(m, n);
        double[][] C = X.getArray();
        for (int i = 0; i < m; i++)
        {
            for (int j = 0; j < n; j++)
            {
                C[i][j] = A[i][j];
            }
        }
        return X;
    }
1350799
public Matrix getS () {
		Matrix X = new Matrix(n,n);
		double[][] S = X.getArray();
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				S[i][j] = 0.0;
			}
			S[i][i] = this.s[i];
		}
		return X;
	}
92823
public Matrix4d set3x3(Matrix4dc mat) {
        m00 = mat.m00();
        m01 = mat.m01();
        m02 = mat.m02();
        m10 = mat.m10();
        m11 = mat.m11();
        m12 = mat.m12();
        m20 = mat.m20();
        m21 = mat.m21();
        m22 = mat.m22();
        properties &= mat.properties() & ~(PROPERTY_PERSPECTIVE);
        return this;
    }
240913
public Matrix4 set (DoubleBuffer buf) {
        m00 = buf.get(); m01 = buf.get(); m02 = buf.get(); m03 = buf.get();
        m10 = buf.get(); m11 = buf.get(); m12 = buf.get(); m13 = buf.get();
        m20 = buf.get(); m21 = buf.get(); m22 = buf.get(); m23 = buf.get();
        m30 = buf.get(); m31 = buf.get(); m32 = buf.get(); m33 = buf.get();
        return this;
    }
1105523
public void applyMatrix()
	{
		transformMatrix.translate(new Vector3f(-0.5F, -0.5F, -0.5F));

		for (Vertex v : vertexes)
			v.applyMatrix(transformMatrix);

		resetMatrix();

		return;
	}
309465
public Matrix4 setToRotation (float angle, IVector3 axis) {
        return setToRotation(angle, axis.x(), axis.y(), axis.z());
    }
305271
public Matrix3x2fStack pushMatrix() {
        if (curr == mats.length) {
            throw new IllegalStateException("max stack size of " + (curr + 1) + " reached"); //$NON-NLS-1$ //$NON-NLS-2$
        }
        mats[curr++].set(this);
        return this;
    }
1086064
public Matrix4f getViewMatrix() {
        if (updateViewMatrix) {
            rotationMatrixInverse = Matrix4f.createRotation(rotation);
            final Matrix4f rotationMatrix = Matrix4f.createRotation(rotation.invert());
            final Matrix4f positionMatrix = Matrix4f.createTranslation(position.negate());
            viewMatrix = rotationMatrix.mul(positionMatrix);
            updateViewMatrix = false;
        }
        return viewMatrix;
    }
270453
public Vector3 set (IVector3 other) {
        return set(other.x(), other.y(), other.z());
    }
142033
public Quaternion set (double x, double y, double z, double w) {
        this.x = x;
        this.y = y;
        this.z = z;
        this.w = w;
        return this;
    }
736918
public Vector normalize() {
        double length = length();

        x /= length;
        y /= length;
        z /= length;

        return this;
    }
1284733
public Matrix4 setToTransform (IVector3 translation, IQuaternion rotation) {
        return setToRotation(rotation).setTranslation(translation);
    }
785568
public Matrix4x3d set3x3(Matrix4x3dc mat) {
        m00 = mat.m00();
        m01 = mat.m01();
        m02 = mat.m02();
        m10 = mat.m10();
        m11 = mat.m11();
        m12 = mat.m12();
        m20 = mat.m20();
        m21 = mat.m21();
        m22 = mat.m22();
        properties &= mat.properties();
        return this;
    }