public Matrix GetTransformationMatrix(bool forRendering = false) { if (CameraCenterOnScreen == RenderingLibrary.CameraCenterOnScreen.Center) { return(Camera.GetTransformationMatrix(X, Y, Zoom, ClientWidth, ClientHeight, forRendering)); } else { return(Matrix.CreateTranslation(-X, -Y, 0) * Matrix.CreateScale(new Vector3(Zoom, Zoom, 1))); } }
public Matrix GetTransformationMatrix(bool forRendering = false) { if (CameraCenterOnScreen == RenderingLibrary.CameraCenterOnScreen.Center) { // make local vars to make stepping in faster if debugging var x = X; var y = Y; var zoom = Zoom; var width = ClientWidth; var height = ClientHeight; return(Camera.GetTransformationMatrix(x, y, zoom, width, height, forRendering)); } else { return(Matrix.CreateTranslation(-X, -Y, 0) * Matrix.CreateScale(new Vector3(Zoom, Zoom, 1))); } }