Graphics Reference
In-Depth Information
class CDrawOnlyHandler : public UWBD3D _ WindowHandler {
Source file.
DrawOnlyHandler.h file in
the WindowHandler folder of
the D3D _ Panning project.
.
UWBMFC _ UIWindow m _ window; // the UI drawing area (device)
};
class CMainHandler : public CDrawOnlyHandler {
.
void SetLinkedHandler(CDrawOnlyHandler * pHandler) { m _ pLinkedHandler = pHandler; }
.
protected :
CDrawOnlyHandler * m _ pLinkedHandler; // reference to the small view
};
Listing 10.11. The WindowHandler classes of Tutorial 10.10.
class CTutorialDlg : public CDialog {
Source file.
TutorialDlg.h/cpp file in
the Source Files folder of the
D3D _ Panning project.
.
m _ main _ view; // the main view
A:
CMainHandler
m _ small _ view;
CDrawOnlyHandler
// the small view
};
BOOL CTutorialDlg::OnInitDialog() {
.
if (!m _ main _ view.Initialize( * this , IDC _ PLACEHOLDER) ) return FALSE;
if (!m _ small _ view.Initialize( * this , IDC _ PLACEHOLDER3) ) return FALSE;
.
m _ small _ view.SetWCWindow(theApp.GetModel().GetWorldBounds());
m _ main _ view.SetWCWindow( UWB _ BoundingBox( vec3 (0,0,0), vec3 (36,36,0) ) );
B:
m _ main _ view.SetLinkedHandler( &m _ small _ view );
.
C:
Listing 10.12. The CTutorialDlg classes of Tutorial 10.10.
Handler object calls the LoadW2NDCXform() function to compute and load the
D3D RC M V matrix with their corresponding M w 2 n operator before drawing. The
left side of Figure 10.19 shows that the model is defined in the WC space. When
the model draws, it sends all the vertices of all the geometries to the D3D RC.
Search WWH ::




Custom Search