Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
TxaFile Class Reference

This represents the .txa file (usually textures.txa) that contains the user instructions for resizing, grouping, etc. More...

`#include "txaFile.h"`

## Public Member Functions
bool | match_egg (EggFile *egg_file) const
| Searches for a matching line in the .txa file for the given egg file and applies its specifications.
bool | match_texture (TextureImage *texture) const
| Searches for a matching line in the .txa file for the given texture and applies its specifications.
bool | read (std::istream &in, const std::string &filename)
| Reads the indicated stream, and returns true if successful, or false if there is an error.
void | write (std::ostream &out) const
| Outputs a representation of the lines that were read in to the indicated output stream.

## Detailed Description

This represents the .txa file (usually textures.txa) that contains the user instructions for resizing, grouping, etc.

the various textures.

Definition at line 30 of file txaFile.h.

## Constructor & Destructor Documentation

## ◆ TxaFile()

TxaFile::TxaFile | ( |  | ) |

Definition at line 28 of file txaFile.cxx.

## Member Function Documentation

## ◆ match_egg()

bool TxaFile::match_egg | ( | EggFile * | egg_file | ) | const

Searches for a matching line in the .txa file for the given egg file and applies its specifications.

If a match is found, returns true; otherwise, returns false. Also returns false if all the matching lines for the egg file include the keyword "cont".

Definition at line 130 of file txaFile.cxx.

## ◆ match_texture()

bool TxaFile::match_texture | ( | TextureImage * | texture | ) | const

Searches for a matching line in the .txa file for the given texture and applies its specifications.

If a match is found, returns true; otherwise, returns false. Also returns false if all the matching lines for the texture include the keyword "cont".

Definition at line 148 of file txaFile.cxx.

Referenced by PT(), and PaletteGroup::update_unknown_textures().

## ◆ read()

bool TxaFile::read | ( | std::istream & | in,
|  | const std::string & | filename )

Reads the indicated stream, and returns true if successful, or false if there is an error.

Definition at line 36 of file txaFile.cxx.

References extract_words(), TxaLine::parse(), and trim_left().

## ◆ write()

void TxaFile::write | ( | std::ostream & | out | ) | const

Outputs a representation of the lines that were read in to the indicated output stream.

This is primarily useful for debugging.

Definition at line 164 of file txaFile.cxx.

The documentation for this class was generated from the following files:

- pandatool/src/palettizer/txaFile.h
- pandatool/src/palettizer/txaFile.cxx