forked from lucychaves/LA-RayTracer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
polygon.h
32 lines (17 loc) · 853 Bytes
/
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
#ifndef POLYGON_H_
#define POLYGON_H_
OBJECT createPolygon(POINT *vertices, int numVertices, COLOR color, long double kd, long double ka, long double ks,
long double kn, long double o1, long double o2);
double getD(VECTOR normal, POINT punto);
PEQUATION getABCD(POINT *points);
INTERSECTION findIntersection_polygon(VECTOR direction, POINT eye, POLYGON p);
void flattenPolygon(POLYGON p);
POINT2D flattenPoint(POINT intersectionPoint, char tag);
POINT2D* translatePoints(POINT2D* points, int sizePoints, POINT2D intersectionPoint);
bool verifyPoint(POINT2D *points2D, int sizePoints, POINT2D intersectionPoint);
PEQUATION reverse(POLYGON p);
POINT getXmin(POINT *points, int sizePoints);
POINT getXmax(POINT* points, int sizePoints);
POINT getYmin(POINT* points, int sizePoints);
POINT getYmax(POINT* points, int sizePoints);
#endif