home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Jeux / demos / crystalPPC.lha / viewpoly.h < prev    next >
C/C++ Source or Header  |  1998-01-15  |  546b  |  31 lines

  1. #ifndef VIEWPOLY_H
  2. #define VIEWPOLY_H
  3.  
  4. #ifndef MATH3D_H
  5. #include "math3d.h"
  6. #endif
  7.  
  8. class ViewPolygon
  9. {
  10. private:
  11.   Vector2* vertices;
  12.   int num_vertices, max_vertices;
  13.   Box bbox;            // Bounding box
  14.  
  15. public:
  16.   ViewPolygon (int num);
  17.   ~ViewPolygon ();
  18.  
  19.   void add_vertex (float x, float y);
  20.   void add_vertex (Vector2& v) { add_vertex (v.x, v.y); }
  21.  
  22.   Box& get_bounding_box () { return bbox; }
  23.   int get_num_vertices () { return num_vertices; }
  24.   Vector2* get_vertices () { return vertices; }
  25.  
  26.   void dump (char* name);
  27. };
  28.  
  29. #endif /*VIEWPOLY_H*/
  30.  
  31.