private TMat4x4 GetFatherMat() { if (Father != null) { return(Father.CombinedMatrix); } return(TMat4x4.UnitMat()); }
// Constructor public CRenderContext(int W, int H) { VScreen = new Bitmap(W, H); ZBuffer = new float[W * H]; // Prepare graphics canvases for the form and for the virtual screen VScreenCanvas = Graphics.FromImage(VScreen); BackgroundColor = DEFAULT_BACKGROUND_COLOR; PenForWireFrame = new Pen(DEFAULT_PEN_COLOR, 1); ViewMatrix = TMat4x4.UnitMat(); Width = W; Height = H; HalfWidth = Width / 2; HalfHeight = Height / 2; }