Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
DestTextureImage Class Reference

This represents a texture filename as it has been resized and copied to the map directory (e.g. More...

#include "destTextureImage.h"

Inheritance diagram for DestTextureImage:
ImageFile TypedWritable TypedObject MemoryBase

List of all members.

Public Member Functions

 DestTextureImage (TexturePlacement *placement)
void copy (TextureImage *texture)
 Unconditionally copies the source texture into the appropriate filename.
void copy_if_stale (const DestTextureImage *other, TextureImage *texture)
 Copies the source texture into the appropriate filename only if the indicated old reference, which represents the way it was last copied, is now out-of-date.
virtual TypeHandle get_type () const
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.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.
static void register_with_read_factory ()
 Registers the current object as something that can be read from a Bam file.

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 TypedWritablemake_DestTextureImage (const FactoryParams &params)
 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.

Detailed Description

This represents a texture filename as it has been resized and copied to the map directory (e.g.

for an unplaced texture).

Definition at line 31 of file destTextureImage.h.


Member Function Documentation

void DestTextureImage::copy ( TextureImage texture)
void DestTextureImage::copy_if_stale ( const DestTextureImage other,
TextureImage texture 
)

Copies the source texture into the appropriate filename only if the indicated old reference, which represents the way it was last copied, is now out-of-date.

Definition at line 103 of file destTextureImage.cxx.

References copy(), ImageFile::get_filename(), ImageFile::get_num_channels(), TextureImage::get_preferred_source(), ImageFile::get_x_size(), and ImageFile::get_y_size().

void DestTextureImage::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 ImageFile.

Definition at line 186 of file destTextureImage.cxx.

Referenced by make_DestTextureImage().

static void DestTextureImage::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from ImageFile.

Definition at line 58 of file destTextureImage.h.

TypedWritable * DestTextureImage::make_DestTextureImage ( 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 168 of file destTextureImage.cxx.

References fillin().

Referenced by register_with_read_factory().

Registers the current object as something that can be read from a Bam file.

Definition at line 142 of file destTextureImage.cxx.

References BamReader::get_factory(), and make_DestTextureImage().

void DestTextureImage::write_datagram ( BamWriter writer,
Datagram datagram 
) [virtual]

Fills the indicated datagram up with a binary representation of the current object, in preparation for writing to a Bam file.

Reimplemented from ImageFile.

Definition at line 155 of file destTextureImage.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations