Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iSyntaxService Struct Reference

This component provides services for other loaders to easily parse properties of standard CS world syntax. More...

#include <services.h>

Inheritance diagram for iSyntaxService:

iBase List of all members.

Public Methods

virtual bool ParseMatrix (char *buffer, csMatrix3 &m)=0
 Parse a MATRIX description. More...

virtual bool ParseVector (char *buffer, csVector3 &v)=0
 Parse a VECTOR description. More...

virtual bool ParseMixmode (char *buffer, uint &mixmode)=0
 Parse a MIXMODE description. More...

virtual bool ParseShading (char *buf, int &shading)=0
 Parse a SHADING description. More...

virtual bool ParseTexture (char *buf, const csVector3 *vref, uint &texspec, csVector3 &tx_orig, csVector3 &tx1, csVector3 &tx2, csVector3 &len, csMatrix3 &tx_m, csVector3 &tx_v, csVector2 &uv_shift, int &idx1, csVector2 &uv1, int &idx2, csVector2 &uv2, int &idx3, csVector2 &uv3, char *plane, const char *polyname)=0
 Parse a texture description. More...

virtual bool ParseWarp (char *buf, csVector &flags, bool &mirror, bool &warp, int &msv, csMatrix3 &m, csVector3 &before, csVector3 &after)=0
 Parses a WARP () specification. More...

virtual bool ParsePoly3d (iLoaderContext *ldr_context, iEngine *engine, iPolygon3D *poly3d, char *buf, float default_texlen, iThingState *thing_state, int vt_offset)=0
 Parses a POLYGON.

virtual const char* MatrixToText (const csMatrix3 &m, int indent, bool newline=true)=0
 Transform the matrix into its textual representation. More...

virtual const char* VectorToText (const char *vname, const csVector3 &v, int indent, bool newline=true)=0
 Transform the vector into its textual representation. More...

virtual const char* VectorToText (const char *vname, float x, float y, float z, int indent, bool newline=true)=0
virtual const char* VectorToText (const char *vname, const csVector2 &v, int indent, bool newline=true)=0
virtual const char* VectorToText (const char *vname, float x, float y, int indent, bool newline=true)=0
virtual const char* BoolToText (const char *vname, bool b, int indent, bool newline=true)=0
 Transform the boolean into its textual representation. More...

virtual const char* MixmodeToText (uint mixmode, int indent, bool newline=true)=0
 Transform the mixmode into its textual representation. More...


Detailed Description

This component provides services for other loaders to easily parse properties of standard CS world syntax.


Member Function Documentation

const char * iSyntaxService::BoolToText ( const char * vname,
bool b,
int indent,
bool newline = true ) [pure virtual]
 

Transform the boolean into its textual representation.

  • indent: is the number of leading spaces every line is prefixed with.
  • vname: is the vector specifier like LIGHTING, MIPMAP, etc.
  • newline: signals whether to append a newline to the result.

const char * iSyntaxService::MatrixToText ( const csMatrix3 & m,
int indent,
bool newline = true ) [pure virtual]
 

Transform the matrix into its textual representation.

  • indent: is the number of leading spaces every line is prefixed with.
  • newline: signals whether to append a newline to the result.

const char * iSyntaxService::MixmodeToText ( uint mixmode,
int indent,
bool newline = true ) [pure virtual]
 

Transform the mixmode into its textual representation.

  • indent: is the number of leading spaces every line is prefixed with.
  • newline: signals whether to append a newline to the result.

bool iSyntaxService::ParseMatrix ( char * buffer,
csMatrix3 & m ) [pure virtual]
 

Parse a MATRIX description.

Returns true if successful.

bool iSyntaxService::ParseMixmode ( char * buffer,
uint & mixmode ) [pure virtual]
 

Parse a MIXMODE description.

Returns true if successful.

bool iSyntaxService::ParseShading ( char * buf,
int & shading ) [pure virtual]
 

Parse a SHADING description.

Returns true if successful.

bool iSyntaxService::ParseTexture ( char * buf,
const csVector3 * vref,
uint & texspec,
csVector3 & tx_orig,
csVector3 & tx1,
csVector3 & tx2,
csVector3 & len,
csMatrix3 & tx_m,
csVector3 & tx_v,
csVector2 & uv_shift,
int & idx1,
csVector2 & uv1,
int & idx2,
csVector2 & uv2,
int & idx3,
csVector2 & uv3,
char * plane,
const char * polyname ) [pure virtual]
 

Parse a texture description.

  • vref: is the array containing vertices which can be referenced by indices in the description.
  • texspex: describes the data found for the texture transformation. It consists of or'ed CSTEX_.
  • tx_orig, tx1, tx2, len: texture transformation is given by 3 points describing a 3d space (third vector is implicitly given to be perpendicular on the 2 vectors described by the 3 points),
  • width and height of the texture.
  • tx_m and tx_v: if texture transformation is given explicitly by matrix/vector.
  • uv_shift: contains UV_SHIFT value.
  • idx? and uv?: if texture mapping is given explicitly by defining the u,v coordinate that belongs to vertex idx? of the polygon.
  • plane: is the name of a plane defining the texture transformation.
  • polyname: name of polygon to which this texture description belongs. This is used to make errormessages more verbose.

bool iSyntaxService::ParseVector ( char * buffer,
csVector3 & v ) [pure virtual]
 

Parse a VECTOR description.

Returns true if successful.

bool iSyntaxService::ParseWarp ( char * buf,
csVector & flags,
bool & mirror,
bool & warp,
int & msv,
csMatrix3 & m,
csVector3 & before,
csVector3 & after ) [pure virtual]
 

Parses a WARP () specification.

flags: contains all flags found in the description.

const char * iSyntaxService::VectorToText ( const char * vname,
const csVector3 & v,
int indent,
bool newline = true ) [pure virtual]
 

Transform the vector into its textual representation.

  • indent: is the number of leading spaces every line is prefixed with.
  • vname: is the vector specifier like VECTOR, V, W, etc.
  • newline: signals whether to append a newline to the result.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000