1 /* Copyright 2004, 2005 Nicholas Bishop
2  *
3  * This file is part of SharpConstruct.
4  *
5  * SharpConstruct is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * SharpConstruct is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with SharpConstruct; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
18 
19 #ifndef POLYGON3D_H
20 #define POLYGON3D_H
21 
22 #include <vector>
23 
24 namespace SharpConstruct
25 {
26 	class Triangle
27 	{
28 	public:
Triangle()29 		Triangle()
30 		{}
31 		Triangle( unsigned i1, unsigned i2, unsigned i3 );
32 
33 		void ReverseVertices();
34 
35 		unsigned V[ 3 ];
36 	};
37 	class Quad
38 	{
39 	public:
Quad()40 		Quad()
41 		{}
42 		Quad( unsigned i1, unsigned i2, unsigned i3, unsigned i4 );
43 
44 		void ReverseVertices();
45 
46 		unsigned V[ 4 ];
47 	};
48 
49 	class PolygonUsers
50 	{
51 	public:
52 		std::vector< unsigned > Triangles;
53 		std::vector< unsigned > Quads;
54 	};
55 
56 	// Mostly a temp structure
57 	class Polygon3D
58 	{
59 	public:
60 		Polygon3D();
61 		~Polygon3D();
62 
63 		std::vector< unsigned > VertexIndices;
64 		std::vector< unsigned > UVIndices;
65 	};
66 }
67 
68 #endif // POLYGON3D_H
69