Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Member Functions
TexturePosition Class Reference

This represents a particular position of a texture within a PaletteImage. More...

#include "texturePosition.h"

Inheritance diagram for TexturePosition:
TypedWritable TypedObject MemoryBase

List of all members.

Public Member Functions

 TexturePosition (const TexturePosition &copy)
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().
virtual TypeHandle get_type () const
void operator= (const TexturePosition &copy)
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.

Public Attributes

int _margin
LTexCoordd _max_uv
LTexCoordd _min_uv
EggTexture::WrapMode _wrap_u
EggTexture::WrapMode _wrap_v
int _x
int _x_size
int _y
int _y_size

Static Protected Member Functions

static TypedWritablemake_TexturePosition (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 particular position of a texture within a PaletteImage.

There is only one of these per TexturePlacement, but it exists as a separate structure so the TexturePlacement can easily consider repositioning the texture.

Definition at line 34 of file texturePosition.h.


Member Function Documentation

void TexturePosition::fillin ( DatagramIterator scan,
BamReader manager 
) [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 141 of file texturePosition.cxx.

References DatagramIterator::get_float64(), and DatagramIterator::get_int32().

Referenced by TexturePlacement::fillin(), and make_TexturePosition().

static void TexturePosition::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 TypedWritable.

Definition at line 65 of file texturePosition.h.

TypedWritable * TexturePosition::make_TexturePosition ( 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 123 of file texturePosition.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 86 of file texturePosition.cxx.

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

void TexturePosition::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 TypedWritable.

Definition at line 99 of file texturePosition.cxx.

References Datagram::add_float64(), and Datagram::add_int32().

Referenced by TexturePlacement::write_datagram().


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