Radegast.Rendering.Camera.Rotate C# (CSharp) Method

Rotate() public method

public Rotate ( float delta, bool horizontal ) : void
delta float
horizontal bool
return void
        public void Rotate(float delta, bool horizontal)
        {
            Manual = true;
            Vector3 direction = Position - FocalPoint;
            if (horizontal)
            {
                Position = FocalPoint + direction * new Quaternion(0f, 0f, (float)Math.Sin(delta), (float)Math.Cos(delta));
            }
            else
            {
                Position = FocalPoint + direction * Quaternion.CreateFromAxisAngle(direction % Vector3.UnitZ, delta);
            }
        }