source: GTP/trunk/Lib/Vis/Preprocessing/include/Polygon3.h @ 262

Revision 262, 1.0 KB checked in by mattausch, 19 years ago (diff)

debugged bsp

Line 
1#ifndef _Polygon3_h__
2#define _Polygon3_h__
3
4
5//#include <iostream>
6//#include <math.h>
7//#include "common.h"
8#include "Containers.h"
9#include <queue>
10
11class Mesh;
12class Plane3;
13class Face;
14
15namespace GtpVisibilityPreprocessor {
16
17/** Class representing a general planar polygon in 3d.
18*/
19class Polygon3
20{
21public:
22        Polygon3();
23        Polygon3(const VertexContainer &vertices);
24
25        /** Copies all the vertices of the face.
26        */
27        Polygon3(Face *face, Mesh *parent);
28       
29        /** Returns supporting plane of this polygon.
30        */
31        Plane3 GetSupportingPlane();
32
33        /** Splits polygon.
34                @param partition the split plane
35                @param front the front polygon
36                @param back the back polygon
37                @param splits number of splits
38        */
39        void Split(Plane3 *partition, Polygon3 *front, Polygon3 *back, int &splits);
40
41        enum {BACK_SIDE, FRONT_SIDE, SPLIT, COINCIDENT};
42
43        /** Side of the plane where the polygon is located.
44            @returns one of BACK_SIDE, FRONT_SIDE, SPLIT, COINCIDENT
45        */
46        int Side(Plane3 *plane);
47
48        /// vertices are connected in counterclockwise order.
49        VertexContainer mVertices;
50};
51
52}
53
54#endif
Note: See TracBrowser for help on using the repository browser.