OpenTkEngine.Core.Graphics.TranslateWorld C# (CSharp) Method

TranslateWorld() public static method

public static TranslateWorld ( Vector3 translation ) : void
translation Vector3
return void
        public static void TranslateWorld(Vector3 translation)
        {
            if (_worldMatrixStack.Count != 0)
            {
                Matrix4 currentMatrix = (Matrix4)_worldMatrixStack.Peek();
                _worldMatrixStack.Pop();
                currentMatrix *= Matrix4.CreateTranslation(translation);
                _worldMatrixStack.Push(currentMatrix);
            }
            else
            {
                _worldMatrix *= Matrix4.CreateTranslation(translation);
            }
            _worldMatrixChanged = true;
        }