Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

ac3dsurface.h

00001 /***************************************************************************
00002                         AC3DSurface.h  -  description
00003                             -------------------
00004     begin                : june 29th, 05
00005     copyright            : (C) 2005-2006 by Duong-Khang NGUYEN
00006     email                : neoneurone @ users sourceforge net
00007     
00008     $Id: ac3dsurface.h 42 2006-09-10 16:03:31Z neoneurone $
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   any later version.                                                    *
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 

Generated on Sat Nov 11 10:21:09 2006 for OpenCity by  doxygen 1.4.2