Rev | Line | |
---|
[6] | 1 | #ifndef _LWPOLYGON_H_ |
---|
| 2 | #define _LWPOLYGON_H_ |
---|
| 3 | |
---|
| 4 | #include "lwo.h" |
---|
| 5 | |
---|
| 6 | class lwPolygon { |
---|
| 7 | public: |
---|
| 8 | lwPolygon() |
---|
| 9 | { |
---|
| 10 | } |
---|
| 11 | |
---|
| 12 | lwPolygon(const lwPolygon &p) |
---|
| 13 | { |
---|
| 14 | surface = p.surface; |
---|
| 15 | surfidx = p.surfidx; |
---|
| 16 | part = p.part; |
---|
| 17 | smoothgrp = p.smoothgrp; |
---|
| 18 | flags = p.flags; |
---|
| 19 | type = p.type; |
---|
| 20 | normal = p.normal; |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | ~lwPolygon() |
---|
| 24 | { |
---|
| 25 | for (unsigned int i=0; i < vertices.size(); delete vertices[i++]); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | Vector3 &calculateNormal(void); |
---|
| 29 | vpolygons triangulate(void); |
---|
| 30 | void flip(void); |
---|
| 31 | private: |
---|
| 32 | lwPolygon *makeTriangle(long ia, long ib, long ic); |
---|
| 33 | public: |
---|
| 34 | lwSurface *surface; |
---|
| 35 | int surfidx; /* surface index */ |
---|
| 36 | int part; /* part index */ |
---|
| 37 | int smoothgrp; /* smoothing group */ |
---|
| 38 | int flags; |
---|
| 39 | unsigned int type; |
---|
| 40 | Vector3 normal; |
---|
| 41 | vvertices vertices; /* array of vertex records */ |
---|
| 42 | }; |
---|
| 43 | |
---|
| 44 | #endif // _LWPOLYGON_H_ |
---|
| 45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.