Example #1
0
 public Matrix4 GetMatrix()
 {
     if (_matrix == null)
     {
         _matrix = new Matrix4();
     }
     return(_matrix.SetToOrtho2D(this.x, this.y, this.width, this.height));
 }
Example #2
0
        public virtual Matrix4 ToViewMatrix4()
        {
            Dimension dim = LSystem.viewSize;

            if (projectionMatrix == null)
            {
                projectionMatrix = new Matrix4();
            }
            projectionMatrix.SetToOrtho2D(0, 0, dim.width * LSystem.GetScaleWidth(), dim.height * LSystem.GetScaleHeight());
            projectionMatrix.ThisCombine(this);
            return(projectionMatrix);
        }