summaryrefslogtreecommitdiffhomepage
path: root/Magic2/Selection.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/Selection.h
downloadstarshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.zip
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.gz
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.bz2
Initial upload
Diffstat (limited to 'Magic2/Selection.h')
-rw-r--r--Magic2/Selection.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/Magic2/Selection.h b/Magic2/Selection.h
new file mode 100644
index 0000000..092f0ac
--- /dev/null
+++ b/Magic2/Selection.h
@@ -0,0 +1,74 @@
+/* Project Magic 2.0
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
+
+ SUBSYSTEM: Magic.exe
+ FILE: Selection.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Classes for rendering solid meshes of polygons
+*/
+
+#ifndef Selection_h
+#define Selection_h
+
+#include "Polygon.h"
+#include "Graphic.h"
+#include "Video.h"
+#include "List.h"
+#include "ArrayList.h"
+
+// +--------------------------------------------------------------------+
+
+class Selection;
+class Solid;
+class Model;
+class ModelView;
+class Surface;
+class Segment;
+
+// +--------------------------------------------------------------------+
+
+class Selection : public Graphic
+{
+public:
+ static const char* TYPENAME() { return "Selection"; }
+
+ Selection();
+ virtual ~Selection();
+
+ // operations
+ virtual void Render(Video* video, DWORD flags);
+ virtual bool CheckVisibility(Projector& projector) { return true; }
+
+ // accessors / mutators
+ void UseModel(Model* m) { model = m; }
+ void UseView(ModelView* v){ model_view = v; }
+ Model* GetModel() const { return model; }
+ List<Poly>& GetPolys() { return polys; }
+ ArrayList& GetVerts() { return verts; }
+
+ virtual void Clear() { polys.clear();
+ verts.clear(); }
+
+ void AddPoly(Poly* p);
+ void AddVert(WORD s, WORD v);
+ void RemovePoly(Poly* p);
+ void RemoveVert(WORD s, WORD v);
+ bool Contains(Poly* p) const;
+ bool Contains(WORD s, WORD v) const;
+
+protected:
+ Model* model;
+ ModelView* model_view;
+ List<Poly> polys;
+ ArrayList verts;
+};
+
+// +--------------------------------------------------------------------+
+
+#endif Selection_h
+