Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TexturePosition Class Reference

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

#include <texturePosition.h>

Inheritance diagram for TexturePosition:

TypedWritable TypedObject List of all members.

Public Member Functions

 TexturePosition ()
 TexturePosition (const TexturePosition &copy)
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.

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
virtual int complete_pointers (TypedWritable **p_list, BamReader *manager)
virtual void finalize ()
virtual TypeHandle force_init_type (void)
int get_type_index () const
bool is_of_type (TypeHandle handle) const
bool is_exact_type (TypeHandle handle) const

Static Public Member Functions

void register_with_read_factory ()
 Registers the current object as something that can be read from a Bam file.

TypeHandle get_class_type ()
void init_type ()

Public Attributes

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

Static Public Attributes

TypedWritable *const Null

Static Protected Member Functions

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.


Static Private Attributes

TypeHandle _type_handle

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 46 of file texturePosition.h.


Constructor & Destructor Documentation

TexturePosition::TexturePosition  ) 
 

Definition at line 39 of file texturePosition.cxx.

References _max_uv, _min_uv, _wrap_u, _wrap_v, _y_size, and EggTexture::WM_unspecified.

TexturePosition::TexturePosition const TexturePosition &  copy  ) 
 

Definition at line 59 of file texturePosition.cxx.


Member Function Documentation

void TexturePosition::fillin DatagramIterator scan,
BamReader manager
 

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 174 of file texturePosition.cxx.

Referenced by write_datagram().

TypeHandle TexturePosition::get_class_type void   )  [inline, static]
 

Reimplemented from TypedWritable.

Definition at line 74 of file texturePosition.h.

virtual TypeHandle TexturePosition::get_type void   )  const [inline, virtual]
 

Reimplemented from TypedWritable.

Definition at line 82 of file texturePosition.h.

void TexturePosition::init_type void   )  [inline, static]
 

Reimplemented from TypedWritable.

Definition at line 77 of file texturePosition.h.

References _type_handle.

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 151 of file texturePosition.cxx.

References _max_uv, _min_uv, _wrap_u, _wrap_v, and _y_size.

void TexturePosition::operator= const TexturePosition &  copy  ) 
 

Definition at line 80 of file texturePosition.cxx.

References _wrap_v.

void TexturePosition::register_with_read_factory void   )  [static]
 

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

Definition at line 103 of file texturePosition.cxx.

References _margin, _max_uv, _min_uv, _wrap_u, _wrap_v, _x, _x_size, _y, _y_size, Datagram::add_float64(), Datagram::add_int32(), TypedWritable::write_datagram(), and writer().

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 121 of file texturePosition.cxx.

References fillin(), params, and parse_params().


Member Data Documentation

int TexturePosition::_margin
 

Definition at line 52 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_y_size(), and register_with_read_factory().

TexCoordd TexturePosition::_max_uv
 

Definition at line 57 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_y_size(), make_TexturePosition(), register_with_read_factory(), and TexturePosition().

TexCoordd TexturePosition::_min_uv
 

Definition at line 56 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_y_size(), make_TexturePosition(), register_with_read_factory(), and TexturePosition().

TypeHandle TexturePosition::_type_handle [static, private]
 

Reimplemented from TypedWritable.

Definition at line 29 of file texturePosition.cxx.

Referenced by init_type().

EggTexture::WrapMode TexturePosition::_wrap_u
 

Definition at line 59 of file texturePosition.h.

Referenced by make_TexturePosition(), TexturePlacement::place_at(), register_with_read_factory(), and TexturePosition().

EggTexture::WrapMode TexturePosition::_wrap_v
 

Definition at line 60 of file texturePosition.h.

Referenced by make_TexturePosition(), operator=(), TexturePlacement::place_at(), register_with_read_factory(), and TexturePosition().

int TexturePosition::_x
 

Definition at line 53 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_x_size(), TexturePlacement::get_placed_y_size(), TexturePlacement::get_x_size(), and register_with_read_factory().

int TexturePosition::_x_size
 

Definition at line 54 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_x_size(), and register_with_read_factory().

int TexturePosition::_y
 

Definition at line 53 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_x_size(), TexturePlacement::get_placed_y_size(), TexturePlacement::get_y_size(), and register_with_read_factory().

int TexturePosition::_y_size
 

Definition at line 54 of file texturePosition.h.

Referenced by TexturePlacement::get_placed_x_size(), TexturePlacement::get_uv_area(), make_TexturePosition(), register_with_read_factory(), and TexturePosition().


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:28:06 2003 for Panda-Tool by doxygen1.3