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();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void post_txa_file()
Once the egg file has been matched against all of the matching lines the .txa file,...
void scan_textures()
Scans the egg file for texture references and updates the _textures list appropriately.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
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...
A base class for nodes in the hierarchy that are not leaf nodes.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool had_data() const
Returns true if the EggData for this EggFile has ever been loaded in this session.
void clear_surprise()
Removes the 'surprise' flag; this file has been successfully matched against a line in the ....
void mark_stale()
Marks this particular egg file as stale, meaning that something has changed, such as the location of ...
Base class for objects that can be written to and read from Bam files.
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 highest level of grouping for TextureImages.
const Filename & get_source_filename() const
Returns the filename this egg file was read from.
void remove_egg()
Removes this egg file from all things that reference it, in preparation for removing it from the data...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void pre_txa_file()
Does some processing prior to scanning the .txa file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool read_egg(bool noabs)
Reads in the egg file from its _source_filename.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
const PaletteGroups & get_explicit_groups() const
Returns the set of PaletteGroups that the egg file has been explicitly assigned to in the ....
void apply_properties_to_source()
Calls apply_properties_to_source() for each texture reference, updating all the referenced source tex...
This is the primary interface into all the egg data, and the root of the egg file structure.
const PaletteGroups & get_complete_groups() const
Returns the complete set of PaletteGroups that the egg file is assigned to.
void get_textures(pset< TextureImage * > &result) const
Fills up the indicated set with the set of textures referenced by this egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void choose_placements()
Once all the textures have been assigned to groups (but before they may actually be placed),...
void release_egg_data()
Releases the memory that was loaded by a previous call to read_egg().
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.
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...
A base class for all things which can have a name.
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...
bool write_egg()
Writes out the egg file to its _dest_filename.
The name of a file, such as a texture file or an Egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void update_egg()
Once all textures have been placed appropriately, updates the egg file with all the information to re...
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
bool has_data() const
Returns true if the EggData for this EggFile has been loaded, and not yet released.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool is_surprise() const
Returns true if this particular egg file is a 'surprise', i.e.
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,...
A class to retrieve the individual data elements previously stored in a Datagram.
This represents a single source texture that is referenced by one or more egg files.
void build_cross_links()
Calls TextureImage::note_egg_file() and SourceTextureImage::increment_egg_count() for each texture th...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
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.
This represents a single egg file known to the palettizer.
PaletteGroup * get_default_group() const
Returns the PaletteGroup that was specified as the default group on the command line at the time the ...