Go to the documentation of this file.
43 const std::string &egg_comment);
81 void rescan_textures();
88 std::string _egg_comment;
93 bool _first_txa_match;
122 static void init_type() {
123 TypedWritable::init_type();
124 Namable::init_type();
126 TypedWritable::get_class_type(),
127 Namable::get_class_type());
130 return get_class_type();
void release_egg_data()
Releases the memory that was loaded by a previous call to read_egg().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void match_txa_groups(const PaletteGroups &groups)
Adds the indicated set of groups, read from the .txa file, to the set of groups to which the egg file...
This is the highest level of grouping for TextureImages.
This represents a single egg file known to the palettizer.
void write_texture_refs(std::ostream &out, int indent_level=0) const
Writes the list of texture references to the indicated output stream, one per line.
void get_textures(pset< TextureImage * > &result) const
Fills up the indicated set with the set of textures referenced by this egg file.
void update_egg()
Once all textures have been placed appropriately, updates the egg file with all the information to re...
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
const PaletteGroups & get_complete_groups() const
Returns the complete set of PaletteGroups that the egg file is assigned to.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Called after the object is otherwise completely read from a Bam file, this function's job is to store...
void post_txa_file()
Once the egg file has been matched against all of the matching lines the .txa file,...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
void clear_surprise()
Removes the 'surprise' flag; this file has been successfully matched against a line in the ....
A base class for nodes in the hierarchy that are not leaf nodes.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void pre_txa_file()
Does some processing prior to scanning the .txa file.
Base class for objects that can be written to and read from Bam files.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void choose_placements()
Once all the textures have been assigned to groups (but before they may actually be placed),...
PaletteGroup * get_default_group() const
Returns the PaletteGroup that was specified as the default group on the command line at the time the ...
void mark_stale()
Marks this particular egg file as stale, meaning that something has changed, such as the location of ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
bool from_command_line(EggData *data, const Filename &source_filename, const Filename &dest_filename, const std::string &egg_comment)
Accepts the information about the egg file as supplied from the command line.
This is the primary interface into all the egg data, and the root of the egg file structure.
const Filename & get_source_filename() const
Returns the filename this egg file was read from.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
bool write_egg()
Writes out the egg file to its _dest_filename.
const PaletteGroups & get_explicit_groups() const
Returns the set of PaletteGroups that the egg file has been explicitly assigned to in the ....
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void remove_egg()
Removes this egg file from all things that reference it, in preparation for removing it from the data...
void write_description(std::ostream &out, int indent_level=0) const
Writes a one-line description of the egg file and its group assignments to the indicated output strea...
bool has_data() const
Returns true if the EggData for this EggFile has been loaded, and not yet released.
bool had_data() const
Returns true if the EggData for this EggFile has ever been loaded in this session.
A base class for all things which can have a name.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool read_egg(bool noabs)
Reads in the egg file from its _source_filename.
void build_cross_links()
Calls TextureImage::note_egg_file() and SourceTextureImage::increment_egg_count() for each texture th...
void scan_textures()
Scans the egg file for texture references and updates the _textures list appropriately.
void apply_properties_to_source()
Calls apply_properties_to_source() for each texture reference, updating all the referenced source tex...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This represents a single source texture that is referenced by one or more egg files.
The name of a file, such as a texture file or an Egg file.
bool is_surprise() const
Returns true if this particular egg file is a 'surprise', i.e.
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
bool is_stale() const
Returns true if the egg file needs to be updated, i.e.
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object,...