14#ifndef SOURCETEXTUREIMAGE_H
15#define SOURCETEXTUREIMAGE_H
34 const Filename &alpha_filename,
int alpha_file_channel);
49 bool _successfully_read_header;
66 static void init_type() {
67 ImageFile::init_type();
69 ImageFile::get_class_type());
72 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 ...
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.
void output_filename(std::ostream &out) const
Writes the filename (or pair of filenames) to the indicated output stream.
This is a texture image reference as it appears in an egg file: the source image of the texture.
bool get_size()
Determines the size of the SourceTextureImage, if it is not already known.
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object,...
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
bool read_header()
Reads the actual image header to determine the image properties, like its size.
void increment_egg_count()
Increments by one the number of egg files that are known to reference this SourceTextureImage.
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...
TextureImage * get_texture() const
Returns the particular texture that this image is one of the sources for.
void set_header(const PNMImageHeader &header)
Sets the header information associated with this image, as if it were loaded from the disk.
int get_egg_count() const
Returns the number of egg files that share this SourceTextureImage.
This represents a single source texture that is referenced by one or more egg files.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
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(),...