imdl_compiled_material.h File Reference
Description
Scene element Mdl_compiled_material.
Code Example
imdl_compiled_material.h
//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************
#ifndef MI_NEURAYLIB_IMDL_COMPILED_MATERIAL_H
#define MI_NEURAYLIB_IMDL_COMPILED_MATERIAL_H
#include <mi/neuraylib/iscene_element.h>
#include <mi/neuraylib/version.h>
namespace mi {
namespace neuraylib {
class IAttribute_container;
enum Material_slot {
SLOT_THIN_WALLED,
SLOT_SURFACE_SCATTERING,
SLOT_SURFACE_EMISSION_EDF_EMISSION,
SLOT_SURFACE_EMISSION_INTENSITY,
SLOT_BACKFACE_SCATTERING,
SLOT_BACKFACE_EMISSION_EDF_EMISSION,
SLOT_BACKFACE_EMISSION_INTENSITY,
SLOT_IOR,
SLOT_VOLUME_SCATTERING,
SLOT_VOLUME_ABSORPTION_COEFFICIENT,
SLOT_VOLUME_SCATTERING_COEFFICIENT,
SLOT_GEOMETRY_DISPLACEMENT,
SLOT_GEOMETRY_CUTOUT_OPACITY,
SLOT_GEOMETRY_NORMAL,
SLOT_FORCE_32_BIT = 0xffffffffU
};
mi_static_assert( sizeof( Material_slot) == sizeof( Uint32));
class IMdl_compiled_material : public
mi::base::Interface_declare<0xb6d884c1,0x1db5,0x49f9,0x88,0x1c,0xd2,0x79,0x96,0x96,0xd3,0xf4,
neuraylib::IScene_element>
{
public:
virtual const IData* get_field( const char* name) const = 0;
template<class T>
const T* get_field( const char* name) const
{
const IData* ptr_idata = get_field( name);
if ( !ptr_idata)
return 0;
const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
ptr_idata->release();
return ptr_T;
}
virtual Uint32
get_temporary_count() const = 0;
virtual const IData* get_temporary( Uint32 index) const = 0;
template<class T>
const T* get_temporary( Uint32 index) const
{
const IData* ptr_idata = get_temporary( index);
if ( !ptr_idata)
return 0;
const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
ptr_idata->release();
return ptr_T;
}
virtual Float32
get_mdl_meters_per_scene_unit() const = 0;
virtual bool depends_on_state_transform() const = 0;
virtual bool depends_on_state_object_id() const = 0;
virtual Uint32
get_parameter_count() const = 0;
virtual const char* get_parameter_name( Uint32 index) const = 0;
virtual const IData* get_argument( Uint32 index) const = 0;
template<class T>
const T* get_argument( Uint32 index) const
{
const IData* ptr_idata = get_argument( index);
if ( !ptr_idata)
return 0;
const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
ptr_idata->release();
return ptr_T;
}
virtual base::Uuid
get_hash() const = 0;
virtual base::Uuid
get_slot_hash( Material_slot slot) const = 0;
};
// end group mi_neuray_materials
} // namespace neuraylib
#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::IAttribute_container;
using neuraylib::IMdl_compiled_material;
using neuraylib::IScene_element;
using neuraylib::Material_slot;
using neuraylib::SLOT_BACKFACE_EMISSION_EDF_EMISSION;
using neuraylib::SLOT_BACKFACE_EMISSION_INTENSITY;
using neuraylib::SLOT_BACKFACE_SCATTERING;
using neuraylib::SLOT_FORCE_32_BIT;
using neuraylib::SLOT_GEOMETRY_CUTOUT_OPACITY;
using neuraylib::SLOT_GEOMETRY_DISPLACEMENT;
using neuraylib::SLOT_GEOMETRY_NORMAL;
using neuraylib::SLOT_IOR;
using neuraylib::SLOT_SURFACE_EMISSION_EDF_EMISSION;
using neuraylib::SLOT_SURFACE_EMISSION_INTENSITY;
using neuraylib::SLOT_SURFACE_SCATTERING;
using neuraylib::SLOT_THIN_WALLED;
using neuraylib::SLOT_VOLUME_ABSORPTION_COEFFICIENT;
using neuraylib::SLOT_VOLUME_SCATTERING;
using neuraylib::SLOT_VOLUME_SCATTERING_COEFFICIENT;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
} // namespace mi
#endif // MI_NEURAYLIB_IMDL_COMPILED_MATERIAL_H
Namespaces
- namespace
- Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
- namespace
- Namespace for the neuray API. More...
Classes
- class
- This interface represents a compiled material. More...
Enumerations
- enum {SLOT_THIN_WALLED, SLOT_SURFACE_SCATTERING, SLOT_SURFACE_EMISSION_EDF_EMISSION, SLOT_SURFACE_EMISSION_INTENSITY, SLOT_BACKFACE_SCATTERING, SLOT_BACKFACE_EMISSION_EDF_EMISSION, SLOT_BACKFACE_EMISSION_INTENSITY, SLOT_IOR, SLOT_VOLUME_SCATTERING, SLOT_VOLUME_ABSORPTION_COEFFICIENT, SLOT_VOLUME_SCATTERING_COEFFICIENT, SLOT_GEOMETRY_DISPLACEMENT, SLOT_GEOMETRY_CUTOUT_OPACITY, SLOT_GEOMETRY_NORMAL, SLOT_FORCE_32_BIT = 0xffffffffU }
- Material slots identify parts of a material. More...