Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TxaLine Class Reference

This is a single matching line in the .txa file. More...

#include <txaLine.h>

List of all members.

Public Member Functions

 TxaLine ()
bool parse (const string &line)
 Accepts a string that defines a line of the .txa file and parses it into its constinuent parts.

bool match_egg (EggFile *egg_file) const
 Compares the patterns on the line to the indicated EggFile.

bool match_texture (TextureImage *texture) const
 Compares the patterns on the line to the indicated TextureImage.

void output (ostream &out) const

Private Types

typedef pvector< GlobPatternPatterns
typedef pvector< KeywordKeywords
enum  SizeType { ST_none, ST_scale, ST_explicit_2, ST_explicit_3 }
enum  Keyword {
  KW_omit, KW_nearest, KW_linear, KW_mipmap,
  KW_cont, KW_anisotropic
}

Private Attributes

Patterns _texture_patterns
Patterns _egg_patterns
SizeType _size_type
float _scale
int _x_size
int _y_size
int _num_channels
EggTexture::Format _format
bool _force_format
bool _generic_format
EggRenderMode::AlphaMode _alpha_mode
int _aniso_degree
bool _got_margin
int _margin
bool _got_coverage_threshold
double _coverage_threshold
Keywords _keywords
PaletteGroups _palette_groups
PNMFileType_color_type
PNMFileType_alpha_type


Detailed Description

This is a single matching line in the .txa file.

It consists of a list of names (texture names or egg file names), followed by a colon and an optional size and a set of keywords.

Definition at line 52 of file txaLine.h.


Member Typedef Documentation

typedef pvector<Keyword> TxaLine::Keywords [private]
 

Definition at line 100 of file txaLine.h.

typedef pvector<GlobPattern> TxaLine::Patterns [private]
 

Definition at line 64 of file txaLine.h.


Member Enumeration Documentation

enum TxaLine::Keyword [private]
 

Enumeration values:
KW_omit 
KW_nearest 
KW_linear 
KW_mipmap 
KW_cont 
KW_anisotropic 

Definition at line 91 of file txaLine.h.

enum TxaLine::SizeType [private]
 

Enumeration values:
ST_none 
ST_scale 
ST_explicit_2 
ST_explicit_3 

Definition at line 68 of file txaLine.h.


Constructor & Destructor Documentation

TxaLine::TxaLine  ) 
 

Definition at line 41 of file txaLine.cxx.

References EggRenderMode::AM_unspecified, EggTexture::F_unspecified, and NULL.


Member Function Documentation

bool TxaLine::match_egg EggFile egg_file  )  const
 

Compares the patterns on the line to the indicated EggFile.

If they match, updates the egg with the appropriate information. Returns true if a match is detected and the search for another line should stop, or false if a match is not detected (or if the keyword "cont" is present, which means the search should continue regardless).

Definition at line 326 of file txaLine.cxx.

References KW_anisotropic, KW_cont, KW_linear, KW_mipmap, KW_nearest, and KW_omit.

bool TxaLine::match_texture TextureImage texture  )  const
 

Compares the patterns on the line to the indicated TextureImage.

If they match, updates the texture with the appropriate information. Returns true if a match is detected and the search for another line should stop, or false if a match is not detected (or if the keyword "cont" is present, which means the search should continue regardless).

Definition at line 398 of file txaLine.cxx.

References _scale.

void TxaLine::output ostream &  out  )  const
 

Definition at line 527 of file txaLine.cxx.

References _coverage_threshold.

bool TxaLine::parse const string &  line  ) 
 

Accepts a string that defines a line of the .txa file and parses it into its constinuent parts.

Returns true if successful, false on error.

Definition at line 73 of file txaLine.cxx.

References _egg_patterns.


Member Data Documentation

EggRenderMode::AlphaMode TxaLine::_alpha_mode [private]
 

Definition at line 83 of file txaLine.h.

PNMFileType* TxaLine::_alpha_type [private]
 

Definition at line 106 of file txaLine.h.

int TxaLine::_aniso_degree [private]
 

Definition at line 85 of file txaLine.h.

PNMFileType* TxaLine::_color_type [private]
 

Definition at line 105 of file txaLine.h.

double TxaLine::_coverage_threshold [private]
 

Definition at line 89 of file txaLine.h.

Referenced by output().

Patterns TxaLine::_egg_patterns [private]
 

Definition at line 66 of file txaLine.h.

Referenced by parse().

bool TxaLine::_force_format [private]
 

Definition at line 81 of file txaLine.h.

EggTexture::Format TxaLine::_format [private]
 

Definition at line 80 of file txaLine.h.

bool TxaLine::_generic_format [private]
 

Definition at line 82 of file txaLine.h.

bool TxaLine::_got_coverage_threshold [private]
 

Definition at line 88 of file txaLine.h.

bool TxaLine::_got_margin [private]
 

Definition at line 86 of file txaLine.h.

Keywords TxaLine::_keywords [private]
 

Definition at line 101 of file txaLine.h.

int TxaLine::_margin [private]
 

Definition at line 87 of file txaLine.h.

int TxaLine::_num_channels [private]
 

Definition at line 79 of file txaLine.h.

PaletteGroups TxaLine::_palette_groups [private]
 

Definition at line 103 of file txaLine.h.

float TxaLine::_scale [private]
 

Definition at line 76 of file txaLine.h.

Referenced by match_texture().

SizeType TxaLine::_size_type [private]
 

Definition at line 75 of file txaLine.h.

Patterns TxaLine::_texture_patterns [private]
 

Definition at line 65 of file txaLine.h.

int TxaLine::_x_size [private]
 

Definition at line 77 of file txaLine.h.

int TxaLine::_y_size [private]
 

Definition at line 78 of file txaLine.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:28:07 2003 for Panda-Tool by doxygen1.3