BRDFLafortuneFitting.Program.Vector3.Rotate C# (CSharp) Метод

Rotate() публичный Метод

public Rotate ( System.Vector3 &_Axis, double _Angle, System.Vector3 &_Out ) : void
_Axis System.Vector3
_Angle double
_Out System.Vector3
Результат void
            public void Rotate( ref Vector3 _Axis, double _Angle, out Vector3 _Out )
            {
                double	cos_ang = Math.Cos( _Angle );
                double	sin_ang = Math.Sin( _Angle );

                _Out.x = x * cos_ang;
                _Out.y = y * cos_ang;
                _Out.z = z * cos_ang;

                double	temp = Dot( ref _Axis );
                        temp *= 1.0-cos_ang;

                _Out.x += _Axis.x * temp;
                _Out.y += _Axis.y * temp;
                _Out.z += _Axis.z * temp;

                _Axis.Cross( ref this, out TempCross );

                _Out.x += TempCross.x * sin_ang;
                _Out.y += TempCross.y * sin_ang;
                _Out.z += TempCross.z * sin_ang;
            }