Rev | Line | |
---|
[2111] | 1 | #ifndef __ObjMeshData_H__
|
---|
| 2 | #define __ObjMeshData_H__
|
---|
[2109] | 3 |
|
---|
| 4 |
|
---|
| 5 | #include <Ogre.h>
|
---|
| 6 |
|
---|
[2111] | 7 | enum ObjReaderOpType
|
---|
[2109] | 8 | {
|
---|
| 9 | IV_ROT_INVALID = -1,
|
---|
| 10 | IV_ROT_TRIANGLE_STRIP = 1,
|
---|
| 11 | IV_ROT_TRIANGLE_LIST = 3,
|
---|
| 12 | IV_ROT_FACE_SET = 4,
|
---|
| 13 | };
|
---|
| 14 |
|
---|
[2111] | 15 | class __declspec(dllexport) ObjMeshData
|
---|
[2109] | 16 | {
|
---|
| 17 | public:
|
---|
[2111] | 18 | ObjMeshData();
|
---|
| 19 | ~ObjMeshData();
|
---|
[2109] | 20 |
|
---|
[2111] | 21 | ObjMeshData *expand();
|
---|
[2109] | 22 |
|
---|
| 23 | void collapse();
|
---|
| 24 |
|
---|
| 25 | Ogre::Real *vertices, *normals, *texCoords, *indices, *normalIndices, *texCoordIndices;
|
---|
| 26 | int vcnt, ncnt, tcnt, icnt, nicnt, ticnt;
|
---|
[2111] | 27 | ObjReaderOpType roType;
|
---|
[2109] | 28 | Ogre::AxisAlignedBox *boundingBox;
|
---|
| 29 |
|
---|
| 30 | private:
|
---|
| 31 | int getSeparatorCnt(Ogre::Real *data, int end);
|
---|
| 32 |
|
---|
| 33 | Ogre::Real *expandTriangleStripIndices(Ogre::Real *indices, int icnt, int *icntOut);
|
---|
| 34 | Ogre::Real *expandFaceSetIndices(Ogre::Real *indices, int icnt, int *icntOut);
|
---|
| 35 |
|
---|
| 36 | int getNextFaceSize(int start);
|
---|
| 37 |
|
---|
| 38 | Ogre::AxisAlignedBox *calcBoundingBox();
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.