source: OGRE/trunk/ogrenew/Tools/LightwaveConverter/include/lwReader.h @ 657

Revision 657, 2.1 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

RevLine 
[657]1
2#ifndef _LWREADER_H_
3#define _LWREADER_H_
4
5#include "lwo.h"
6#include "lwObject.h"
7#include <istream>
8#include <vector>
9
10class lwReader
11{
12public:
13        lwObject *readObjectFromFile( const char *nfilename);
14        lwObject *readObjectFromStream( istream *nis);
15private:
16        istream *is;
17        unsigned long chunksize;
18        unsigned long currentchunkid;
19        unsigned long formsize;
20        unsigned long flen;
21
22        bool *flags;
23
24        lwObject *lwGetLWLO();
25        lwObject *lwGetLWO2();
26
27        int lwGetPoints( vpoints &points );
28        int lwGetPolygons( vpolygons &polygons, int ptoffset );
29        int lwGetLWOBPolygons( vpolygons &polygons, int ptoffset );
30        int lwGetTags( vtags &tags );
31        int lwGetPolygonTags( vtags &tags, int tagsoffset, vpolygons &polygons, int polygonsoffset );
32        lwVMap *lwGetVMap( int ptoffset, int poloffset, int perpoly );
33        lwClip *lwGetClip();
34        lwEnvelope *lwGetEnvelope();
35        int lwGetTHeader( int hsz, lwTexture &tex );
36        int lwGetTMap( int tmapsz, lwTMap &tmap );
37        lwImageMap *lwGetImageMap( int rsz, lwTexture &tex );
38        lwProcedural *lwGetProcedural( int rsz, lwTexture &tex );
39        lwGradient *lwGetGradient( int rsz, lwTexture &tex );
40        lwTexture *lwGetTexture( int bloksz, unsigned int type );
41        lwPlugin *lwGetShader( int bloksz );
42        lwSurface *lwGetSurface();
43        lwSurface *lwGetLWOBSurface( lwObject *obj );
44
45        int add_clip( char *s, vclips &clips );
46        int add_tvel( float pos[], float vel[], venvelopes &envelopes );
47        lwTexture *get_texture( char *s );
48
49        char *getbytes( int size );
50        void skipbytes( int n );
51        short getI2();
52        long getI4();
53        unsigned char getU1();
54        unsigned short getU2();
55        unsigned long getU4();
56        int   getVX();
57        float getF4();
58        char *getS0();
59        short sgetI2( char **bp );
60        long  sgetI4( char **bp );
61        unsigned char  sgetU1( char **bp );
62        unsigned short sgetU2( char **bp );
63        unsigned long  sgetU4( char **bp );
64        int   sgetVX( char **bp );
65        float sgetF4( char **bp );
66        char *sgetS0( char **bp );
67
68        unsigned short swappedShort(unsigned short w);
69        unsigned long swappedLong(unsigned long w);
70        void revbytes( void *bp, int elsize, int elcount );
71};
72
73#endif // _LWREADER_H_
74
Note: See TracBrowser for help on using the repository browser.