Figure 143
shows the class relationships for MGraphic3D and MDrawable and lists the MGraphic3D member functions described in this chapter. MDrawable has a pure virtual Draw function that is implemented in the MGraphic3D derived classes. You typically call the Draw function from the TView::DrawContents function to draw into a view and the View system passes the correct TGrafPort to the DrawContents function. Chapter 12 has several DrawContents implementations.
The MGraphic3D constructors are protected and used only when you derive from MGraphic3D to create a custom 3-D graphic. Chapter 11 describes a custom 2-D graphic; the protocol is much the same for a custom 3-D graphic.