AccidentalNoise.ImplicitBasisFunction.SetRotationAngle C# (CSharp) Method

SetRotationAngle() private method

private SetRotationAngle ( Double x, Double y, Double z, Double angle ) : void
x Double
y Double
z Double
angle Double
return void
        private void SetRotationAngle(Double x, Double y, Double z, Double angle)
        {
            this.rotationMatrix[0, 0] = 1 + (1 - Math.Cos(angle)) * (x * x - 1);
            this.rotationMatrix[1, 0] = -z * Math.Sin(angle) + (1 - Math.Cos(angle)) * x * y;
            this.rotationMatrix[2, 0] = y * Math.Sin(angle) + (1 - Math.Cos(angle)) * x * z;

            this.rotationMatrix[0, 1] = z * Math.Sin(angle) + (1 - Math.Cos(angle)) * x * y;
            this.rotationMatrix[1, 1] = 1 + (1 - Math.Cos(angle)) * (y * y - 1);
            this.rotationMatrix[2, 1] = -x * Math.Sin(angle) + (1 - Math.Cos(angle)) * y * z;

            this.rotationMatrix[0, 2] = -y * Math.Sin(angle) + (1 - Math.Cos(angle)) * x * z;
            this.rotationMatrix[1, 2] = x * Math.Sin(angle) + (1 - Math.Cos(angle)) * y * z;
            this.rotationMatrix[2, 2] = 1 + (1 - Math.Cos(angle)) * (z * z - 1);
        }