50 bool set_filename(
const std::string &dirname,
const std::string &basename);
68 int _alpha_file_channel;
86 static void init_type() {
87 TypedWritable::init_type();
89 TypedWritable::get_class_type());
92 return get_class_type();
bool write(const PNMImage &image) const
Writes out the image in the indicated PNMImage to the _filename and/or _alpha_filename.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool read(PNMImage &image) const
Reads in the image (or images, if the alpha_filename is separate) and stores it in the indicated PNMI...
void update_egg_tex(EggTexture *egg_tex) const
Sets the indicated EggTexture to refer to this file.
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
bool exists() const
Returns true if the file or files named by the image file exist, false otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_alpha_file_channel() const
Returns the particular channel number of the alpha image file from which the alpha channel should be ...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
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...
Defines a texture map that may be applied to geometry.
int get_y_size() const
Returns the size of the image file in pixels in the Y direction.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output_filename(std::ostream &out) const
Writes the filename (or pair of filenames) to the indicated output stream.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object,...
const TextureProperties & get_properties() const
Returns the grouping properties of the image.
bool set_filename(PaletteGroup *group, const std::string &basename)
Sets the filename, and if applicable, the alpha_filename, from the indicated basename.
bool is_size_known() const
Returns true if the size of the image file is known, false otherwise.
The name of a file, such as a texture file or an Egg file.
int get_x_size() const
Returns the size of the image file in pixels in the X direction.
This is the base class of both TextureImage and PaletteImage.
int get_num_channels() const
Returns the number of channels of the image.
void clear_basic_properties()
Resets the properties to a neutral state, for instance in preparation for calling update_properties()...
const Filename & get_alpha_filename() const
Returns the alpha filename of the image file.
void unlink()
Deletes the image file or files.
bool has_num_channels() const
Returns true if the number of channels in the image is known, false otherwise.
bool make_shadow_image(const std::string &basename)
Sets up the ImageFile as a "shadow image" of a particular PaletteImage.
void update_properties(const TextureProperties &properties)
If the indicate TextureProperties structure is more specific than this one, updates this one.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
const Filename & get_filename() const
Returns the primary filename of the image file.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This is the set of characteristics of a texture that, if different from another texture,...