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

PaletteGroup Class Reference

#include <paletteGroup.h>

Inheritance diagram for PaletteGroup:

TypedWritable Namable TypedObject List of all members.

Public Member Functions

 PaletteGroup ()
void set_dirname (const string &dirname)
bool has_dirname () const
const string & get_dirname () const
void clear_depends ()
void group_with (PaletteGroup *other)
const PaletteGroupsget_groups () const
void get_placements (pvector< TexturePlacement * > &placements) const
void get_complete_placements (pvector< TexturePlacement * > &placements) const
void reset_dependency_level ()
void set_dependency_level (int level)
bool set_dependency_order ()
int get_dependency_level () const
int get_dependency_order () const
int get_dirname_order () const
bool is_preferred_over (const PaletteGroup &other) const
void increment_egg_count ()
int get_egg_count () const
PalettePageget_page (const TextureProperties &properties)
TexturePlacementprepare (TextureImage *texture)
void unplace (TexturePlacement *placement)
void place_all ()
void update_unknown_textures (const TxaFile &txa_file)
void write_image_info (ostream &out, int indent_level=0) const
void optimal_resize ()
void reset_images ()
void setup_shadow_images ()
void update_images (bool redo_all)
virtual void write_datagram (BamWriter *writer, Datagram &datagram)
virtual int complete_pointers (TypedWritable **p_list, BamReader *manager)
virtual void finalize ()
virtual TypeHandle get_type () const

Static Public Member Functions

void register_with_read_factory ()
TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

void fillin (DatagramIterator &scan, BamReader *manager)

Static Protected Member Functions

TypedWritablemake_PaletteGroup (const FactoryParams &params)

Private Types

typedef pset< TexturePlacement * > Placements
typedef pmap< TextureProperties,
PalettePage * > 
Pages

Private Attributes

string _dirname
int _egg_count
PaletteGroups _dependent
int _dependency_level
int _dependency_order
int _dirname_order
Placements _placements
Pages _pages
int _num_placements
int _num_pages
pvector< PalettePage * > _load_pages

Static Private Attributes

TypeHandle _type_handle

Friends

class PaletteGroups

Member Typedef Documentation

typedef pmap<TextureProperties, PalettePage *> PaletteGroup::Pages [private]
 

Definition at line 103 of file paletteGroup.h.

typedef pset<TexturePlacement *> PaletteGroup::Placements [private]
 

Definition at line 100 of file paletteGroup.h.


Constructor & Destructor Documentation

PaletteGroup::PaletteGroup  ) 
 

Definition at line 42 of file paletteGroup.cxx.

References _dependency_level, _dependency_order, _dirname_order, and _egg_count.


Member Function Documentation

void PaletteGroup::clear_depends  ) 
 

Definition at line 92 of file paletteGroup.cxx.

References _dependency_level, _dependency_order, _dependent, _dirname_order, and PaletteGroups::clear().

Referenced by Palettizer::read_txa_file().

int PaletteGroup::complete_pointers TypedWritable **  p_list,
BamReader manager
[virtual]
 

Reimplemented from TypedWritable.

Definition at line 651 of file paletteGroup.cxx.

References _dependent, _load_pages, _num_pages, _num_placements, _placements, PaletteGroups::complete_pointers(), TypedWritable::complete_pointers(), DCAST_INTO_R, and nassertr.

void PaletteGroup::fillin DatagramIterator scan,
BamReader manager
[protected]
 

Reimplemented from TypedWritable.

Definition at line 729 of file paletteGroup.cxx.

References _dependency_level, _dependency_order, _dependent, _dirname, _dirname_order, _num_pages, _num_placements, PaletteGroups::fillin(), TypedWritable::fillin(), DatagramIterator::get_int32(), DatagramIterator::get_string(), DatagramIterator::get_uint32(), BamReader::read_pointers(), and Namable::set_name().

Referenced by make_PaletteGroup().

void PaletteGroup::finalize  )  [virtual]
 

Reimplemented from TypedWritable.

Definition at line 688 of file paletteGroup.cxx.

References _load_pages, _pages, PalettePage::get_properties(), and nassertv.

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

Reimplemented from Namable.

Definition at line 127 of file paletteGroup.h.

References _type_handle.

Referenced by get_type(), and register_with_read_factory().

void PaletteGroup::get_complete_placements pvector< TexturePlacement * > &  placements  )  const
 

Definition at line 152 of file paletteGroup.cxx.

References _dependent, PaletteGroups::begin(), PaletteGroups::end(), get_placements(), PaletteGroups::iterator, and PaletteGroups::make_complete().

Referenced by Palettizer::report_statistics().

int PaletteGroup::get_dependency_level  )  const
 

Definition at line 272 of file paletteGroup.cxx.

References _dependency_level.

int PaletteGroup::get_dependency_order  )  const
 

Definition at line 292 of file paletteGroup.cxx.

References _dependency_order.

Referenced by is_preferred_over(), and set_dependency_order().

const string & PaletteGroup::get_dirname  )  const
 

Definition at line 81 of file paletteGroup.cxx.

References _dirname.

Referenced by set_dependency_order(), and ImageFile::set_filename().

int PaletteGroup::get_dirname_order  )  const
 

Definition at line 312 of file paletteGroup.cxx.

References _dirname_order.

Referenced by is_preferred_over(), and set_dependency_order().

int PaletteGroup::get_egg_count  )  const
 

Definition at line 358 of file paletteGroup.cxx.

References _egg_count.

Referenced by is_preferred_over().

const PaletteGroups & PaletteGroup::get_groups  )  const
 

Definition at line 122 of file paletteGroup.cxx.

References _dependent.

Referenced by Palettizer::report_pi(), and Palettizer::report_statistics().

PalettePage * PaletteGroup::get_page const TextureProperties properties  ) 
 

Definition at line 370 of file paletteGroup.cxx.

References _pages, and nassertr.

Referenced by place_all().

void PaletteGroup::get_placements pvector< TexturePlacement * > &  placements  )  const
 

Definition at line 137 of file paletteGroup.cxx.

References _placements.

Referenced by get_complete_placements(), and Palettizer::report_statistics().

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

Reimplemented from TypedWritable.

Definition at line 137 of file paletteGroup.h.

References get_class_type().

void PaletteGroup::group_with PaletteGroup *  other  ) 
 

Definition at line 112 of file paletteGroup.cxx.

References _dependent, and PaletteGroups::insert().

Referenced by TxaFile::parse_group_line().

bool PaletteGroup::has_dirname  )  const
 

Definition at line 70 of file paletteGroup.cxx.

References _dirname.

Referenced by Palettizer::get_default_group().

void PaletteGroup::increment_egg_count  ) 
 

Definition at line 347 of file paletteGroup.cxx.

References _egg_count.

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

Reimplemented from Namable.

Definition at line 130 of file paletteGroup.h.

References _type_handle, Namable::get_class_type(), TypedObject::get_class_type(), Namable::init_type(), TypedWritable::init_type(), and register_type().

Referenced by ConfigureFn().

bool PaletteGroup::is_preferred_over const PaletteGroup &  other  )  const
 

Definition at line 325 of file paletteGroup.cxx.

References get_dependency_order(), get_dirname_order(), and get_egg_count().

Referenced by TextureImage::assign_groups().

TypedWritable * PaletteGroup::make_PaletteGroup const FactoryParams params  )  [static, protected]
 

Definition at line 710 of file paletteGroup.cxx.

References fillin(), params, parse_params(), and BamReader::register_finalize().

Referenced by register_with_read_factory().

void PaletteGroup::optimal_resize  ) 
 

Definition at line 542 of file paletteGroup.cxx.

References _pages, and PalettePage::optimal_resize().

Referenced by Palettizer::optimal_resize().

void PaletteGroup::place_all  ) 
 

Definition at line 430 of file paletteGroup.cxx.

References _pages, _placements, PalettePage::assign(), TexturePlacement::get_omit_reason(), get_page(), TexturePlacement::get_properties(), OR_working, and PalettePage::place_all().

Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().

TexturePlacement * PaletteGroup::prepare TextureImage texture  ) 
 

Definition at line 394 of file paletteGroup.cxx.

References _placements, and texture.

void PaletteGroup::register_with_read_factory  )  [static]
 

Definition at line 605 of file paletteGroup.cxx.

References get_class_type(), BamReader::get_factory(), and make_PaletteGroup().

Referenced by ConfigureFn().

void PaletteGroup::reset_dependency_level  ) 
 

Definition at line 174 of file paletteGroup.cxx.

References _dependency_level, _dependency_order, and _dirname_order.

Referenced by Palettizer::read_txa_file().

void PaletteGroup::reset_images  ) 
 

Definition at line 558 of file paletteGroup.cxx.

References _pages, and PalettePage::reset_images().

Referenced by Palettizer::reset_images().

void PaletteGroup::set_dependency_level int  level  ) 
 

Definition at line 193 of file paletteGroup.cxx.

References _dependency_level, _dependent, PaletteGroups::begin(), PaletteGroups::end(), PaletteGroups::iterator, and level.

Referenced by Palettizer::read_txa_file().

bool PaletteGroup::set_dependency_order  ) 
 

Definition at line 217 of file paletteGroup.cxx.

References _dependency_order, _dependent, _dirname, _dirname_order, PaletteGroups::begin(), PaletteGroups::end(), get_dependency_order(), get_dirname(), get_dirname_order(), and PaletteGroups::iterator.

Referenced by Palettizer::read_txa_file().

void PaletteGroup::set_dirname const string &  dirname  ) 
 

Definition at line 58 of file paletteGroup.cxx.

References _dirname.

Referenced by Palettizer::get_default_group(), and TxaFile::parse_group_line().

void PaletteGroup::setup_shadow_images  ) 
 

Definition at line 575 of file paletteGroup.cxx.

References _pages, and PalettePage::setup_shadow_images().

Referenced by Palettizer::all_params_set().

void PaletteGroup::unplace TexturePlacement placement  ) 
 

Definition at line 408 of file paletteGroup.cxx.

References _placements, TexturePlacement::get_group(), TexturePlacement::get_page(), TexturePlacement::is_placed(), nassertv, and PalettePage::unplace().

Referenced by TexturePlacement::~TexturePlacement().

void PaletteGroup::update_images bool  redo_all  ) 
 

Definition at line 590 of file paletteGroup.cxx.

References _pages, and PalettePage::update_images().

Referenced by Palettizer::generate_images().

void PaletteGroup::update_unknown_textures const TxaFile txa_file  ) 
 

Definition at line 460 of file paletteGroup.cxx.

References _placements, TexturePlacement::determine_size(), TexturePlacement::get_texture(), TexturePlacement::is_size_known(), TxaFile::match_texture(), and texture.

Referenced by Palettizer::process_all(), and Palettizer::process_command_line_eggs().

void PaletteGroup::write_datagram BamWriter writer,
Datagram datagram
[virtual]
 

Reimplemented from TypedWritable.

Definition at line 618 of file paletteGroup.cxx.

References _dependency_level, _dependency_order, _dependent, _dirname, _dirname_order, _pages, _placements, Datagram::add_int32(), Datagram::add_string(), Datagram::add_uint32(), Namable::get_name(), PaletteGroups::write_datagram(), TypedWritable::write_datagram(), and writer().

void PaletteGroup::write_image_info ostream &  out,
int  indent_level = 0
const
 

Definition at line 489 of file paletteGroup.cxx.

References _pages, _placements, Namable::get_name(), TexturePlacement::get_omit_reason(), TexturePlacement::get_texture(), TexturePlacement::get_uv_area(), TexturePlacement::get_x_size(), TexturePlacement::get_y_size(), indent(), OR_coverage, OR_none, OR_size, and PalettePage::write_image_info().

Referenced by Palettizer::report_pi().


Friends And Related Function Documentation

friend class PaletteGroups [friend]
 

Definition at line 144 of file paletteGroup.h.


Member Data Documentation

int PaletteGroup::_dependency_level [private]
 

Definition at line 96 of file paletteGroup.h.

Referenced by clear_depends(), fillin(), get_dependency_level(), PaletteGroup(), reset_dependency_level(), set_dependency_level(), and write_datagram().

int PaletteGroup::_dependency_order [private]
 

Definition at line 97 of file paletteGroup.h.

Referenced by clear_depends(), fillin(), get_dependency_order(), PaletteGroup(), reset_dependency_level(), set_dependency_order(), and write_datagram().

PaletteGroups PaletteGroup::_dependent [private]
 

Definition at line 95 of file paletteGroup.h.

Referenced by clear_depends(), complete_pointers(), fillin(), get_complete_placements(), get_groups(), group_with(), PaletteGroups::r_make_complete(), set_dependency_level(), set_dependency_order(), and write_datagram().

string PaletteGroup::_dirname [private]
 

Definition at line 93 of file paletteGroup.h.

Referenced by fillin(), get_dirname(), has_dirname(), set_dependency_order(), set_dirname(), and write_datagram().

int PaletteGroup::_dirname_order [private]
 

Definition at line 98 of file paletteGroup.h.

Referenced by clear_depends(), fillin(), get_dirname_order(), PaletteGroup(), reset_dependency_level(), set_dependency_order(), and write_datagram().

int PaletteGroup::_egg_count [private]
 

Definition at line 94 of file paletteGroup.h.

Referenced by get_egg_count(), increment_egg_count(), and PaletteGroup().

pvector<PalettePage *> PaletteGroup::_load_pages [private]
 

Definition at line 124 of file paletteGroup.h.

Referenced by complete_pointers(), and finalize().

int PaletteGroup::_num_pages [private]
 

Definition at line 123 of file paletteGroup.h.

Referenced by complete_pointers(), and fillin().

int PaletteGroup::_num_placements [private]
 

Definition at line 122 of file paletteGroup.h.

Referenced by complete_pointers(), and fillin().

Pages PaletteGroup::_pages [private]
 

Definition at line 104 of file paletteGroup.h.

Referenced by finalize(), get_page(), optimal_resize(), place_all(), reset_images(), setup_shadow_images(), update_images(), write_datagram(), and write_image_info().

Placements PaletteGroup::_placements [private]
 

Definition at line 101 of file paletteGroup.h.

Referenced by complete_pointers(), get_placements(), place_all(), prepare(), unplace(), update_unknown_textures(), write_datagram(), and write_image_info().

TypeHandle PaletteGroup::_type_handle [static, private]
 

Reimplemented from Namable.

Definition at line 34 of file paletteGroup.cxx.

Referenced by get_class_type(), and init_type().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:01:19 2003 for Panda-Tool by doxygen1.3