78 int alpha_file_channel);
104 void consider_grayscale();
105 void consider_alpha();
107 void remove_old_dests(
const Dests &a,
const Dests &b);
108 void copy_new_dests(
const Dests &a,
const Dests &b);
110 std::string get_source_key(
const Filename &filename,
112 int alpha_file_channel);
117 EggRenderMode::AlphaMode _pre_txa_alpha_mode;
121 bool _ever_read_image;
122 bool _forced_grayscale;
133 double _mid_pixel_ratio;
135 EggRenderMode::AlphaMode _alpha_mode;
136 EggTexture::WrapMode _txa_wrap_u, _txa_wrap_v;
149 bool _read_source_image;
150 bool _allow_release_source_image;
178 static void init_type() {
179 ImageFile::init_type();
180 Namable::init_type();
182 ImageFile::get_class_type(),
183 Namable::get_class_type());
186 return get_class_type();
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This represents a texture filename as it has been resized and copied to the map directory (e....
This represents a single egg file known to the palettizer.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
The name of a file, such as a texture file or an Egg file.
This is the base class of both TextureImage and PaletteImage.
A base class for all things which can have a name.
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
This is the highest level of grouping for TextureImages.
This is a texture image reference as it appears in an egg file: the source image of the texture.
This represents a single source texture that is referenced by one or more egg files.
bool got_txa_file() const
Returns true if this TextureImage has been looked up in the .txa file this session,...
void pre_txa_file()
Updates any internal state prior to reading the .txa file.
void note_egg_file(EggFile *egg_file)
Records that a particular egg file references this texture.
void clear_source_basic_properties()
Calls clear_basic_properties() on each source texture image used by this texture, to reset the proper...
const PaletteGroups & get_groups() const
Once assign_groups() has been called, this returns the actual set of groups the TextureImage has been...
void mark_eggs_stale()
Marks all the egg files that reference this texture stale.
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object,...
EggTexture::WrapMode get_txa_wrap_v() const
Returns the wrap mode specified in the v direction in the txa file, or WM_unspecified.
void read_header()
Causes the header part of the image to be reread, usually to confirm that its image properties (size,...
void copy_unplaced(bool redo_all)
Copies the texture to whichever destination directories are appropriate for the groups in which it ha...
SourceTextureImage * get_preferred_source()
Determines the preferred source image for examining size and reading pixels, etc.
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...
int get_margin() const
Returns the appropriate margin for this texture.
bool is_used() const
Returns true if this particular texture has been placed somewhere, anywhere, or false if it is not us...
EggRenderMode::AlphaMode get_alpha_mode() const
Returns the alpha mode that should be used to render objects with this texture, as specified by the u...
void write_scale_info(std::ostream &out, int indent_level=0)
Writes the information about the texture's size and placement.
bool get_omit() const
Returns true if the user specifically requested to omit this texture via the "omit" keyword in the ....
bool is_surprise() const
Returns true if this particular texture is a 'surprise', i.e.
TexturePlacement * get_placement(PaletteGroup *group) const
Gets the TexturePlacement object which represents the assignment of this texture to the indicated gro...
void mark_texture_named()
Indicates that this particular texture has been named by the user for processing this session,...
void release_source_image()
Frees the memory that was allocated by a previous call to read_source_image().
void assign_groups()
Assigns the texture to all of the PaletteGroups the various egg files that use it need.
void set_source_image(const PNMImage &image)
Accepts the indicated source image as if it had been read from disk.
bool is_newer_than(const Filename &reference_filename)
Returns true if the source image is newer than the indicated file, false otherwise.
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
void force_replace()
Removes the texture from any PaletteImages it is assigned to, but does not remove it from the groups.
void post_txa_file()
Once the .txa file has been read and the TextureImage matched against it, considers applying the requ...
void write_source_pathnames(std::ostream &out, int indent_level=0) const
Writes the list of source pathnames that might contribute to this texture to the indicated output str...
bool is_texture_named() const
Returns true if this particular texture has been named by the user for procession this session,...
double get_coverage_threshold() const
Returns the appropriate coverage threshold for this texture.
SourceTextureImage * get_source(const Filename &filename, const Filename &alpha_filename, int alpha_file_channel)
Returns the SourceTextureImage corresponding to the given filename(s).
void determine_placement_size()
Calls determine_size() on each TexturePlacement for the texture, to ensure that each TexturePlacement...
const PNMImage & read_source_image()
Reads in the original image, if it has not already been read, and returns it.
EggTexture::WrapMode get_txa_wrap_u() const
Returns the wrap mode specified in the u direction in the txa file, or WM_unspecified.
This corresponds to a particular assignment of a TextureImage with a PaletteGroup,...
This is the set of characteristics of a texture that, if different from another texture,...
These are the things that a user might explicitly request to adjust on a texture via a line in the ....
This is a single matching line in the .txa file.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
This is our own Panda specialization on the default STL map.
This is our own Panda specialization on the default STL set.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.