-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPOLYGON.H
50 lines (42 loc) · 1.22 KB
/
POLYGON.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Author: Corey Auger (corey@coreyauger.com)
*
* Polygon
*
* TODO:
* not sure how i want to alloc mem for polys. One idea is to have a
* static vector/vecNormals list and a dynamic list for objects created
* on the fly... then link to them.
*
* That is going to take some work/thinking for when split function ect..
*
*/
#ifndef _POLYGON
#define _POLYGON
#include <memory>
#include <vector>
#include "Vector.h"
#include "Plane.h"
#include "AxisAlignedBoundingBox.h"
#include "Ray.h"
namespace Affine{
class Polygon : public Plane
{
private:
std::vector< Point > mVerticies;
std::auto_ptr< Vector > mNormal;
unsigned int mNumVerticies;
public:
Polygon( const Vector& norm, const Point& point ) : Plane( norm, point ){};
// Polygon( const unsigned int num=0 );
// Polygon( const Polygon& inSource );
// virtual ~Polygon();
/*
int classify( const Polygon& inPoly)const; // classify this poly to one passed in
int classify( const Plane& inPlane)const; // classify this poly to infinit split plane
void split( const Plane &inSplitter, Polygon &outFront, Polygon &outBack);
AxisAlignBoundingBox* getPolygonAABB()const; // return an AABB for this poly
*/
};
}// end Affine namespace
#endif