Class hierarchy   Compound list   File list   Compound Members   File Members  

TextureDefinition Class Reference

Parsable texture definition. More...

List of all members.

Public Members

Private Members


Detailed Description

Parsable texture definition.

This class provides a common parser for the texture definition syntax in command files together with some functions on them.


Member Function Documentation

TextureDefinition::TextureDefinition()

ctor

TextureDefinition::TextureDefinition(rvshort _tex, rvfloat _x0, rvfloat _x1, rvfloat _y0, rvfloat _y1)

bool TextureDefinition::parseTexSpec(const char *str, TextureDefinition *def, Parser &, bool allow_asterisk)

parses the string str for a texture definition (style a:1,2:3x4). Error messages are printed through the given parser.

If allow_asterisk is false, wildcards are not allowed for the texture sheet.

def is a texture definition from which values are copied if parts contain wildcards. It must point to a valid TextureDefinition instance. default_src_texdef() is there if no special values are needed.

str is modified while parsing it. (Split up into substrings)

bool TextureDefinition::uv_in_def(rvshort sheet, RV_UV *uv)

Returns true, if uv is inside the given definition and sheet matches.

Does work with TEX_UNKNOWN for both texture definition and argument

void TextureDefinition::printtex(FILE *)

dumps the texture definition in a human-readible format.

bool TextureDefinition::parseTexLetter(char *buf, Parser &, bool allow_asterisk) [private]

bool TextureDefinition::parseSingleNum(char *buf, int *num, Parser &) [private]

bool TextureDefinition::parseNumPair(char *obuf, char sepch, int *i1, int *i2, const char *pairname, Parser &) [private]


Member Data Documentation

rvfloat TextureDefinition::x0

rvfloat TextureDefinition::x1

rvfloat TextureDefinition::y0

rvfloat TextureDefinition::y1

rvshort TextureDefinition::tex

May be TEX_UNKNOWN


The documentation for this class was generated from the following files:
Generated at Wed May 31 21:08:20 2000 for Rvtmod/rvglue by doxygen  written by Dimitri van Heesch, © 1997-1998