Material data structure. More...
#include <Context.h>
Public Member Functions | |
| Material () | |
| Default constructor. | |
| Material (uint ID, const std::string &lbl, const RGBAcolor &c, const std::string &tex, bool override, uint twosided=1) | |
| Constructor with parameters. | |
| template<typename T > | |
| void | setMaterialData (const char *label, const T &data) |
| Add scalar data value associated with this material. | |
| template<typename T > | |
| void | setMaterialData (const char *label, const std::vector< T > &data) |
| Add vector data associated with this material. | |
| template<typename T > | |
| void | getMaterialData (const char *label, T &data) const |
| Get scalar data associated with this material. | |
| template<typename T > | |
| void | getMaterialData (const char *label, std::vector< T > &data) const |
| Get vector data associated with this material. | |
| bool | doesMaterialDataExist (const char *label) const |
| Check if material data 'label' exists. | |
| HeliosDataType | getMaterialDataType (const char *label) const |
| Get the Helios data type of material data. | |
| uint | getMaterialDataSize (const char *label) const |
| Get the size/length of material data. | |
| void | clearMaterialData (const char *label) |
| Clear the material data for this material. | |
| std::vector< std::string > | listMaterialData () const |
| Return labels for all material data for this particular material. | |
Data Fields | |
| uint | materialID |
| Unique identifier for this material (internal use) | |
| std::string | label |
| String label for this material (user-facing identifier) | |
| RGBAcolor | color |
| Diffuse RGBA color of the material. | |
| std::string | texture_file |
| Path to texture image file (empty string if no texture) | |
| bool | texture_color_overridden |
| Flag indicating whether texture color should be overridden with the color value. | |
| uint | twosided_flag |
| Flag indicating one-sided (0) or two-sided (1) radiation absorption/emission. | |
| uint | reference_count |
| Reference count - number of primitives currently using this material. | |
| std::map< std::string, HeliosDataType > | material_data_types |
| Material primitive data storage - type registry. | |
| std::map< std::string, std::vector< int > > | material_data_int |
| Material primitive data storage - integer data. | |
| std::map< std::string, std::vector< uint > > | material_data_uint |
| Material primitive data storage - unsigned integer data. | |
| std::map< std::string, std::vector< float > > | material_data_float |
| Material primitive data storage - float data. | |
| std::map< std::string, std::vector< double > > | material_data_double |
| Material primitive data storage - double data. | |
| std::map< std::string, std::vector< vec2 > > | material_data_vec2 |
| Material primitive data storage - vec2 data. | |
| std::map< std::string, std::vector< vec3 > > | material_data_vec3 |
| Material primitive data storage - vec3 data. | |
| std::map< std::string, std::vector< vec4 > > | material_data_vec4 |
| Material primitive data storage - vec4 data. | |
| std::map< std::string, std::vector< int2 > > | material_data_int2 |
| Material primitive data storage - int2 data. | |
| std::map< std::string, std::vector< int3 > > | material_data_int3 |
| Material primitive data storage - int3 data. | |
| std::map< std::string, std::vector< int4 > > | material_data_int4 |
| Material primitive data storage - int4 data. | |
| std::map< std::string, std::vector< std::string > > | material_data_string |
| Material primitive data storage - string data. | |
| std::map< std::string, std::vector< bool > > | material_data_bool |
| Material primitive data storage - bool data. | |
Material data structure.
Structure to store surface rendering properties that can be shared across multiple primitives.
Materials store visualization properties such as color and texture information. Multiple primitives can reference the same material to reduce memory usage when many primitives share the same appearance properties.
Each material is assigned a unique string label that users use to reference the material. Internally, materials also have a numeric ID for efficient primitive storage.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| RGBAcolor helios::Material::color |
| std::string helios::Material::label |
| std::map<std::string, std::vector<bool> > helios::Material::material_data_bool |
| std::map<std::string, std::vector<double> > helios::Material::material_data_double |
| std::map<std::string, std::vector<float> > helios::Material::material_data_float |
| std::map<std::string, std::vector<int> > helios::Material::material_data_int |
| std::map<std::string, std::vector<int2> > helios::Material::material_data_int2 |
| std::map<std::string, std::vector<int3> > helios::Material::material_data_int3 |
| std::map<std::string, std::vector<int4> > helios::Material::material_data_int4 |
| std::map<std::string, std::vector<std::string> > helios::Material::material_data_string |
| std::map<std::string, HeliosDataType> helios::Material::material_data_types |
| std::map<std::string, std::vector<uint> > helios::Material::material_data_uint |
| std::map<std::string, std::vector<vec2> > helios::Material::material_data_vec2 |
| std::map<std::string, std::vector<vec3> > helios::Material::material_data_vec3 |
| std::map<std::string, std::vector<vec4> > helios::Material::material_data_vec4 |
| uint helios::Material::materialID |
|
mutable |
| bool helios::Material::texture_color_overridden |
| std::string helios::Material::texture_file |
| uint helios::Material::twosided_flag |