CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

services.h

Go to the documentation of this file.
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 __CS_IMAP_SYNTAXSERVICE_H__
00020 #define __CS_IMAP_SYNTAXSERVICE_H__
00021 
00026 #include "csutil/scf.h"
00027 #include "csutil/ref.h"
00028 
00029 class csShaderVariable;
00030 class csMatrix3;
00031 class csVector3;
00032 class csVector2;
00033 class csColor;
00034 class csBox3;
00035 class csGradient;
00036 struct iPolygon3DStatic;
00037 struct iEngine;
00038 struct iSector;
00039 struct iMaterialWrapper;
00040 struct iThingFactoryState;
00041 struct iLoaderContext;
00042 struct iDocumentNode;
00043 
00046 
00047 #define CSTEX_UV 1  
00048 
00049 #define CSTEX_V1 2  
00050 
00051 #define CSTEX_V2 4  
00052 
00053 #define CSTEX_UV_SHIFT 8 
00054 
00056 SCF_VERSION (iSyntaxService, 1, 3, 1);
00057 
00062 struct iSyntaxService : public iBase
00063 {
00078   virtual bool ParseBool (iDocumentNode* node, bool& result,
00079         bool def_result) = 0;
00080   
00084   virtual bool ParseMatrix (iDocumentNode* node, csMatrix3 &m) = 0;
00085 
00089   virtual bool ParseVector (iDocumentNode* node, csVector3 &v) = 0;
00090 
00094   virtual bool ParseBox (iDocumentNode* node, csBox3 &v) = 0;
00095 
00099   virtual bool ParseColor (iDocumentNode* node, csColor &c) = 0;
00100 
00104   virtual bool ParseMixmode (iDocumentNode* node, uint &mixmode) = 0;
00105 
00127   virtual bool ParseTextureMapping (iDocumentNode* node,
00128                              const csVector3* vref, uint &texspec,
00129                              csVector3 &tx_orig, csVector3 &tx1,
00130                              csVector3 &tx2, csVector3 &len,
00131                              csMatrix3 &tx_m, csVector3 &tx_v,
00132                              csVector2 &uv_shift,
00133                              int &idx1, csVector2 &uv1,
00134                              int &idx2, csVector2 &uv2,
00135                              int &idx3, csVector2 &uv3,
00136                              const char *polyname) = 0;
00137 
00142   virtual bool ParsePortal (iDocumentNode* node, iLoaderContext* ldr_context,
00143                            iPolygon3DStatic* poly3d,
00144                            uint32 &flags, bool &mirror,
00145                            bool& warp, int& msv,
00146                            csMatrix3 &m, csVector3 &before,
00147                            csVector3 &after) = 0;
00148 
00149 
00153   virtual bool ParsePoly3d (iDocumentNode* node,
00154                             iLoaderContext* ldr_context,
00155                             iEngine* engine, iPolygon3DStatic* poly3d,
00156                             float default_texlen,
00157                             iThingFactoryState* thing_fact_state,
00158                             int vt_offset) = 0;
00159 
00163   virtual bool ParseGradient (iDocumentNode* node,
00164                               csGradient& gradient) = 0;
00165 
00169   virtual bool ParseShaderParam (iDocumentNode* node,
00170                                  csShaderVariable* var) = 0;
00171                             
00175   virtual void ReportError (const char* msgid, iDocumentNode* errornode,
00176         const char* msg, ...) CS_GNUC_PRINTF(4,5) = 0;
00177 
00182   virtual void ReportBadToken (iDocumentNode* badtokennode) = 0;
00183 
00187   virtual void Report (const char* msgid, int severity, 
00188     iDocumentNode* errornode, const char* msg, ...) CS_GNUC_PRINTF(5,6) = 0;
00189 };
00190 
00193 #endif // __CS_IMAP_SYNTAXSERVICE_H__
00194 

Generated for Crystal Space by doxygen 1.2.14