Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

services.h

00001 /*
00002     Copyright (C) 2001 by Norman Krämer
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef _I_SYNTAXSERVICE_H_
00020 #define _I_SYNTAXSERVICE_H_
00021 
00022 #include "csutil/scf.h"
00023 
00024 class csMatrix3;
00025 class csVector3;
00026 class csVector2;
00027 class csVector;
00028 struct iPolygon3D;
00029 struct iEngine;
00030 struct iMaterialWrapper;
00031 struct iThingState;
00032 struct iLoaderContext;
00033 
00034 #define CSTEX_UV 1  // UV is given in texture description
00035 #define CSTEX_V1 2  // vector1 is given in texture description
00036 #define CSTEX_V2 4  // vector2 is given in texture description
00037 #define CSTEX_UV_SHIFT 8 // explicit (u,v) <-> vertex mapping is given in texture description
00038 
00039 SCF_VERSION (iSyntaxService, 0, 0, 3);
00040 
00045 struct iSyntaxService : public iBase
00046 {
00050   virtual bool ParseMatrix (char *buffer, csMatrix3 &m) = 0;
00051 
00055   virtual bool ParseVector (char *buffer, csVector3 &v) = 0;
00056 
00060   virtual bool ParseMixmode (char *buffer, uint &mixmode) = 0;
00061 
00065   virtual bool ParseShading (char *buf, int &shading) = 0;
00066 
00088   virtual bool ParseTexture (char *buf, const csVector3* vref, uint &texspec,
00089                              csVector3 &tx_orig, csVector3 &tx1,
00090                              csVector3 &tx2, csVector3 &len,
00091                              csMatrix3 &tx_m, csVector3 &tx_v,
00092                              csVector2 &uv_shift,
00093                              int &idx1, csVector2 &uv1,
00094                              int &idx2, csVector2 &uv2,
00095                              int &idx3, csVector2 &uv3,
00096                              char *plane, const char *polyname) = 0;
00097 
00102   virtual  bool ParseWarp (char *buf, csVector &flags, bool &mirror,
00103                            bool& warp, int& msv,
00104                            csMatrix3 &m, csVector3 &before,
00105                            csVector3 &after) = 0;
00106 
00107 
00111   virtual bool ParsePoly3d (iLoaderContext* ldr_context,
00112                             iEngine* engine, iPolygon3D* poly3d, char* buf,
00113                             float default_texlen,
00114                             iThingState* thing_state, int vt_offset) = 0;
00115 
00123   virtual const char* MatrixToText (const csMatrix3 &m, int indent,
00124         bool newline=true) = 0;
00125 
00134   virtual const char* VectorToText (const char *vname, const csVector3 &v,
00135         int indent, bool newline=true) = 0;
00136   virtual const char* VectorToText (const char *vname,
00137         float x, float y, float z, int indent, bool newline=true) = 0;
00138   virtual const char* VectorToText (const char *vname, const csVector2 &v,
00139         int indent, bool newline=true) = 0;
00140   virtual const char* VectorToText (const char *vname, float x, float y,
00141         int indent, bool newline=true) = 0;
00142 
00151   virtual const char* BoolToText (const char *vname, bool b, int indent,
00152     bool newline=true) = 0;
00153 
00161   virtual const char* MixmodeToText (uint mixmode, int indent,
00162         bool newline=true) = 0;
00163 };
00164 
00165 #endif

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000