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