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 
00033 #define CSTEX_UV 1  // UV is given in texture description
00034 #define CSTEX_V1 2  // vector1 is given in texture description
00035 #define CSTEX_V2 4  // vector2 is given in texture description
00036 #define CSTEX_UV_SHIFT 8 // explicit (u,v) <-> vertex mapping is given in texture description
00037 
00038 SCF_VERSION (iSyntaxService, 0, 0, 2);
00039 
00044 struct iSyntaxService : public iBase
00045 {
00049   virtual bool ParseMatrix (char *buffer, csMatrix3 &m) = 0;
00050 
00054   virtual bool ParseVector (char *buffer, csVector3 &v) = 0;
00055 
00059   virtual bool ParseMixmode (char *buffer, UInt &mixmode) = 0;
00060 
00064   virtual bool ParseShading (char *buf, int &shading) = 0;
00065 
00087   virtual bool ParseTexture (char *buf, const csVector3* vref, UInt &texspec, 
00088                              csVector3 &tx_orig, csVector3 &tx1,
00089                              csVector3 &tx2, csVector3 &len,
00090                              csMatrix3 &tx_m, csVector3 &tx_v,
00091                              csVector2 &uv_shift,
00092                              int &idx1, csVector2 &uv1,
00093                              int &idx2, csVector2 &uv2,
00094                              int &idx3, csVector2 &uv3,
00095                              char *plane, const char *polyname) = 0;
00096 
00101   virtual  bool ParseWarp (char *buf, csVector &flags, bool &mirror, 
00102                            csMatrix3 &m, csVector3 &before,
00103                            csVector3 &after) = 0;
00104 
00105 
00109   virtual bool ParsePoly3d (iEngine* engine, iPolygon3D* poly3d, char* buf,
00110                             float default_texlen,
00111                             iThingState* thing_state, int vt_offset) = 0;
00112 
00120   virtual const char* MatrixToText (const csMatrix3 &m, int indent,
00121         bool newline=true) = 0;
00122 
00131   virtual const char* VectorToText (const char *vname, const csVector3 &v,
00132         int indent, bool newline=true) = 0;
00133   virtual const char* VectorToText (const char *vname,
00134         float x, float y, float z, int indent, bool newline=true) = 0;
00135   virtual const char* VectorToText (const char *vname, const csVector2 &v,
00136         int indent, bool newline=true) = 0;
00137   virtual const char* VectorToText (const char *vname, float x, float y,
00138         int indent, bool newline=true) = 0;
00139 
00148   virtual const char* BoolToText (const char *vname, bool b, int indent,
00149     bool newline=true) = 0;
00150 
00158   virtual const char* MixmodeToText (UInt mixmode, int indent,
00159         bool newline=true) = 0;
00160 };
00161 
00162 #endif

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