From e33e19d0587146859d48a134ec9fd94e7b7ba5cd Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 14:53:40 +0000 Subject: Initial upload --- Magic2/Selection.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Magic2/Selection.h (limited to 'Magic2/Selection.h') 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& 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 polys; + ArrayList verts; +}; + +// +--------------------------------------------------------------------+ + +#endif Selection_h + -- cgit v1.1