/* Starshatter: The Open Source Project Copyright (c) 2021-2022, Starshatter: The Open Source Project Contributors Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors Copyright (c) 1997-2006, Destroyer Studios LLC. AUTHOR: John DiCamillo OVERVIEW ======== Classes for rendering solid meshes of polygons */ #ifndef Selection_h #define Selection_h #include #include "Polygon.h" #include "Graphic.h" #include "Video.h" #include "List.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; } std::vector& 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; std::vector verts; }; // +--------------------------------------------------------------------+ #endif Selection_h