Panda3D
|
This represents a single egg file known to the palettizer. More...
#include "eggFile.h"
Public Member Functions | |
void | apply_properties_to_source () |
Calls apply_properties_to_source() for each texture reference, updating all the referenced source textures with the complete set of property information from this egg file. | |
virtual ReferenceCount * | as_reference_count () |
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type. | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
void | build_cross_links () |
Calls TextureImage::note_egg_file() and SourceTextureImage::increment_egg_count() for each texture the egg file references, and PaletteGroup::increment_egg_count() for each palette group it wants. | |
void | choose_placements () |
Once all the textures have been assigned to groups (but before they may actually be placed), chooses a suitable TexturePlacement for each texture that appears in the egg file. | |
void | clear_name () |
Resets the Namable's name to empty. | |
void | clear_surprise () |
Removes the 'surprise' flag; this file has been successfully matched against a line in the .txa file. | |
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 the pointers that were retrieved from the Bam file for each pointer object written. | |
string | encode_to_bam_stream () const |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string. | |
bool | encode_to_bam_stream (string &data, BamWriter *writer=NULL) const |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. | |
virtual void | finalize (BamReader *manager) |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed. | |
virtual TypeHandle | force_init_type () |
bool | from_command_line (EggData *data, const Filename &source_filename, const Filename &dest_filename, const string &egg_comment) |
Accepts the information about the egg file as supplied from the command line. | |
UpdateSeq | get_bam_modified () const |
Returns the current bam_modified counter. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
const PaletteGroups & | get_complete_groups () const |
Returns the complete set of PaletteGroups that the egg file is assigned to. | |
PaletteGroup * | get_default_group () const |
Returns the PaletteGroup that was specified as the default group on the command line at the time the egg file last appeared on the command line. | |
const PaletteGroups & | get_explicit_groups () const |
Returns the set of PaletteGroups that the egg file has been explicitly assigned to in the .txa file. | |
const string & | get_name () const |
const Filename & | get_source_filename () const |
Returns the filename this egg file was read from. | |
void | get_textures (pset< TextureImage * > &result) const |
Fills up the indicated set with the set of textures referenced by this egg file. | |
virtual TypeHandle | get_type () const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | had_data () const |
Returns true if the EggData for this EggFile has ever been loaded in this session. | |
bool | has_data () const |
Returns true if the EggData for this EggFile has been loaded, and not yet released. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_stale () const |
Returns true if the egg file needs to be updated, i.e. | |
bool | is_surprise () const |
Returns true if this particular egg file is a 'surprise', i.e. | |
void | mark_bam_modified () |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. | |
void | mark_stale () |
Marks this particular egg file as stale, meaning that something has changed, such as the location of a texture within its palette, which causes the egg file to need to be regenerated. | |
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 is assigned. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size, void *ptr) |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
void | output (ostream &out) const |
Outputs the Namable. | |
void | post_txa_file () |
Once the egg file has been matched against all of the matching lines the .txa file, do whatever adjustment is necessary. | |
void | pre_txa_file () |
Does some processing prior to scanning the .txa file. | |
bool | read_egg (bool noabs) |
Reads in the egg file from its _source_filename. | |
void | release_egg_data () |
Releases the memory that was loaded by a previous call to read_egg(). | |
void | remove_egg () |
Removes this egg file from all things that reference it, in preparation for removing it from the database. | |
virtual bool | require_fully_complete () const |
Some objects require all of their nested pointers to have been completed before the objects themselves can be completed. | |
void | scan_textures () |
Scans the egg file for texture references and updates the _textures list appropriately. | |
void | set_name (const string &name) |
virtual void | update_bam_nested (BamWriter *manager) |
Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates. | |
void | update_egg () |
Once all textures have been placed appropriately, updates the egg file with all the information to reference the new textures. | |
virtual void | write_datagram (BamWriter *writer, Datagram &datagram) |
Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file. | |
void | write_description (ostream &out, int indent_level=0) const |
Writes a one-line description of the egg file and its group assignments to the indicated output stream. | |
bool | write_egg () |
Writes out the egg file to its _dest_filename. | |
void | write_texture_refs (ostream &out, int indent_level=0) const |
Writes the list of texture references to the indicated output stream, one per line. | |
Static Public Member Functions | |
static bool | decode_raw_from_bam_stream (TypedWritable *&ptr, ReferenceCount *&ref_ptr, const string &data, BamReader *reader=NULL) |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string. | |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Registers the current object as something that can be read from a Bam file. | |
Static Public Attributes | |
static TypedWritable *const | Null = (TypedWritable*)0L |
Protected Member Functions | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Reads the binary data from the given datagram iterator, which was written by a previous call to write_datagram(). | |
Static Protected Member Functions | |
static TypedWritable * | make_EggFile (const FactoryParams ¶ms) |
This method is called by the BamReader when an object of this type is encountered in a Bam file; it should allocate and return a new object with all the data read. |
This represents a single egg file known to the palettizer.
It may reference a number of textures, and may also be assigned to a number of groups. All of its textures will try to assign themselves to one of its groups.
void EggFile::apply_properties_to_source | ( | ) |
Calls apply_properties_to_source() for each texture reference, updating all the referenced source textures with the complete set of property information from this egg file.
Definition at line 416 of file eggFile.cxx.
References TextureReference::apply_properties_to_source().
ReferenceCount * TypedWritable::as_reference_count | ( | ) | [virtual, inherited] |
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.
Reimplemented in PandaNode, and TypedWritableReferenceCount.
Definition at line 155 of file typedWritable.cxx.
Referenced by BamReader::change_pointer(), BamReader::register_change_this(), and BamReader::resolve().
TypedObject * TypedObject::as_typed_object | ( | ) | [inline, inherited] |
Returns the object, upcast (if necessary) to a TypedObject pointer.
Definition at line 99 of file typedObject.I.
const TypedObject * TypedObject::as_typed_object | ( | ) | const [inline, inherited] |
Returns the object, upcast (if necessary) to a TypedObject pointer.
Definition at line 110 of file typedObject.I.
void EggFile::build_cross_links | ( | ) |
Calls TextureImage::note_egg_file() and SourceTextureImage::increment_egg_count() for each texture the egg file references, and PaletteGroup::increment_egg_count() for each palette group it wants.
This sets up some of the back references to support determining an ideal texture assignment.
Definition at line 373 of file eggFile.cxx.
References PaletteGroups::begin(), PaletteGroups::clear(), PaletteGroups::empty(), PaletteGroups::end(), TextureReference::get_source(), TextureReference::get_texture(), SourceTextureImage::increment_egg_count(), PaletteGroups::insert(), PaletteGroups::make_complete(), and TextureImage::note_egg_file().
void EggFile::choose_placements | ( | ) |
Once all the textures have been assigned to groups (but before they may actually be placed), chooses a suitable TexturePlacement for each texture that appears in the egg file.
This will be necessary to do at some point before writing out the egg file anyway, and doing it before the textures are placed allows us to decide what the necessary UV range is for each to-be-placed texture.
Definition at line 437 of file eggFile.cxx.
References PaletteGroups::begin(), PaletteGroups::count(), PaletteGroups::empty(), get_complete_groups(), TexturePlacement::get_group(), TextureImage::get_groups(), TextureImage::get_placement(), TextureReference::get_placement(), TextureReference::get_texture(), PaletteGroups::make_intersection(), and TextureReference::set_placement().
Referenced by Palettizer::read_stale_eggs().
void Namable::clear_name | ( | ) | [inline, inherited] |
void EggFile::clear_surprise | ( | ) |
Removes the 'surprise' flag; this file has been successfully matched against a line in the .txa file.
Definition at line 320 of file eggFile.cxx.
Referenced by TxaLine::match_egg().
int EggFile::complete_pointers | ( | TypedWritable ** | p_list, |
BamReader * | manager | ||
) | [virtual] |
Called after the object is otherwise completely read from a Bam file, this function's job is to store the pointers that were retrieved from the Bam file for each pointer object written.
The return value is the number of pointers processed from the list.
Reimplemented from TypedWritable.
Definition at line 836 of file eggFile.cxx.
References PaletteGroups::complete_pointers().
bool TypedWritable::decode_raw_from_bam_stream | ( | TypedWritable *& | ptr, |
ReferenceCount *& | ref_ptr, | ||
const string & | data, | ||
BamReader * | reader = NULL |
||
) | [static, inherited] |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string.
Returns true on success, false on on error.
This variant sets the TypedWritable and ReferenceCount pointers separately; both are pointers to the same object. The reference count is not incremented; it is the caller's responsibility to manage the reference count.
Note that this method cannot be used to retrieve objects that do not inherit from ReferenceCount, because these objects cannot persist beyond the lifetime of the BamReader that reads them. To retrieve these objects from a bam stream, you must construct a BamReader directly.
If you happen to know that the particular object in question inherits from TypedWritableReferenceCount or PandaNode, consider calling the variant of decode_from_bam_stream() defined for those methods, which presents a simpler interface.
Definition at line 353 of file typedWritable.cxx.
References BamReader::init(), DatagramInputFile::open(), DatagramInputFile::read_header(), BamReader::read_object(), ReferenceCount::ref(), BamReader::resolve(), BamReader::set_source(), and ReferenceCount::unref().
string TypedWritable::encode_to_bam_stream | ( | ) | const [inline, inherited] |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string.
Returns empty string on failure.
This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.
Definition at line 86 of file typedWritable.I.
bool TypedWritable::encode_to_bam_stream | ( | string & | data, |
BamWriter * | writer = NULL |
||
) | const [inherited] |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
Returns true on success, false on failure.
This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.
Definition at line 283 of file typedWritable.cxx.
References BamWriter::init(), DatagramOutputFile::open(), BamWriter::set_target(), DatagramOutputFile::write_header(), and BamWriter::write_object().
void EggFile::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
Reads the binary data from the given datagram iterator, which was written by a previous call to write_datagram().
Reimplemented from TypedWritable.
Definition at line 885 of file eggFile.cxx.
References PaletteGroups::fillin(), FilenameUnifier::get_bam_filename(), DatagramIterator::get_bool(), DatagramIterator::get_string(), DatagramIterator::get_uint32(), BamReader::read_pointer(), and BamReader::read_pointers().
Referenced by make_EggFile().
void TypedWritable::finalize | ( | BamReader * | manager | ) | [virtual, inherited] |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
Reimplemented in PartBundle, Geom, GeomPrimitive, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, InternalName, GeomNode, LightAttrib, RenderAttrib, RenderEffect, RenderEffects, RenderState, PaletteGroup, and Palettizer.
Definition at line 145 of file typedWritable.cxx.
Referenced by BamReader::finalize_now().
bool EggFile::from_command_line | ( | EggData * | data, |
const Filename & | source_filename, | ||
const Filename & | dest_filename, | ||
const string & | egg_comment | ||
) |
Accepts the information about the egg file as supplied from the command line.
Returns true if the egg file is valid, false otherwise.
Definition at line 63 of file eggFile.cxx.
References ExecutionEnvironment::get_cwd(), and Palettizer::get_default_group().
UpdateSeq TypedWritable::get_bam_modified | ( | ) | const [inline, inherited] |
Returns the current bam_modified counter.
This counter is normally incremented automatically whenever the object is modified.
Definition at line 66 of file typedWritable.I.
Referenced by BamWriter::consider_update(), and BamWriter::write_pointer().
const PaletteGroups & EggFile::get_complete_groups | ( | ) | const |
Returns the complete set of PaletteGroups that the egg file is assigned to.
This is the set of all the groups it is explicitly assigned to, plus all the groups that these groups depend on.
Definition at line 309 of file eggFile.cxx.
Referenced by choose_placements(), and TextureImage::note_egg_file().
PaletteGroup * EggFile::get_default_group | ( | ) | const |
Returns the PaletteGroup that was specified as the default group on the command line at the time the egg file last appeared on the command line.
Definition at line 296 of file eggFile.cxx.
Referenced by TextureImage::write_source_pathnames().
const PaletteGroups & EggFile::get_explicit_groups | ( | ) | const |
Returns the set of PaletteGroups that the egg file has been explicitly assigned to in the .txa file.
Definition at line 284 of file eggFile.cxx.
Referenced by TextureImage::write_source_pathnames().
const Filename & EggFile::get_source_filename | ( | ) | const |
Returns the filename this egg file was read from.
Definition at line 100 of file eggFile.cxx.
Referenced by Palettizer::read_stale_eggs().
void EggFile::get_textures | ( | pset< TextureImage * > & | result | ) | const |
Fills up the indicated set with the set of textures referenced by this egg file.
It is the user's responsibility to ensure the set is empty before making this call; otherwise, the new textures will be appended to the existing set.
Definition at line 226 of file eggFile.cxx.
Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().
int TypedObject::get_type_index | ( | ) | const [inline, inherited] |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
This is equivalent to get_type().get_index().
Definition at line 52 of file typedObject.I.
References TypeHandle::get_index().
bool EggFile::had_data | ( | ) | const |
Returns true if the EggData for this EggFile has ever been loaded in this session.
Definition at line 498 of file eggFile.cxx.
Referenced by Palettizer::read_stale_eggs(), and Palettizer::write_eggs().
bool EggFile::has_data | ( | ) | const |
Returns true if the EggData for this EggFile has been loaded, and not yet released.
Definition at line 487 of file eggFile.cxx.
Referenced by Palettizer::write_eggs().
bool Namable::has_name | ( | ) | const [inline, inherited] |
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 75 of file namable.I.
Referenced by XFileNode::add_child(), EggComponentData::add_name(), Texture::do_read_dds_file(), Texture::do_read_one(), Character::fillin(), EggGroupUniquifier::get_category(), EggXfmSAnim::optimize(), NodePathComponent::output(), AsyncTask::output(), EggNamedObject::output(), EggSAnimData::write(), EggPrimitive::write_body(), ParametricCurveCollection::write_egg(), ParametricCurve::write_egg(), EggNamedObject::write_header(), XFileDataNodeTemplate::write_text(), and XFileDataDef::write_text().
bool TypedObject::is_exact_type | ( | TypeHandle | handle | ) | const [inline, inherited] |
Returns true if the current object is the indicated type exactly.
Definition at line 74 of file typedObject.I.
References TypeHandle::get_name().
Referenced by GraphicsStateGuardian::async_reload_texture(), PortalNode::combine_with(), PandaNode::combine_with(), GeomNode::combine_with(), CollisionNode::combine_with(), Character::combine_with(), PGItem::cull_callback(), FactoryParams::get_param_of_type(), CollisionHandlerPusher::handle_entries(), SceneGraphReducer::r_flatten(), ConnectionWriter::send(), FltToEggLevelState::set_transform(), and VirtualFileSystem::unmount().
bool TypedObject::is_of_type | ( | TypeHandle | handle | ) | const [inline, inherited] |
Returns true if the current object is or derives from the indicated type.
Definition at line 63 of file typedObject.I.
References TypeHandle::is_derived_from().
Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), eglGraphicsWindow::open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().
bool EggFile::is_stale | ( | ) | const |
Returns true if the egg file needs to be updated, i.e.
some palettizations have changed affecting it, or false otherwise.
Definition at line 357 of file eggFile.cxx.
Referenced by Palettizer::read_stale_eggs(), and write_description().
bool EggFile::is_surprise | ( | ) | const |
Returns true if this particular egg file is a 'surprise', i.e.
it wasn't matched by a line in the .txa file that didn't include the keyword 'cont'.
Definition at line 332 of file eggFile.cxx.
Referenced by Palettizer::report_pi().
TypedWritable * EggFile::make_EggFile | ( | const FactoryParams & | params | ) | [static, protected] |
This method is called by the BamReader when an object of this type is encountered in a Bam file; it should allocate and return a new object with all the data read.
Definition at line 867 of file eggFile.cxx.
References fillin().
Referenced by register_with_read_factory().
void TypedWritable::mark_bam_modified | ( | ) | [inline, inherited] |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.
This should normally not need to be called by user code; it should be called internally when the object has been changed in a way that legitimately requires its retransmission to any connected clients.
Definition at line 54 of file typedWritable.I.
Referenced by PandaNode::add_child(), PandaNode::add_stashed(), PandaNode::adjust_draw_mask(), PandaNode::apply_attribs_to_vertices(), PandaNode::clear_attrib(), PandaNode::clear_effect(), PandaNode::clear_tag(), PandaNode::copy_all_properties(), PandaNode::copy_tags(), PandaNode::disable_cull_callback(), PandaNode::force_bounds_stale(), PandaNode::remove_all_children(), PandaNode::remove_child(), PandaNode::remove_stashed(), PandaNode::reset_all_prev_transform(), PandaNode::reset_prev_transform(), PandaNode::set_attrib(), PandaNode::set_bounds(), PandaNode::set_bounds_type(), PandaNode::set_cull_callback(), PandaNode::set_effect(), PandaNode::set_effects(), PandaNode::set_final(), PandaNode::set_internal_bounds(), PandaNode::set_into_collide_mask(), PandaNode::set_prev_transform(), PandaNode::set_state(), PandaNode::set_tag(), PandaNode::set_transform(), PandaNode::stash_child(), and PandaNode::unstash_child().
void EggFile::mark_stale | ( | ) |
Marks this particular egg file as stale, meaning that something has changed, such as the location of a texture within its palette, which causes the egg file to need to be regenerated.
Definition at line 345 of file eggFile.cxx.
Referenced by TextureReference::mark_egg_stale().
void EggFile::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 is assigned.
Definition at line 252 of file eggFile.cxx.
References PaletteGroups::clear(), and PaletteGroups::make_union().
Referenced by TxaLine::match_egg().
void Namable::output | ( | ostream & | out | ) | const [inline, inherited] |
Outputs the Namable.
This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.
Reimplemented in AnimBundle, AnimChannelFixed< SwitchType >, AnimChannelMatrixFixed, AnimControl, AnimGroup, PartBundle, CollisionNode, CollisionTraverser, ButtonNode, EggNamedObject, AsyncTask, AsyncTaskChain, AsyncTaskManager, AdaptiveLru, Material, SimpleLru, HermiteCurve, RopeNode, SheetNode, Fog, GeomNode, LensNode, Loader, PandaNode, PlaneNode, PolylightNode, PortalNode, CallbackNode, FadeLODNode, LODNode, ForceNode, Thread, MouseRecorder, TextNode, MouseWatcherRegion, WebcamVideo, and MayaShader.
void EggFile::post_txa_file | ( | ) |
Once the egg file has been matched against all of the matching lines the .txa file, do whatever adjustment is necessary.
Definition at line 274 of file eggFile.cxx.
Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().
void EggFile::pre_txa_file | ( | ) |
Does some processing prior to scanning the .txa file.
Definition at line 239 of file eggFile.cxx.
Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().
bool EggFile::read_egg | ( | bool | noabs | ) |
Reads in the egg file from its _source_filename.
It is only valid to call this if it has not already been read in, e.g. from the command line. Returns true if successful, false if there is an error.
This may also be called after a previous call to release_egg_data(), in order to re-read the same egg file.
Definition at line 549 of file eggFile.cxx.
References DSearchPath::append_directory(), EggTextureCollection::find_used_textures(), Filename::get_basename(), Filename::get_dirname(), FilenameUnifier::make_user_filename(), and EggTextureCollection::uniquify_trefs().
Referenced by Palettizer::read_stale_eggs(), and Palettizer::write_eggs().
void EggFile::register_with_read_factory | ( | ) | [static] |
Registers the current object as something that can be read from a Bam file.
Definition at line 786 of file eggFile.cxx.
References BamReader::get_factory(), and make_EggFile().
void EggFile::release_egg_data | ( | ) |
Releases the memory that was loaded by a previous call to read_egg().
Definition at line 625 of file eggFile.cxx.
References TextureReference::release_egg_data().
Referenced by Palettizer::read_stale_eggs(), and Palettizer::write_eggs().
void EggFile::remove_egg | ( | ) |
Removes this egg file from all things that reference it, in preparation for removing it from the database.
Definition at line 527 of file eggFile.cxx.
References TextureReference::get_placement(), and TexturePlacement::remove_egg().
Referenced by Palettizer::read_stale_eggs(), and Palettizer::remove_egg_file().
bool TypedWritable::require_fully_complete | ( | ) | const [virtual, inherited] |
Some objects require all of their nested pointers to have been completed before the objects themselves can be completed.
If this is the case, override this method to return true, and be careful with circular references (which would make the object unreadable from a bam file).
Reimplemented in GeomVertexData, ClipPlaneAttrib, and RenderEffects.
Definition at line 118 of file typedWritable.cxx.
void EggFile::scan_textures | ( | ) |
Scans the egg file for texture references and updates the _textures list appropriately.
This assumes the egg file was supplied on the command line and thus the _data member is available.
Definition at line 114 of file eggFile.cxx.
References EggTextureCollection::find_used_textures(), TextureReference::from_egg(), TextureReference::from_egg_quick(), TextureReference::has_uvs(), TextureReference::is_equivalent(), and EggTextureCollection::uniquify_trefs().
Referenced by Palettizer::process_all(), Palettizer::process_command_line_eggs(), and Palettizer::read_stale_eggs().
void TypedWritable::update_bam_nested | ( | BamWriter * | manager | ) | [virtual, inherited] |
Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates.
Reimplemented in CFDoCullCommand, and PandaNode.
Definition at line 77 of file typedWritable.cxx.
void EggFile::update_egg | ( | ) |
Once all textures have been placed appropriately, updates the egg file with all the information to reference the new textures.
Definition at line 510 of file eggFile.cxx.
References TextureReference::update_egg().
Referenced by Palettizer::write_eggs().
Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file.
Reimplemented from TypedWritable.
Definition at line 799 of file eggFile.cxx.
References Datagram::add_bool(), Datagram::add_string(), Datagram::add_uint32(), FilenameUnifier::make_bam_filename(), PaletteGroups::write_datagram(), and BamWriter::write_pointer().
void EggFile::write_description | ( | ostream & | out, |
int | indent_level = 0 |
||
) | const |
Writes a one-line description of the egg file and its group assignments to the indicated output stream.
Definition at line 668 of file eggFile.cxx.
References PaletteGroups::empty(), and is_stale().
Referenced by Palettizer::report_pi().
bool EggFile::write_egg | ( | ) |
Writes out the egg file to its _dest_filename.
Returns true if successful, false if there is an error.
Definition at line 644 of file eggFile.cxx.
References Filename::make_dir(), and FilenameUnifier::make_user_filename().
Referenced by Palettizer::write_eggs().
void EggFile::write_texture_refs | ( | ostream & | out, |
int | indent_level = 0 |
||
) | const |
Writes the list of texture references to the indicated output stream, one per line.
Definition at line 691 of file eggFile.cxx.
Referenced by Palettizer::report_pi().