Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ModelView.h
Go to the documentation of this file.
1 /* Project Magic 2.0
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Magic.exe
6  FILE: ModelView.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Interface of the ModelView class
13 */
14 
15 
16 #ifndef ModelView_h
17 #define ModelView_h
18 
19 #include "CameraView.h"
20 #include "Grid.h"
21 
22 // +--------------------------------------------------------------------+
23 
24 class ModelView : public CameraView
25 {
26 public:
29 
30  ModelView(Window* c, Scene* s, DWORD m);
31  virtual ~ModelView();
32 
33  virtual void RenderScene();
34  virtual void Render(Graphic* g, DWORD flags);
35 
36  DWORD GetViewMode() const { return view_mode; }
37  void SetViewMode(DWORD m);
38  DWORD GetFillMode() const { return fill_mode; }
39  void SetFillMode(DWORD m) { fill_mode = m; }
40 
41  void MoveTo(Point origin);
42  void MoveBy(double dx, double dy);
43  void SpinBy(double phi, double theta);
44 
45  void UseGrid(Grid* g);
46  void RenderGrid();
47  void ZoomNormal();
48 
49  CPoint ProjectPoint(Vec3& p);
50 
51  static ModelView* FindView(DWORD mode);
52 
53 protected:
55  DWORD view_mode;
56  DWORD fill_mode;
57  double az;
58  double el;
60 };
61 
62 // +--------------------------------------------------------------------+
63 
64 #endif ModelView_h