imdl_material_definition.h File Reference
Description
Scene element Mdl_material_definition.
Code Example
imdl_material_definition.h
//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************
#ifndef MI_NEURAYLIB_IMDL_MATERIAL_DEFINITION_H
#define MI_NEURAYLIB_IMDL_MATERIAL_DEFINITION_H
#include <mi/neuraylib/iattachable.h>
#include <mi/neuraylib/iscene_element.h>
#include <mi/neuraylib/version.h>
namespace mi {
namespace neuraylib {
class IAttribute_container;
class IMdl_material_instance;
class IMdl_material_definition : public
mi::base::Interface_declare<0x839307d2,0xadcd,0x4580,0x84,0xfa,0x76,0x87,0x37,0xe6,0xea,0xd0,
neuraylib::IScene_element>
{
public:
virtual const char* get_module() const = 0;
virtual const char* get_name() const = 0;
virtual bool is_exported() const = 0;
virtual Uint32
get_parameter_count() const = 0;
virtual const char* get_parameter_name( Uint32 index) const = 0;
virtual Sint32
get_parameter_index( const char* name) const = 0;
virtual const char* get_parameter_type( Uint32 index) const = 0;
virtual const char* get_parameter_type( const char* name) const = 0;
virtual bool is_parameter_type_uniform( Uint32 index) const = 0;
virtual bool is_parameter_type_uniform( const char* name) const = 0;
virtual const char* get_argument_type( Uint32 index) const = 0;
virtual const char* get_argument_type( const char* name) const = 0;
virtual const IAttachable* get_default( Uint32 index) const = 0;
template<class T>
const T* get_default( Uint32 index) const
{
const IAttachable* ptr_idata = get_default( 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 const IAttachable* get_default( const char* name) const = 0;
template<class T>
const T* get_default( const char* name) const
{
const IAttachable* ptr_idata = get_default( 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 const IAttribute_container* get_annotations() const = 0;
virtual const IAttribute_container* get_parameter_annotations( Uint32 index) const = 0;
virtual const IAttribute_container* get_parameter_annotations( const char* name) const = 0;
virtual IMdl_material_instance* create_material_instance(
const IAttribute_container* arguments,
Sint32* errors = 0) const = 0;
virtual Sint32
create_preset(
const char* module_name,
const char* preset_name,
const IAttribute_container* defaults) const = 0;
};
// end group mi_neuray_materials
} // namespace neuraylib
#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::IAttribute_container;
using neuraylib::IMdl_material_definition;
using neuraylib::IMdl_material_instance;
using neuraylib::IScene_element;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
} // namespace mi
#endif // MI_NEURAYLIB_IMDL_MATERIAL_DEFINITION_H
Namespaces
- namespace
- Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
- namespace
- Namespace for the neuray API. More...
Classes
- class
- This interfaces represents a material definition. More...