xref: /haiku/src/add-ons/screen_savers/spider/Polygon.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
1 /*
2  * Copyright 2007, Haiku Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef POLYGON_H
9 #define POLYGON_H
10 
11 #include <List.h>
12 #include <Point.h>
13 #include <Rect.h>
14 
15 struct point_vector {
16 	BPoint	point;
17 	BPoint	vector;
18 };
19 
20 class Polygon {
21  public:
22 								Polygon(BRect bounds, BList points);
23 								Polygon(BRect bounds, int32 vertices);
24 	virtual						~Polygon();
25 
26 			Polygon*			Step() const;
27 
28 			uint32				CountPoints() const;
29 			BPoint				PointAt(int32 index) const;
30 
31  private:
32 			BList				fPoints;
33 			BRect				fBounds;
34 };
35 
36 #endif // ABOUT_VPOLYGON_HIEW_H
37