Clarisse 4.0 SP10 SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ModuleMaterial Class Reference

This class implements a Material object in Clarisse. More...

Inheritance diagram for ModuleMaterial:
ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType ModuleMaterialDefault ModuleMaterialLegacy ModuleMaterialPhysical ModuleMaterialSwitch ModuleMaterialLegacySurface

Public Types

typedef unsigned long long Flags

Public Member Functions

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
 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
 Store aov store values in the shader context.
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.

Static Public Member Functions

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.

Protected Member Functions

virtual void module_constructor (OfObject &object)
virtual void on_attribute_change (const OfAttr &attr, int &dirtiness, const int &dirtiness_flags)
virtual void build_aov_list (CoreSet< short > &aov_list) const
 This function will add aov_store AOV group to the list, extend it if the material needs to declare more AOVs.
const unsigned int & get_of_module_id () const

Detailed Description

This class implements a Material object in Clarisse.