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

XFileMaterial Class Reference

#include <xFileMaterial.h>

List of all members.

Public Member Functions

 XFileMaterial ()
 ~XFileMaterial ()
void set_from_egg (EggPrimitive *egg_prim)
void apply_to_egg (EggPrimitive *egg_prim, XFileToEggConverter *converter)
int compare_to (const XFileMaterial &other) const
bool has_material () const
bool has_texture () const
void make_material_data (Datagram &raw_data)
void make_texture_data (Datagram &raw_data)
bool read_material_data (const Datagram &raw_data)
bool read_texture_data (const Datagram &raw_data)

Private Attributes

Colorf _face_color
float _power
RGBColorf _specular_color
RGBColorf _emissive_color
Filename _texture
bool _has_material
bool _has_texture


Constructor & Destructor Documentation

XFileMaterial::XFileMaterial  ) 
 

Definition at line 35 of file xFileMaterial.cxx.

References _emissive_color, _face_color, _has_material, _has_texture, _power, and _specular_color.

XFileMaterial::~XFileMaterial  ) 
 

Definition at line 51 of file xFileMaterial.cxx.


Member Function Documentation

void XFileMaterial::apply_to_egg EggPrimitive egg_prim,
XFileToEggConverter converter
 

Definition at line 103 of file xFileMaterial.cxx.

References _emissive_color, _face_color, _power, _specular_color, _texture, Colorf, SomethingToEggConverter::convert_texture_path(), XFileToEggConverter::create_unique_material(), XFileToEggConverter::create_unique_texture(), EggAttributes::set_color(), EggMaterial::set_diff(), EggMaterial::set_emit(), EggPrimitive::set_material(), EggMaterial::set_shininess(), EggMaterial::set_spec(), EggPrimitive::set_texture(), texture, and zero.

Referenced by XFileMesh::create_polygons().

int XFileMaterial::compare_to const XFileMaterial &  other  )  const
 

Definition at line 141 of file xFileMaterial.cxx.

References _emissive_color, _face_color, _power, _specular_color, _texture, and Filename::c_str().

bool XFileMaterial::has_material  )  const
 

Definition at line 167 of file xFileMaterial.cxx.

References _has_material.

Referenced by XFileMesh::add_material().

bool XFileMaterial::has_texture  )  const
 

Definition at line 178 of file xFileMaterial.cxx.

References _has_texture.

Referenced by XFileMaker::finalize_mesh().

void XFileMaterial::make_material_data Datagram raw_data  ) 
 

Definition at line 189 of file xFileMaterial.cxx.

References _emissive_color, _face_color, _power, _specular_color, Datagram::add_float32(), and Datagram::clear().

Referenced by XFileMaker::finalize_mesh().

void XFileMaterial::make_texture_data Datagram raw_data  ) 
 

Definition at line 211 of file xFileMaterial.cxx.

References _texture, Datagram::add_int32(), Datagram::clear(), and Filename::to_os_specific().

Referenced by XFileMaker::finalize_mesh().

bool XFileMaterial::read_material_data const Datagram raw_data  ) 
 

Definition at line 249 of file xFileMaterial.cxx.

References _emissive_color, _face_color, _has_material, _power, _specular_color, DatagramIterator::get_float32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_material().

bool XFileMaterial::read_texture_data const Datagram raw_data  ) 
 

Definition at line 280 of file xFileMaterial.cxx.

References _has_texture, _texture, Filename::from_os_specific(), DatagramIterator::get_int32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_texture().

void XFileMaterial::set_from_egg EggPrimitive egg_prim  ) 
 

Definition at line 60 of file xFileMaterial.cxx.

References _emissive_color, _face_color, _has_material, _has_texture, _power, _specular_color, _texture, Colorf, EggAttributes::get_color(), EggMaterial::get_diff(), EggMaterial::get_emit(), EggFilenameNode::get_filename(), EggPrimitive::get_material(), EggMaterial::get_shininess(), EggMaterial::get_spec(), EggPrimitive::get_texture(), EggAttributes::has_color(), EggMaterial::has_diff(), EggMaterial::has_emit(), EggPrimitive::has_material(), EggMaterial::has_shininess(), EggMaterial::has_spec(), and EggPrimitive::has_texture().

Referenced by XFileMesh::add_material().


Member Data Documentation

RGBColorf XFileMaterial::_emissive_color [private]
 

Definition at line 58 of file xFileMaterial.h.

Referenced by apply_to_egg(), compare_to(), make_material_data(), read_material_data(), set_from_egg(), and XFileMaterial().

Colorf XFileMaterial::_face_color [private]
 

Definition at line 55 of file xFileMaterial.h.

Referenced by apply_to_egg(), compare_to(), make_material_data(), read_material_data(), set_from_egg(), and XFileMaterial().

bool XFileMaterial::_has_material [private]
 

Definition at line 61 of file xFileMaterial.h.

Referenced by has_material(), read_material_data(), set_from_egg(), and XFileMaterial().

bool XFileMaterial::_has_texture [private]
 

Definition at line 62 of file xFileMaterial.h.

Referenced by has_texture(), read_texture_data(), set_from_egg(), and XFileMaterial().

float XFileMaterial::_power [private]
 

Definition at line 56 of file xFileMaterial.h.

Referenced by apply_to_egg(), compare_to(), make_material_data(), read_material_data(), set_from_egg(), and XFileMaterial().

RGBColorf XFileMaterial::_specular_color [private]
 

Definition at line 57 of file xFileMaterial.h.

Referenced by apply_to_egg(), compare_to(), make_material_data(), read_material_data(), set_from_egg(), and XFileMaterial().

Filename XFileMaterial::_texture [private]
 

Definition at line 59 of file xFileMaterial.h.

Referenced by apply_to_egg(), compare_to(), make_texture_data(), read_texture_data(), and set_from_egg().


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