summaryrefslogtreecommitdiffhomepage
path: root/Magic2/UVMapView.h
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
commite33e19d0587146859d48a134ec9fd94e7b7ba5cd (patch)
tree69d048c8801858d2756ab3a487090a7a1b74bf14 /Magic2/UVMapView.h
downloadstarshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.zip
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.gz
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.bz2
Initial upload
Diffstat (limited to 'Magic2/UVMapView.h')
-rw-r--r--Magic2/UVMapView.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/Magic2/UVMapView.h b/Magic2/UVMapView.h
new file mode 100644
index 0000000..87b0eeb
--- /dev/null
+++ b/Magic2/UVMapView.h
@@ -0,0 +1,82 @@
+/* Project Magic 2.0
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
+
+ SUBSYSTEM: Magic.exe
+ FILE: UVMapView.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Interface of the UVMapView class
+*/
+
+
+#ifndef UVMapView_h
+#define UVMapView_h
+
+#include "View.h"
+#include "Polygon.h"
+#include "List.h"
+#include "ArrayList.h"
+
+// +--------------------------------------------------------------------+
+
+class Video;
+
+// +--------------------------------------------------------------------+
+
+class UVMapView : public View
+{
+public:
+ UVMapView(Window* c);
+ virtual ~UVMapView();
+
+ enum SELECT_MODE { SELECT_REMOVE=-1, SELECT_REPLACE=0, SELECT_APPEND=1 };
+
+ virtual void Refresh();
+
+ void UseMaterial(Material* m);
+ void UsePolys(List<Poly>& p);
+
+ void MoveBy(double dx, double dy);
+ void DragBy(double dx, double dy);
+ void ZoomIn() { zoom *= 1.15; }
+ void ZoomOut() { zoom *= 0.85; }
+
+ void Clear();
+ void Begin(int select_mode = SELECT_REPLACE);
+ void AddMark(CPoint& p);
+ void End();
+
+ bool IsActive() const { return active; }
+ void SelectAll();
+ void SelectNone();
+ void SelectInverse();
+
+ bool IsSelected(Poly* p, WORD v);
+ bool WillSelect(CPoint& p);
+
+protected:
+ enum { MAX_MARK = 4096 };
+
+ Material* material;
+ List<Poly> polys;
+ Video* video;
+
+ double zoom;
+ double x_offset;
+ double y_offset;
+
+ int nmarks;
+ CPoint marks[MAX_MARK];
+ int select_mode;
+ bool active;
+
+ ArrayList selverts;
+};
+
+// +--------------------------------------------------------------------+
+
+#endif UVMapView_h