Panda3D

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. More...
bool | match_texture (TextureImage *texture) const
| Searches for a matching line in the .txa file for the given texture and applies its specifications. More...
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. More...
void | write (std::ostream &out) const
| Outputs a representation of the lines that were read in to the indicated output stream. More...

## 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.

## 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.

Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().

## ◆ 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 Palettizer::process_all(), Palettizer::process_command_line_eggs(), 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.

Referenced by Palettizer::read_txa_file().

## ◆ 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