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

EggTexture Class Reference

#include <eggTexture.h>

Inheritance diagram for EggTexture:

EggFilenameNode EggRenderMode EggNode EggNamedObject EggObject Namable TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Types

enum  Equivalence {
  E_basename = 0x001, E_extension = 0x002, E_dirname = 0x004, E_complete_filename = 0x007,
  E_transform = 0x008, E_attributes = 0x010, E_tref_name = 0x020
}
enum  Format {
  F_unspecified, F_rgba, F_rgbm, F_rgba12,
  F_rgba8, F_rgba4, F_rgba5, F_rgb,
  F_rgb12, F_rgb8, F_rgb5, F_rgb332,
  F_red, F_green, F_blue, F_alpha,
  F_luminance, F_luminance_alpha, F_luminance_alphamask
}
enum  WrapMode { WM_unspecified, WM_repeat, WM_clamp }
enum  FilterType {
  FT_unspecified, FT_nearest, FT_linear, FT_nearest_mipmap_nearest,
  FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, FT_linear_mipmap_linear
}
enum  EnvType { ET_unspecified, ET_modulate, ET_decal }

Public Member Functions

 EggTexture (const string &tref_name, const string &filename)
 EggTexture (const EggTexture &copy)
EggTexture & operator= (const EggTexture &copy)
virtual void write (ostream &out, int indent_level) const
bool is_equivalent_to (const EggTexture &other, int eq) const
bool sorts_less_than (const EggTexture &other, int eq) const
bool has_alpha_channel (int num_components) const
INLINE void set_format (Format format)
INLINE Format get_format () const
INLINE void set_wrap_mode (WrapMode mode)
INLINE WrapMode get_wrap_mode () const
INLINE void set_wrap_u (WrapMode mode)
INLINE WrapMode get_wrap_u () const
INLINE WrapMode determine_wrap_u () const
INLINE void set_wrap_v (WrapMode mode)
INLINE WrapMode get_wrap_v () const
INLINE WrapMode determine_wrap_v () const
INLINE void set_minfilter (FilterType type)
INLINE FilterType get_minfilter () const
INLINE void set_magfilter (FilterType type)
INLINE FilterType get_magfilter () const
INLINE void set_anisotropic_degree (int anisotropic_degree)
INLINE void clear_anisotropic_degree ()
INLINE bool has_anisotropic_degree () const
INLINE int get_anisotropic_degree () const
INLINE void set_env_type (EnvType type)
INLINE EnvType get_env_type () const
INLINE void set_transform (const LMatrix3d &transform)
INLINE void clear_transform ()
INLINE bool has_transform () const
INLINE const LMatrix3d & get_transform () const
INLINE bool transform_is_identity () const
INLINE void set_alpha_filename (const Filename &filename)
INLINE void clear_alpha_filename ()
INLINE bool has_alpha_filename () const
INLINE const Filename & get_alpha_filename () const
INLINE void set_alpha_fullpath (const Filename &fullpath)
INLINE const Filename & get_alpha_fullpath () const
INLINE void set_alpha_file_channel (int alpha_file_channel)
INLINE void clear_alpha_file_channel ()
INLINE bool has_alpha_file_channel () const
INLINE int get_alpha_file_channel () const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

Format string_format (const string &string)
WrapMode string_wrap_mode (const string &string)
FilterType string_filter_type (const string &string)
EnvType string_env_type (const string &string)
TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual bool egg_start_parse_body ()

Private Types

enum  Flags { F_has_transform = 0x0001, F_has_alpha_filename = 0x0002, F_has_anisotropic_degree = 0x0004, F_has_alpha_file_channel = 0x0008 }

Private Attributes

Format _format
WrapMode _wrap_mode
WrapMode _wrap_u
WrapMode _wrap_v
FilterType _minfilter
FilterType _magfilter
int _anisotropic_degree
EnvType _env_type
int _flags
LMatrix3d _transform
Filename _alpha_filename
Filename _alpha_fullpath
int _alpha_file_channel

Static Private Attributes

TypeHandle _type_handle

Member Enumeration Documentation

enum EggTexture::EnvType
 

Enumeration values:
ET_unspecified 
ET_modulate 
ET_decal 

Definition at line 85 of file eggTexture.h.

enum EggTexture::Equivalence
 

Enumeration values:
E_basename 
E_extension 
E_dirname 
E_complete_filename 
E_transform 
E_attributes 
E_tref_name 

Definition at line 43 of file eggTexture.h.

enum EggTexture::FilterType
 

Enumeration values:
FT_unspecified 
FT_nearest 
FT_linear 
FT_nearest_mipmap_nearest 
FT_linear_mipmap_nearest 
FT_nearest_mipmap_linear 
FT_linear_mipmap_linear 

Definition at line 68 of file eggTexture.h.

enum EggTexture::Flags [private]
 

Enumeration values:
F_has_transform 
F_has_alpha_filename 
F_has_anisotropic_degree 
F_has_alpha_file_channel 

Definition at line 145 of file eggTexture.h.

enum EggTexture::Format
 

Enumeration values:
F_unspecified 
F_rgba 
F_rgbm 
F_rgba12 
F_rgba8 
F_rgba4 
F_rgba5 
F_rgb 
F_rgb12 
F_rgb8 
F_rgb5 
F_rgb332 
F_red 
F_green 
F_blue 
F_alpha 
F_luminance 
F_luminance_alpha 
F_luminance_alphamask 

Definition at line 58 of file eggTexture.h.

enum EggTexture::WrapMode
 

Enumeration values:
WM_unspecified 
WM_repeat 
WM_clamp 

Definition at line 65 of file eggTexture.h.


Constructor & Destructor Documentation

EggTexture::EggTexture const string &  tref_name,
const string &  filename
 

Definition at line 35 of file eggTexture.cxx.

References _alpha_file_channel, _anisotropic_degree, _env_type, _flags, _format, _magfilter, _minfilter, _transform, _wrap_mode, _wrap_u, _wrap_v, ET_unspecified, F_unspecified, FT_unspecified, and WM_unspecified.

EggTexture::EggTexture const EggTexture &  copy  ) 
 

Definition at line 57 of file eggTexture.cxx.


Member Function Documentation

INLINE void EggTexture::clear_alpha_file_channel  ) 
 

INLINE void EggTexture::clear_alpha_filename  ) 
 

INLINE void EggTexture::clear_anisotropic_degree  ) 
 

INLINE void EggTexture::clear_transform  ) 
 

Referenced by EggPrimitive::r_apply_texmats().

INLINE WrapMode EggTexture::determine_wrap_u  )  const
 

Referenced by EggLoader::apply_texture_attributes().

INLINE WrapMode EggTexture::determine_wrap_v  )  const
 

Referenced by EggLoader::apply_texture_attributes().

bool EggTexture::egg_start_parse_body  )  [protected, virtual]
 

Reimplemented from EggNode.

Definition at line 537 of file eggTexture.cxx.

References egg_start_texture_body().

virtual TypeHandle EggTexture::force_init_type void   )  [inline, virtual]
 

Reimplemented from EggFilenameNode.

Definition at line 178 of file eggTexture.h.

References EggFilenameNode::get_class_type(), and EggFilenameNode::init_type().

INLINE int EggTexture::get_alpha_file_channel  )  const
 

Referenced by EggLoader::load_texture(), and write().

INLINE const Filename& EggTexture::get_alpha_filename  )  const
 

Referenced by EggLoader::load_texture(), and write().

INLINE const Filename& EggTexture::get_alpha_fullpath  )  const
 

Referenced by EggLoader::load_texture().

INLINE int EggTexture::get_anisotropic_degree  )  const
 

Referenced by EggLoader::apply_texture_attributes(), and write().

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

Reimplemented from EggFilenameNode.

Definition at line 165 of file eggTexture.h.

Referenced by EggGroupNode::find_textures(), EggPoolUniquifier::get_category(), and EggGroupNode::resolve_filenames().

INLINE EnvType EggTexture::get_env_type  )  const
 

Referenced by CPT(), and write().

INLINE Format EggTexture::get_format  )  const
 

Referenced by EggLoader::apply_texture_attributes(), EggLoader::load_texture(), and write().

INLINE FilterType EggTexture::get_magfilter  )  const
 

Referenced by EggLoader::apply_texture_attributes(), and write().

INLINE FilterType EggTexture::get_minfilter  )  const
 

Referenced by EggLoader::apply_texture_attributes(), and write().

INLINE const LMatrix3d& EggTexture::get_transform  )  const
 

Referenced by EggLoader::make_indexed_primitive(), and EggLoader::make_nonindexed_primitive().

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

Reimplemented from EggFilenameNode.

Definition at line 175 of file eggTexture.h.

References EggFilenameNode::get_class_type().

INLINE WrapMode EggTexture::get_wrap_mode  )  const
 

Referenced by write().

INLINE WrapMode EggTexture::get_wrap_u  )  const
 

Referenced by write().

INLINE WrapMode EggTexture::get_wrap_v  )  const
 

Referenced by write().

bool EggTexture::has_alpha_channel int  num_components  )  const
 

Definition at line 359 of file eggTexture.cxx.

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

INLINE bool EggTexture::has_alpha_file_channel  )  const
 

Referenced by write().

INLINE bool EggTexture::has_alpha_filename  )  const
 

Referenced by EggLoader::load_texture(), and write().

INLINE bool EggTexture::has_anisotropic_degree  )  const
 

Referenced by EggLoader::apply_texture_attributes(), and write().

INLINE bool EggTexture::has_transform  )  const
 

Referenced by is_equivalent_to(), EggLoader::make_indexed_primitive(), EggLoader::make_nonindexed_primitive(), sorts_less_than(), and write().

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

Reimplemented from EggFilenameNode.

Definition at line 168 of file eggTexture.h.

References EggRenderMode::get_class_type(), EggFilenameNode::get_class_type(), EggRenderMode::init_type(), EggFilenameNode::init_type(), and register_type().

Referenced by init_libegg().

bool EggTexture::is_equivalent_to const EggTexture &  other,
int  eq
const
 

Definition at line 197 of file eggTexture.cxx.

References _env_type, _format, _magfilter, _minfilter, _transform, _wrap_mode, _wrap_u, _wrap_v, a, b, E_attributes, E_basename, E_complete_filename, E_dirname, E_extension, E_transform, E_tref_name, EggFilenameNode::get_filename(), Namable::get_name(), has_transform(), EggRenderMode::operator!=(), and transform_is_identity().

Referenced by EggTextureCollection::create_unique_texture().

EggTexture & EggTexture::operator= const EggTexture &  copy  ) 
 

Definition at line 67 of file eggTexture.cxx.

References _alpha_file_channel, _alpha_filename, _alpha_fullpath, _anisotropic_degree, _env_type, _flags, _format, _magfilter, _minfilter, _transform, _wrap_mode, _wrap_u, _wrap_v, EggRenderMode::operator=(), and EggFilenameNode::operator=().

INLINE void EggTexture::set_alpha_file_channel int  alpha_file_channel  ) 
 

INLINE void EggTexture::set_alpha_filename const Filename &  filename  ) 
 

INLINE void EggTexture::set_alpha_fullpath const Filename &  fullpath  ) 
 

INLINE void EggTexture::set_anisotropic_degree int  anisotropic_degree  ) 
 

INLINE void EggTexture::set_env_type EnvType  type  ) 
 

INLINE void EggTexture::set_format Format  format  ) 
 

INLINE void EggTexture::set_magfilter FilterType  type  ) 
 

INLINE void EggTexture::set_minfilter FilterType  type  ) 
 

INLINE void EggTexture::set_transform const LMatrix3d &  transform  ) 
 

INLINE void EggTexture::set_wrap_mode WrapMode  mode  ) 
 

INLINE void EggTexture::set_wrap_u WrapMode  mode  ) 
 

INLINE void EggTexture::set_wrap_v WrapMode  mode  ) 
 

bool EggTexture::sorts_less_than const EggTexture &  other,
int  eq
const
 

Definition at line 269 of file eggTexture.cxx.

References _anisotropic_degree, _env_type, _format, _magfilter, _minfilter, _transform, _wrap_mode, _wrap_u, _wrap_v, a, b, E_attributes, E_basename, E_complete_filename, E_dirname, E_extension, E_transform, E_tref_name, EggFilenameNode::get_filename(), Namable::get_name(), has_transform(), EggRenderMode::operator!=(), EggRenderMode::operator<(), and transform_is_identity().

Referenced by EggPolysetMaker::sorts_less().

EggTexture::EnvType EggTexture::string_env_type const string &  string  )  [static]
 

Definition at line 517 of file eggTexture.cxx.

References cmp_nocase_uh(), ET_decal, ET_modulate, and ET_unspecified.

EggTexture::FilterType EggTexture::string_filter_type const string &  string  )  [static]
 

Definition at line 471 of file eggTexture.cxx.

References cmp_nocase_uh(), FT_linear, FT_linear_mipmap_linear, FT_linear_mipmap_nearest, FT_nearest, FT_nearest_mipmap_linear, FT_nearest_mipmap_nearest, and FT_unspecified.

EggTexture::Format EggTexture::string_format const string &  string  )  [static]
 

Definition at line 402 of file eggTexture.cxx.

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

EggTexture::WrapMode EggTexture::string_wrap_mode const string &  string  )  [static]
 

Definition at line 453 of file eggTexture.cxx.

References cmp_nocase_uh(), WM_clamp, WM_repeat, and WM_unspecified.

INLINE bool EggTexture::transform_is_identity  )  const
 

Referenced by is_equivalent_to(), and sorts_less_than().

void EggTexture::write ostream &  out,
int  indent_level
const [virtual]
 

Reimplemented from EggRenderMode.

Definition at line 95 of file eggTexture.cxx.

References _transform, enquote_string(), ET_unspecified, F_unspecified, FT_unspecified, get_alpha_file_channel(), get_alpha_filename(), get_anisotropic_degree(), get_env_type(), EggFilenameNode::get_filename(), get_format(), get_magfilter(), get_minfilter(), get_wrap_mode(), get_wrap_u(), get_wrap_v(), has_alpha_file_channel(), has_alpha_filename(), has_anisotropic_degree(), has_transform(), indent(), WM_unspecified, EggRenderMode::write(), EggNamedObject::write_header(), and write_transform().


Member Data Documentation

int EggTexture::_alpha_file_channel [private]
 

Definition at line 161 of file eggTexture.h.

Referenced by EggTexture(), and operator=().

Filename EggTexture::_alpha_filename [private]
 

Definition at line 159 of file eggTexture.h.

Referenced by operator=().

Filename EggTexture::_alpha_fullpath [private]
 

Definition at line 160 of file eggTexture.h.

Referenced by operator=().

int EggTexture::_anisotropic_degree [private]
 

Definition at line 155 of file eggTexture.h.

Referenced by EggTexture(), operator=(), and sorts_less_than().

EnvType EggTexture::_env_type [private]
 

Definition at line 156 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().

int EggTexture::_flags [private]
 

Definition at line 157 of file eggTexture.h.

Referenced by EggTexture(), and operator=().

Format EggTexture::_format [private]
 

Definition at line 152 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().

FilterType EggTexture::_magfilter [private]
 

Definition at line 154 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().

FilterType EggTexture::_minfilter [private]
 

Definition at line 154 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().

LMatrix3d EggTexture::_transform [private]
 

Definition at line 158 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), sorts_less_than(), and write().

TypeHandle EggTexture::_type_handle [static, private]
 

Reimplemented from EggFilenameNode.

Definition at line 26 of file eggTexture.cxx.

WrapMode EggTexture::_wrap_mode [private]
 

Definition at line 153 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().

WrapMode EggTexture::_wrap_u [private]
 

Definition at line 153 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().

WrapMode EggTexture::_wrap_v [private]
 

Definition at line 153 of file eggTexture.h.

Referenced by EggTexture(), is_equivalent_to(), operator=(), and sorts_less_than().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:12:12 2003 for Panda by doxygen1.3