1 |
#ifndef __LwoLoader_H__
|
2 |
#define __LwoLoader_H__
|
3 |
|
4 |
#include "Object3d.h"
|
5 |
#include "Object3dList.h"
|
6 |
#include "../LinkedList/ObjectLinkedList.h"
|
7 |
#include "../LinkedList/StringLinkedList.h"
|
8 |
#include "../Binary/BinaryInput.h"
|
9 |
#include "../Array/FloatArray.h"
|
10 |
#include "../Array/IntArray.h"
|
11 |
#include "../ImageFormat/SGI.h"
|
12 |
|
13 |
class LwoLoader
|
14 |
{
|
15 |
|
16 |
public:
|
17 |
|
18 |
LwoLoader(Object3dList **iobjekt3dlist_, ObjectLinkedList<SGI> *iTextureList);
|
19 |
~LwoLoader();
|
20 |
|
21 |
void scanLwoFile(String &fileName);
|
22 |
|
23 |
private:
|
24 |
void readvertices(Object3d *objekt3d_);
|
25 |
void readprepareuv2(Object3d *objekt3d_);
|
26 |
void readtransparent(Object3d *objekt3d_);
|
27 |
void readcolour(Object3d *objekt3d_);
|
28 |
void readvpoints(Object3d *objekt3d_);
|
29 |
void readttpoints(Object3d *objekt3d_);
|
30 |
|
31 |
void calcTextureMapping();
|
32 |
bool computeChunkPNTS(String &chunk, int chunkValue);
|
33 |
bool computeChunkSRFS(String &chunk, int chunkValue);
|
34 |
bool computeChunkPOLS(String &chunk, int chunkValue);
|
35 |
bool computeChunkCOLR(String &chunk, int chunkValue);
|
36 |
bool computeChunkVTRN(String &chunk, int chunkValue);
|
37 |
bool computeChunkCTEX(String &chunk, int chunkValue);
|
38 |
bool computeChunkTIMG(String &chunk, int chunkValue);
|
39 |
bool computeChunkTWRP(String &chunk, int chunkValue);
|
40 |
bool computeChunkTFLG(String &chunk, int chunkValue);
|
41 |
bool computeChunkTSIZ(String &chunk, int chunkValue);
|
42 |
bool computeChunkTCTR(String &chunk, int chunkValue);
|
43 |
void calcUVForAVertices(int whichPolygon, int whichPolygonPoint, float *u, float *v);
|
44 |
void remove();
|
45 |
|
46 |
int numberOfSurfaces;
|
47 |
|
48 |
Object3dList *objekt3dlist_[1];
|
49 |
|
50 |
ObjectLinkedList<SGI> *textureList;
|
51 |
StringLinkedList *textureNameList;
|
52 |
BinaryInput *binaryInput;
|
53 |
FloatArray *xVerticesArray;
|
54 |
FloatArray *yVerticesArray;
|
55 |
FloatArray *zVerticesArray;
|
56 |
IntArray *polygonPoints;
|
57 |
IntArray *polygonSurfaces;
|
58 |
IntArray *surfaceMappingMethod;
|
59 |
IntArray *surfaceColourArray;
|
60 |
FloatArray *surfaceTransparentArray;
|
61 |
IntArray *surfaceTextureWrappingXArray;
|
62 |
IntArray *surfaceTextureWrappingYArray;
|
63 |
IntArray *surfaceXYZAxleArray;
|
64 |
FloatArray *surfaceTextureSizeXArray;
|
65 |
FloatArray *surfaceTextureSizeYArray;
|
66 |
FloatArray *surfaceTextureSizeZArray;
|
67 |
FloatArray *surfaceTextureCenterXArray;
|
68 |
FloatArray *surfaceTextureCenterYArray;
|
69 |
FloatArray *surfaceTextureCenterZArray;
|
70 |
IntArray *polygonColour;
|
71 |
FloatArray *polygonPoint1UArray;
|
72 |
FloatArray *polygonPoint1VArray;
|
73 |
FloatArray *polygonPoint2UArray;
|
74 |
FloatArray *polygonPoint2VArray;
|
75 |
FloatArray *polygonPoint3UArray;
|
76 |
FloatArray *polygonPoint3VArray;
|
77 |
|
78 |
};
|
79 |
|
80 |
#endif
|