#include <xFileMaterial.h>
Public Member Functions | |
XFileMaterial () | |
~XFileMaterial () | |
void | set_from_egg (EggPrimitive *egg_prim) |
Sets the structure up from the indicated egg data. | |
void | apply_to_egg (EggPrimitive *egg_prim, XFileToEggConverter *converter) |
Applies the properties in the material to the indicated egg primitive. | |
int | compare_to (const XFileMaterial &other) const |
bool | has_material () const |
Returns true if this material represents something meaningful, or false if the default material is sufficient. | |
bool | has_texture () const |
Returns true if this material includes a texture map, false otherwise. | |
void | make_material_data (Datagram &raw_data) |
Fills the datagram with the raw data for the DX Material template. | |
void | make_texture_data (Datagram &raw_data) |
Fills the datagram with the raw data for the DX TextureFilename template. | |
bool | read_material_data (const Datagram &raw_data) |
Fills the structure based on the raw data from the Material template. | |
bool | read_texture_data (const Datagram &raw_data) |
Fills the structure based on the raw data from the TextureFilename template. | |
Private Attributes | |
Colorf | _face_color |
float | _power |
RGBColorf | _specular_color |
RGBColorf | _emissive_color |
Filename | _texture |
bool | _has_material |
bool | _has_texture |
Definition at line 42 of file xFileMaterial.h.
|
Definition at line 40 of file xFileMaterial.cxx. |
|
Definition at line 58 of file xFileMaterial.cxx. References _face_color, _has_material, EggPrimitive::get_color(), EggPrimitive::has_color(), and EggPrimitive::has_material(). |
|
Applies the properties in the material to the indicated egg primitive.
Definition at line 117 of file xFileMaterial.cxx. |
|
Definition at line 157 of file xFileMaterial.cxx. |
|
Returns true if this material represents something meaningful, or false if the default material is sufficient.
Definition at line 188 of file xFileMaterial.cxx. References _emissive_color, _face_color, _power, _specular_color, Datagram::add_float32(), and Datagram::clear(). Referenced by XFileMesh::add_normal(). |
|
Returns true if this material includes a texture map, false otherwise.
Definition at line 203 of file xFileMaterial.cxx. References _texture, Datagram::clear(), and Filename::to_os_specific(). |
|
Fills the datagram with the raw data for the DX Material template.
Definition at line 218 of file xFileMaterial.cxx. |
|
Fills the datagram with the raw data for the DX TextureFilename template.
Definition at line 244 of file xFileMaterial.cxx. References _emissive_color, _face_color, _has_material, _power, _specular_color, DatagramIterator::get_float32(), DatagramIterator::get_remaining_size(), and nout. |
|
Fills the structure based on the raw data from the Material template.
Definition at line 286 of file xFileMaterial.cxx. References _has_texture, _texture, and nout. Referenced by XFileToEggConverter::convert_mesh_material_list(). |
|
Fills the structure based on the raw data from the TextureFilename template.
Definition at line 321 of file xFileMaterial.cxx. |
|
Sets the structure up from the indicated egg data.
Definition at line 70 of file xFileMaterial.cxx. References _face_color. Referenced by XFileMesh::add_normal(). |
|
Definition at line 65 of file xFileMaterial.h. Referenced by has_material(), and make_texture_data(). |
|
Definition at line 62 of file xFileMaterial.h. Referenced by has_material(), make_texture_data(), set_from_egg(), and ~XFileMaterial(). |
|
Definition at line 68 of file xFileMaterial.h. Referenced by make_texture_data(), and ~XFileMaterial(). |
|
Definition at line 69 of file xFileMaterial.h. Referenced by read_material_data(). |
|
Definition at line 63 of file xFileMaterial.h. Referenced by has_material(), and make_texture_data(). |
|
Definition at line 64 of file xFileMaterial.h. Referenced by has_material(), and make_texture_data(). |
|
Definition at line 66 of file xFileMaterial.h. Referenced by has_texture(), and read_material_data(). |