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

TextureProperties Class Reference

#include <textureProperties.h>

Inheritance diagram for TextureProperties:

TypedWritable TypedObject List of all members.

Public Member Functions

 TextureProperties ()
 TextureProperties (const TextureProperties &copy)
void operator= (const TextureProperties &copy)
void clear_basic ()
bool has_num_channels () const
int get_num_channels () const
void set_num_channels (int num_channels)
void force_grayscale ()
void force_nonalpha ()
bool uses_alpha () const
string get_string () const
void update_properties (const TextureProperties &other)
void fully_define ()
void update_egg_tex (EggTexture *egg_tex) const
bool egg_properties_match (const TextureProperties &other) const
bool operator< (const TextureProperties &other) const
bool operator== (const TextureProperties &other) const
bool operator!= (const TextureProperties &other) const
virtual void write_datagram (BamWriter *writer, Datagram &datagram)
virtual int complete_pointers (TypedWritable **p_list, BamReader *manager)
void fillin (DatagramIterator &scan, BamReader *manager)
virtual TypeHandle get_type () const

Static Public Member Functions

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

Public Attributes

EggTexture::Format _format
bool _force_format
bool _generic_format
EggTexture::FilterType _minfilter
EggTexture::FilterType _magfilter
int _anisotropic_degree
PNMFileType_color_type
PNMFileType_alpha_type

Static Protected Member Functions

TypedWritablemake_TextureProperties (const FactoryParams &params)

Static Private Member Functions

string get_format_string (EggTexture::Format format)
string get_filter_string (EggTexture::FilterType filter_type)
string get_anisotropic_degree_string (int aniso_degree)
string get_type_string (PNMFileType *color_type, PNMFileType *alpha_type)
EggTexture::Format union_format (EggTexture::Format a, EggTexture::Format b)
EggTexture::FilterType union_filter (EggTexture::FilterType a, EggTexture::FilterType b)

Private Attributes

bool _got_num_channels
int _num_channels
int _effective_num_channels

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

TextureProperties::TextureProperties  ) 
 

Definition at line 35 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _effective_num_channels, _force_format, _format, _generic_format, _got_num_channels, _magfilter, _minfilter, _num_channels, EggTexture::F_unspecified, EggTexture::FT_unspecified, and NULL.

TextureProperties::TextureProperties const TextureProperties &  copy  ) 
 

Definition at line 55 of file textureProperties.cxx.


Member Function Documentation

void TextureProperties::clear_basic  ) 
 

Definition at line 97 of file textureProperties.cxx.

References _anisotropic_degree, _force_format, _format, _magfilter, _minfilter, EggTexture::F_unspecified, and EggTexture::FT_unspecified.

Referenced by ImageFile::clear_basic_properties().

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

Reimplemented from TypedWritable.

Definition at line 803 of file textureProperties.cxx.

References _alpha_type, _color_type, TypedWritable::complete_pointers(), DCAST_INTO_R, index, and NULL.

Referenced by TextureReference::complete_pointers(), PalettePage::complete_pointers(), and ImageFile::complete_pointers().

bool TextureProperties::egg_properties_match const TextureProperties &  other  )  const
 

Definition at line 505 of file textureProperties.cxx.

References _anisotropic_degree, _format, _magfilter, and _minfilter.

Referenced by TextureImage::post_txa_file().

void TextureProperties::fillin DatagramIterator scan,
BamReader manager
 

Reimplemented from TypedWritable.

Definition at line 846 of file textureProperties.cxx.

References _anisotropic_degree, _effective_num_channels, _force_format, _format, _generic_format, _got_num_channels, _magfilter, _minfilter, _num_channels, Palettizer::_read_pi_version, TypedWritable::fillin(), DatagramIterator::get_bool(), DatagramIterator::get_int32(), and BamReader::read_pointer().

Referenced by TextureReference::fillin(), PalettePage::fillin(), ImageFile::fillin(), and make_TextureProperties().

void TextureProperties::force_grayscale  ) 
 

Definition at line 152 of file textureProperties.cxx.

References _effective_num_channels, _got_num_channels, _num_channels, and nassertv.

Referenced by TextureImage::consider_grayscale().

void TextureProperties::force_nonalpha  ) 
 

Definition at line 167 of file textureProperties.cxx.

References _effective_num_channels, _got_num_channels, _num_channels, and nassertv.

Referenced by TextureImage::consider_alpha().

void TextureProperties::fully_define  ) 
 

Definition at line 264 of file textureProperties.cxx.

References Palettizer::_alpha_type, _alpha_type, Palettizer::_color_type, _color_type, _effective_num_channels, _force_format, _format, _got_num_channels, _magfilter, _minfilter, _num_channels, EggTexture::F_alpha, EggTexture::F_blue, EggTexture::F_green, EggTexture::F_luminance, EggTexture::F_luminance_alpha, EggTexture::F_luminance_alphamask, EggTexture::F_red, EggTexture::F_rgb, EggTexture::F_rgb12, EggTexture::F_rgb332, EggTexture::F_rgb5, EggTexture::F_rgb8, EggTexture::F_rgba, EggTexture::F_rgba12, EggTexture::F_rgba4, EggTexture::F_rgba5, EggTexture::F_rgba8, EggTexture::F_rgbm, EggTexture::F_unspecified, EggTexture::FT_linear, EggTexture::FT_linear_mipmap_linear, EggTexture::FT_linear_mipmap_nearest, EggTexture::FT_nearest_mipmap_linear, EggTexture::FT_nearest_mipmap_nearest, EggTexture::FT_unspecified, NULL, and pal.

Referenced by TextureImage::post_txa_file().

string TextureProperties::get_anisotropic_degree_string int  aniso_degree  )  [static, private]
 

Definition at line 678 of file textureProperties.cxx.

References format_string().

Referenced by get_string().

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

Reimplemented from TypedObject.

Definition at line 103 of file textureProperties.h.

References _type_handle.

Referenced by get_type(), and register_with_read_factory().

string TextureProperties::get_filter_string EggTexture::FilterType  filter_type  )  [static, private]
 

Definition at line 645 of file textureProperties.cxx.

References EggTexture::FT_linear, EggTexture::FT_linear_mipmap_linear, EggTexture::FT_linear_mipmap_nearest, EggTexture::FT_nearest, EggTexture::FT_nearest_mipmap_linear, EggTexture::FT_nearest_mipmap_nearest, and EggTexture::FT_unspecified.

Referenced by get_string().

string TextureProperties::get_format_string EggTexture::Format  format  )  [static, private]
 

Definition at line 575 of file textureProperties.cxx.

References EggTexture::F_alpha, EggTexture::F_blue, EggTexture::F_green, EggTexture::F_luminance, EggTexture::F_luminance_alpha, EggTexture::F_luminance_alphamask, EggTexture::F_red, EggTexture::F_rgb, EggTexture::F_rgb12, EggTexture::F_rgb332, EggTexture::F_rgb5, EggTexture::F_rgb8, EggTexture::F_rgba, EggTexture::F_rgba12, EggTexture::F_rgba4, EggTexture::F_rgba5, EggTexture::F_rgba8, EggTexture::F_rgbm, and EggTexture::F_unspecified.

Referenced by get_string().

int TextureProperties::get_num_channels  )  const
 

Definition at line 125 of file textureProperties.cxx.

References _effective_num_channels, _got_num_channels, and nassertr.

Referenced by PaletteImage::get_image(), ImageFile::get_num_channels(), TextureImage::post_txa_file(), and TextureImage::write_source_pathnames().

string TextureProperties::get_string  )  const
 

Definition at line 208 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _effective_num_channels, _format, _magfilter, _minfilter, get_anisotropic_degree_string(), get_filter_string(), get_format_string(), get_type_string(), and ostringstream::str().

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

Reimplemented from TypedWritable.

Definition at line 111 of file textureProperties.h.

References get_class_type().

string TextureProperties::get_type_string PNMFileType color_type,
PNMFileType alpha_type
[static, private]
 

Definition at line 693 of file textureProperties.cxx.

References NULL.

Referenced by get_string().

bool TextureProperties::has_num_channels  )  const
 

Definition at line 113 of file textureProperties.cxx.

References _got_num_channels.

Referenced by ImageFile::has_num_channels(), TextureImage::post_txa_file(), and TextureImage::write_source_pathnames().

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

Reimplemented from TypedWritable.

Definition at line 106 of file textureProperties.h.

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

Referenced by ConfigureFn().

TypedWritable * TextureProperties::make_TextureProperties const FactoryParams params  )  [static, protected]
 

Definition at line 828 of file textureProperties.cxx.

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

Referenced by register_with_read_factory().

bool TextureProperties::operator!= const TextureProperties &  other  )  const
 

Definition at line 564 of file textureProperties.cxx.

References operator==().

bool TextureProperties::operator< const TextureProperties &  other  )  const
 

Definition at line 518 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _format, _magfilter, _minfilter, and NULL.

void TextureProperties::operator= const TextureProperties &  copy  ) 
 

Definition at line 76 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _effective_num_channels, _force_format, _format, _generic_format, _got_num_channels, _magfilter, _minfilter, and _num_channels.

bool TextureProperties::operator== const TextureProperties &  other  )  const
 

Definition at line 548 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _format, _magfilter, _minfilter, and NULL.

Referenced by operator!=().

void TextureProperties::register_with_read_factory  )  [static]
 

Definition at line 765 of file textureProperties.cxx.

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

Referenced by ConfigureFn().

void TextureProperties::set_num_channels int  num_channels  ) 
 

Definition at line 138 of file textureProperties.cxx.

References _effective_num_channels, _got_num_channels, and _num_channels.

Referenced by TextureImage::post_txa_file(), and SourceTextureImage::read_header().

EggTexture::FilterType TextureProperties::union_filter EggTexture::FilterType  a,
EggTexture::FilterType  b
[static, private]
 

Definition at line 750 of file textureProperties.cxx.

References a, and b.

Referenced by update_properties().

EggTexture::Format TextureProperties::union_format EggTexture::Format  a,
EggTexture::Format  b
[static, private]
 

Definition at line 710 of file textureProperties.cxx.

References a, b, EggTexture::F_alpha, EggTexture::F_blue, EggTexture::F_green, EggTexture::F_red, EggTexture::F_rgb, EggTexture::F_rgba, EggTexture::F_rgba12, EggTexture::F_rgba4, EggTexture::F_rgba5, EggTexture::F_rgba8, EggTexture::F_rgbm, and EggTexture::F_unspecified.

Referenced by update_properties().

void TextureProperties::update_egg_tex EggTexture egg_tex  )  const
 

Definition at line 489 of file textureProperties.cxx.

References _anisotropic_degree, _format, _minfilter, EggTexture::set_anisotropic_degree(), EggTexture::set_format(), EggTexture::set_magfilter(), and EggTexture::set_minfilter().

Referenced by ImageFile::update_egg_tex().

void TextureProperties::update_properties const TextureProperties &  other  ) 
 

Definition at line 232 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _effective_num_channels, _force_format, _format, _got_num_channels, _magfilter, _minfilter, _num_channels, NULL, union_filter(), and union_format().

Referenced by ImageFile::update_properties().

bool TextureProperties::uses_alpha  )  const
 

Definition at line 180 of file textureProperties.cxx.

References EggTexture::F_alpha, EggTexture::F_luminance_alpha, EggTexture::F_luminance_alphamask, EggTexture::F_rgba, EggTexture::F_rgba12, EggTexture::F_rgba4, EggTexture::F_rgba5, EggTexture::F_rgba8, and EggTexture::F_rgbm.

Referenced by ImageFile::exists(), ImageFile::output_filename(), and ImageFile::update_egg_tex().

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

Reimplemented from TypedWritable.

Definition at line 778 of file textureProperties.cxx.

References _alpha_type, _anisotropic_degree, _color_type, _effective_num_channels, _force_format, _format, _generic_format, _got_num_channels, _magfilter, _minfilter, _num_channels, Datagram::add_bool(), Datagram::add_int32(), TypedWritable::write_datagram(), and writer().

Referenced by TextureReference::write_datagram(), PalettePage::write_datagram(), and ImageFile::write_datagram().


Member Data Documentation

PNMFileType* TextureProperties::_alpha_type
 

Definition at line 70 of file textureProperties.h.

Referenced by complete_pointers(), ImageFile::exists(), fully_define(), get_string(), ImageFile::make_shadow_image(), TxaLine::match_texture(), operator<(), operator=(), operator==(), TextureImage::post_txa_file(), ImageFile::read(), ImageFile::set_filename(), TextureProperties(), update_properties(), ImageFile::write(), and write_datagram().

int TextureProperties::_anisotropic_degree
 

Definition at line 68 of file textureProperties.h.

Referenced by clear_basic(), egg_properties_match(), fillin(), TextureReference::from_egg(), get_string(), operator<(), operator=(), operator==(), TextureImage::post_txa_file(), TextureProperties(), update_egg_tex(), update_properties(), TextureReference::write(), and write_datagram().

PNMFileType* TextureProperties::_color_type
 

Definition at line 69 of file textureProperties.h.

Referenced by complete_pointers(), fully_define(), get_string(), ImageFile::make_shadow_image(), TxaLine::match_texture(), operator<(), operator=(), operator==(), TextureImage::post_txa_file(), ImageFile::read(), ImageFile::set_filename(), TextureProperties(), update_properties(), ImageFile::write(), and write_datagram().

int TextureProperties::_effective_num_channels [private]
 

Definition at line 87 of file textureProperties.h.

Referenced by fillin(), force_grayscale(), force_nonalpha(), fully_define(), get_num_channels(), get_string(), operator=(), set_num_channels(), TextureProperties(), update_properties(), and write_datagram().

bool TextureProperties::_force_format
 

Definition at line 65 of file textureProperties.h.

Referenced by clear_basic(), fillin(), fully_define(), operator=(), TextureImage::post_txa_file(), TextureProperties(), update_properties(), and write_datagram().

EggTexture::Format TextureProperties::_format
 

Definition at line 64 of file textureProperties.h.

Referenced by clear_basic(), egg_properties_match(), fillin(), TextureReference::from_egg(), fully_define(), get_string(), operator<(), operator=(), operator==(), TextureImage::post_txa_file(), TextureProperties(), update_egg_tex(), update_properties(), TextureReference::write(), and write_datagram().

bool TextureProperties::_generic_format
 

Definition at line 66 of file textureProperties.h.

Referenced by fillin(), operator=(), TextureImage::post_txa_file(), TextureProperties(), and write_datagram().

bool TextureProperties::_got_num_channels [private]
 

Definition at line 85 of file textureProperties.h.

Referenced by fillin(), force_grayscale(), force_nonalpha(), fully_define(), get_num_channels(), has_num_channels(), operator=(), set_num_channels(), TextureProperties(), update_properties(), and write_datagram().

EggTexture::FilterType TextureProperties::_magfilter
 

Definition at line 67 of file textureProperties.h.

Referenced by clear_basic(), egg_properties_match(), fillin(), TextureReference::from_egg(), fully_define(), get_string(), operator<(), operator=(), operator==(), TextureImage::post_txa_file(), TextureProperties(), update_properties(), and write_datagram().

EggTexture::FilterType TextureProperties::_minfilter
 

Definition at line 67 of file textureProperties.h.

Referenced by clear_basic(), egg_properties_match(), fillin(), TextureReference::from_egg(), fully_define(), get_string(), operator<(), operator=(), operator==(), TextureImage::post_txa_file(), TextureProperties(), update_egg_tex(), update_properties(), TextureReference::write(), and write_datagram().

int TextureProperties::_num_channels [private]
 

Definition at line 86 of file textureProperties.h.

Referenced by fillin(), force_grayscale(), force_nonalpha(), fully_define(), operator=(), set_num_channels(), TextureProperties(), update_properties(), and write_datagram().

TypeHandle TextureProperties::_type_handle [static, private]
 

Reimplemented from TypedWritable.

Definition at line 27 of file textureProperties.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:29 2003 for Panda-Tool by doxygen1.3