17 #if !defined(OPENNURBS_MATERIAL_INC_) 18 #define OPENNURBS_MATERIAL_INC_ 57 static int CompareNameAndIds(
65 static int CompareAppearance(
70 static int CompareColorAttributes(
75 static int CompareReflectionAttributes(
80 static int CompareTextureAttributes(
107 static double FresnelReflectionCoefficient(
108 double fresnel_index_of_refraction,
120 void Internal_CopyFrom(
127 bool IsValid( class
ON_TextLog* text_log =
nullptr ) const override;
141 ON::object_type ObjectType() const override;
152 void SetDiffuse( ON_Color );
153 void SetEmission( ON_Color );
154 void SetSpecular( ON_Color );
157 double Shine() const;
158 void SetShine(
double );
161 double Transparency() const;
162 void SetTransparency(
double );
165 double Reflectivity() const;
166 void SetReflectivity(
double );
169 ON_UUID MaterialPlugInId() const;
170 void SetMaterialPlugInId(
185 ON_UUID RdkMaterialInstanceId() const;
198 void SetRdkMaterialInstanceId(
199 ON_UUID rdk_material_instance_id
202 bool RdkMaterialInstanceIdIsNotNil() const;
203 bool RdkMaterialInstanceIdIsNil() const;
212 bool Shareable() const;
230 bool DisableLighting() const;
232 void SetDisableLighting(
233 bool bDisableLighting
239 bool UseDiffuseTextureAlphaForObjectTransparencyTexture() const;
240 void SetUseDiffuseTextureAlphaForObjectTransparencyTexture(
241 bool bUseDiffuseTextureAlphaForObjectTransparencyTexture
256 bool FresnelReflections() const;
257 void SetFresnelReflections(
258 bool bFresnelReflections
267 ON_UUID m_rdk_material_instance_id = ON_nil_uuid;
270 ON_Color m_ambient = ON_Color::Black;
271 ON_Color m_diffuse = ON_Color::Gray126;
272 ON_Color m_emission = ON_Color::Black;
273 ON_Color m_specular = ON_Color::White;
274 ON_Color m_reflection = ON_Color::White;
275 ON_Color m_transparent = ON_Color::White;
278 bool m_bShareable = false;
281 bool m_bDisableLighting = false;
284 bool m_bUseDiffuseTextureAlphaForObjectTransparencyTexture = false;
287 bool m_bFresnelReflections = false;
290 unsigned int m_reserved1 = 0;
293 double m_reflectivity = 0.0;
294 double m_shine = 0.0;
295 double m_transparency = 0.0;
305 double m_reflection_glossiness = 0.0;
315 double m_refraction_glossiness = 0.0;
325 double m_index_of_refraction = 1.0;
343 double m_fresnel_index_of_refraction = 1.56;
363 double FresnelReflectionCoefficient(
427 const
wchar_t* filename,
466 const
wchar_t* filename,
481 const
wchar_t* filename,
508 ON_UUID m_plugin_id = ON_nil_uuid;
518 bool operator==(const
ON_Material&, const ON_Material&);
521 bool operator!=(const ON_Material&, const ON_Material&);
523 #if defined(ON_DLL_TEMPLATE) static const ON_Material Unset
Definition: opennurbs_material.h:32
Definition: opennurbs_material.h:25
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
static const double MaxShine
Definition: opennurbs_material.h:30
The ON_ModelComponent class is a base class for all components in a model and manages the index...
Definition: opennurbs_model_component.h:24
Definition: opennurbs_array.h:36
static const ON_Material Default
Definition: opennurbs_material.h:33
ON_Object array is used to store lists of classes that are derived from ON_Object. It differs from ON_ClassArray in that the virtual ON_Object::MemoryRelocate function is called when growing the dynamic array requires changing the location of the memory buffer used to store the elements in the array.
Definition: opennurbs_array.h:725
Definition: opennurbs_color.h:24
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
Definition: opennurbs_model_component.h:1622
Definition: opennurbs_texture.h:31
Definition: opennurbs_point.h:1152