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

EggMaterial Class Reference

#include <eggMaterial.h>

Inheritance diagram for EggMaterial:

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

Public Types

enum  Equivalence { E_attributes = 0x001, E_mref_name = 0x002 }

Public Member Functions

 EggMaterial (const string &mref_name)
 EggMaterial (const EggMaterial &copy)
virtual void write (ostream &out, int indent_level) const
bool is_equivalent_to (const EggMaterial &other, int eq) const
bool sorts_less_than (const EggMaterial &other, int eq) const
INLINE void set_diff (const Colorf &diff)
INLINE void clear_diff ()
INLINE bool has_diff () const
INLINE Colorf get_diff () const
INLINE void set_amb (const Colorf &amb)
INLINE void clear_amb ()
INLINE bool has_amb () const
INLINE Colorf get_amb () const
INLINE void set_emit (const Colorf &emit)
INLINE void clear_emit ()
INLINE bool has_emit () const
INLINE Colorf get_emit () const
INLINE void set_spec (const Colorf &spec)
INLINE void clear_spec ()
INLINE bool has_spec () const
INLINE Colorf get_spec () const
INLINE void set_shininess (double shininess)
INLINE void clear_shininess ()
INLINE bool has_shininess () const
INLINE double get_shininess () const
INLINE void set_local (bool local)
INLINE void clear_local ()
INLINE bool has_local () const
INLINE bool get_local () const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Private Types

enum  Flags {
  F_diff = 0x001, F_amb = 0x002, F_emit = 0x004, F_spec = 0x008,
  F_shininess = 0x010, F_local = 0x020
}

Private Attributes

Colorf _diff
Colorf _amb
Colorf _emit
Colorf _spec
double _shininess
bool _local
int _flags

Static Private Attributes

TypeHandle _type_handle

Member Enumeration Documentation

enum EggMaterial::Equivalence
 

Enumeration values:
E_attributes 
E_mref_name 

Definition at line 39 of file eggMaterial.h.

enum EggMaterial::Flags [private]
 

Enumeration values:
F_diff 
F_amb 
F_emit 
F_spec 
F_shininess 
F_local 

Definition at line 78 of file eggMaterial.h.


Constructor & Destructor Documentation

EggMaterial::EggMaterial const string &  mref_name  ) 
 

Definition at line 32 of file eggMaterial.cxx.

References _flags.

EggMaterial::EggMaterial const EggMaterial &  copy  ) 
 

Definition at line 44 of file eggMaterial.cxx.


Member Function Documentation

INLINE void EggMaterial::clear_amb  ) 
 

INLINE void EggMaterial::clear_diff  ) 
 

INLINE void EggMaterial::clear_emit  ) 
 

INLINE void EggMaterial::clear_local  ) 
 

INLINE void EggMaterial::clear_shininess  ) 
 

INLINE void EggMaterial::clear_spec  ) 
 

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

Reimplemented from EggNode.

Definition at line 108 of file eggMaterial.h.

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

INLINE Colorf EggMaterial::get_amb  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

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

Reimplemented from EggNode.

Definition at line 97 of file eggMaterial.h.

Referenced by EggGroupNode::find_materials(), and EggPoolUniquifier::get_category().

INLINE Colorf EggMaterial::get_diff  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE Colorf EggMaterial::get_emit  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE bool EggMaterial::get_local  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE double EggMaterial::get_shininess  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE Colorf EggMaterial::get_spec  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

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

Reimplemented from EggNode.

Definition at line 105 of file eggMaterial.h.

References EggNode::get_class_type().

INLINE bool EggMaterial::has_amb  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE bool EggMaterial::has_diff  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE bool EggMaterial::has_emit  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE bool EggMaterial::has_local  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE bool EggMaterial::has_shininess  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

INLINE bool EggMaterial::has_spec  )  const
 

Referenced by is_equivalent_to(), sorts_less_than(), and write().

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

Reimplemented from EggNode.

Definition at line 100 of file eggMaterial.h.

References EggNode::get_class_type(), EggNode::init_type(), and register_type().

Referenced by init_libegg().

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

Definition at line 151 of file eggMaterial.cxx.

References _flags, E_attributes, E_mref_name, get_amb(), get_diff(), get_emit(), get_local(), Namable::get_name(), get_shininess(), get_spec(), has_amb(), has_diff(), has_emit(), has_local(), has_shininess(), and has_spec().

Referenced by EggMaterialCollection::create_unique_material().

INLINE void EggMaterial::set_amb const Colorf amb  ) 
 

INLINE void EggMaterial::set_diff const Colorf diff  ) 
 

INLINE void EggMaterial::set_emit const Colorf emit  ) 
 

INLINE void EggMaterial::set_local bool  local  ) 
 

INLINE void EggMaterial::set_shininess double  shininess  ) 
 

INLINE void EggMaterial::set_spec const Colorf spec  ) 
 

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

Definition at line 183 of file eggMaterial.cxx.

References _flags, E_attributes, E_mref_name, get_amb(), get_diff(), get_emit(), get_local(), Namable::get_name(), get_shininess(), get_spec(), has_amb(), has_diff(), has_emit(), has_local(), has_shininess(), and has_spec().

Referenced by EggPolysetMaker::sorts_less().

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

Implements EggNode.

Definition at line 64 of file eggMaterial.cxx.

References get_amb(), get_diff(), get_emit(), get_local(), get_shininess(), get_spec(), has_amb(), has_diff(), has_emit(), has_local(), has_shininess(), has_spec(), indent(), and EggNamedObject::write_header().


Member Data Documentation

Colorf EggMaterial::_amb [private]
 

Definition at line 88 of file eggMaterial.h.

Colorf EggMaterial::_diff [private]
 

Definition at line 87 of file eggMaterial.h.

Colorf EggMaterial::_emit [private]
 

Definition at line 89 of file eggMaterial.h.

int EggMaterial::_flags [private]
 

Definition at line 93 of file eggMaterial.h.

Referenced by EggMaterial(), is_equivalent_to(), and sorts_less_than().

bool EggMaterial::_local [private]
 

Definition at line 92 of file eggMaterial.h.

double EggMaterial::_shininess [private]
 

Definition at line 91 of file eggMaterial.h.

Colorf EggMaterial::_spec [private]
 

Definition at line 90 of file eggMaterial.h.

TypeHandle EggMaterial::_type_handle [static, private]
 

Reimplemented from EggNode.

Definition at line 23 of file eggMaterial.cxx.


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