Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ModuleMaterialRaySwitch Class Reference

Base class of ray switch materials. This kind of material switch the material according to the ray type. More...

Inheritance diagram for ModuleMaterialRaySwitch:
ModuleMaterialSwitch ModuleMaterial ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Member Functions

ModuleMaterialswitch_material (GMathRay<>::Type ray_type) const
 
- Public Member Functions inherited from ModuleMaterialSwitch
ModuleMaterialswitch_material (const CtxEval &eval_ctx, const GeometryIntersection &intersection)
 switch_material Returned the switch material that will replace the current material in the intersection. If a null pointer is returned, the intersection is discarded. If it returns its own pointer, the shade basic of the material switch will be called.
 
- Public Member Functions inherited from ModuleMaterial
bool is_transparent (const unsigned int &ray_type) const
 Returns whether the material is transparent for the specified ray type or not.
 
const unsigned int & get_transparency_mask () const
 Returns the transparency mask defining for each type of ray whether the material is transparent or not.
 
const float & get_max_transparency () const
 Returns the maximum transparency value of the material.
 
const bool & is_exporting_aovs () const
 Returns whether the material exports aovs.
 
void build_aov_list () const
 update the aov list of nescessary
 
const CoreBasicArray< short > & get_aovs_groups () const
 Returns the list of AOVs that have been declared in the material. Includes AOV that are defined by AOV stores referenced by the material.
 
const CoreBasicArray< OfObject * > & get_aov_stores () const
 Returns the list of AOV store nodes that are referenced by the material.
 
void set_aov_list_dirty (const bool &dirtiness)
 Tells the material that is need to update its internal AOV list.
 
void set_is_transparent (const unsigned int &transparency_mask)
 Sets the transparency mask.
 
void set_is_transparent (const unsigned int &ray_type, const bool &is_transparent)
 Set the transparency for a given ray_type.
 
void set_max_transparency (const float &transparency)
 Set the maximum transparency value for the material.
 
void aov_store (const CtxEval &eval_ctx, CtxShader &ctx, CoreBasicArray< float > &aov_values, const GMathVec3f &opacity=GMathVec3f(1.0f)) const
 Store aov store values in the shader context.
 
void shade_basic (const CtxEval &eval_ctx, CtxShader &ctx, GMathVec3f *color, GMathVec3f *opacity=0, CoreBasicArray< float > aov_values=CoreBasicArray< float >(0, 0)) const
 Basic shading of the material that should work for any kind of integration model.
 
const Flags & get_flags () const
 Get flags that are enabled on the current material.
 
void enable_flags (const Flags &flags)
 Enable flags on the current material.
 
void disable_flags (const Flags &flags)
 Disable flags on the current material.
 
virtual void on_flags_changed (const OfAttr *changing_attr, const Flags &flags=0) const
 Must be called from on_attribute_change() when changing the flag of the current material.
 
void enable_emissive ()
 
void disable_emissive ()
 
bool is_emissive () const
 
void enable_composite ()
 
void disable_composite ()
 
bool is_composite () const
 

Static Public Member Functions

static bool is_ray_switch (const ModuleMaterial::Flags &flags)
 
static bool is_ray_switch (const ModuleMaterial &material)
 
- Static Public Member Functions inherited from ModuleMaterialSwitch
static bool is_switch (const ModuleMaterial::Flags &flags)
 
static bool is_switch (const ModuleMaterial &material)
 
- Static Public Member Functions inherited from ModuleMaterial
static const unsigned int & get_object_count (OfApp &application)
 Returns the peak number of ModuleMaterial objects that have been created in the current Clarisse instance.
 
static Flags reserve_flag ()
 Get a flag that is not used yet and reserve it.
 
static bool is_emissive (const ModuleMaterial::Flags &flags)
 
static bool is_emissive (const ModuleMaterial &material)
 
static const Flags & get_emissive_flag ()
 
static bool is_composite (const ModuleMaterial::Flags &flags)
 
static bool is_composite (const ModuleMaterial &material)
 
static const Flags & get_composite_flag ()
 

Protected Member Functions

virtual void module_constructor (OfObject &object) override
 
virtual void on_attribute_change (const OfAttr &attr, int &dirtiness, const int &dirtiness_flags) override
 

Additional Inherited Members

- Public Types inherited from ModuleMaterial
typedef unsigned long long Flags
 
- Static Public Attributes inherited from ModuleObject
static constexpr unsigned int null_variation = 0
 Key of the null resource variation.
 

Detailed Description

Base class of ray switch materials. This kind of material switch the material according to the ray type.