00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _OPENCITY_AC3DAC3DSURFACE_H_
00021 #define _OPENCITY_AC3DAC3DSURFACE_H_ 1
00022
00023 #include <vector>
00024 #include <string>
00025 #include <sstream>
00026
00027 #ifndef uint
00028 typedef unsigned int uint;
00029 #endif
00030
00031 namespace AC3D {
00032
00033 using std::vector;
00034 using std::string;
00035 using std::stringstream;
00036
00040 enum SURFACE_TYPE {
00041 SURFACE_POLYGON,
00042 SURFACE_CLOSEDLINE,
00043 SURFACE_LINE
00044 };
00045
00048 struct Ref {
00049 unsigned int uiVertIndex;
00050 float fTexS;
00051 float fTexT;
00052 };
00053
00054
00055
00059 class AC3DSurface{
00060 public:
00061 AC3DSurface();
00062 AC3DSurface( stringstream& data );
00063
00064 ~AC3DSurface();
00065
00066
00067
00071 const unsigned int
00072 GetMat() const;
00073
00074
00075
00080 const vector<Ref>&
00081 GetVRef() const;
00082
00083
00084 void Parse( stringstream& data );
00085
00086 string ToStr() const;
00087
00088
00089 private:
00090 uint uiAttribute;
00091 SURFACE_TYPE type;
00092 bool bShaded;
00093 bool bTwoSide;
00094 uint uiMat;
00095 uint uiNumRef;
00096 vector<Ref> vRef;
00097 };
00098
00099 }
00100
00101 #endif
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126