Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
ModuleGroup Class Reference
Inheritance diagram for ModuleGroup:
ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Types

enum  GroupUpdateMode {
  GROUP_UPDATE_MODE_AUTOMATIC = 0,
  GROUP_UPDATE_MODE_MANUAL = 1
}
 
enum  GroupUpdateBehavior {
  GROUP_UPDATE_BEHAVIOR_ALL = 0,
  GROUP_UPDATE_BEHAVIOR_INCLUSION_ONLY = 1,
  GROUP_UPDATE_BEHAVIOR_RULE_ONLY = 2,
  GROUP_UPDATE_BEHAVIOR_NONE = 3
}
 
typedef GasObject *(* CreateGasCallback )(OfObject &)
 
typedef void(* DestroyGasCallback )(OfObject &, GasObject *)
 
typedef void(* GetSceneObjectInfoCallback )(OfObject &, SceneObjectInfo &info)
 

Public Member Functions

void get_objects (CoreArray< OfObject * > &objects) const
 Get the list of group objects "as is", does not update it if group is dirty.
 
void get_objects (CoreArray< OfObjectHandle > &objects, const OfContext *working_context=0) const
 
void get_updated_objects (CoreArray< OfObject * > &objects)
 Get the list of group objects after having updated it if it was necessary.
 
void get_updated_objects (CoreArray< OfObjectHandle > &objects, const OfContext *working_context=0)
 
const SceneObjectInfoget_scene_object_info () const
 
void set_inclusion_rule (const CoreString &rule)
 
void set_exclusion_rule (const CoreString &rule)
 
const CoreStringget_inclusion_rule () const
 
const CoreStringget_exclusion_rule () const
 
void set_result_filter (const CoreString &rule)
 
const CoreVector< const
OfClass * > & 
get_filter_classes () const
 get filter classses
 
void get_filter_class_names (const CoreVector< const OfClass * > &classes, CoreVector< CoreString > &class_names) const
 get the names of the class filter. This is not the raw value but only the existing classes.
 
void add_filter (const CoreString &filter)
 add a class filter
 
void set_filter (const CoreBasicArray< CoreString > &filter, bool is_exclusion_filter=false)
 set a list of filters for the group.
 
void set_filter (const CoreString &filter)
 Deprecated. Add a filter to the group. Compatibility when groups only accepted one filter. Use add_filter instead.
 
void set_search_paths (ModuleSearchPath *search_path)
 Set search paths.
 
void set_input_context (OfContext *ctx)
 Set the input context, limiting the objects the group can work with to those contained in the input context.
 
GasObjectget_gas (const bool &auto_create=true) const
 
SceneIntegrationDataget_integration_data (const ModuleIntegrator &integrator, const ModuleMaterial *override_material, const bool &auto_create=true) const
 
SceneIntegrationDataget_integration_data (const unsigned int &integrator_model_id) const
 
const GasObjectget_las (const ModuleIntegrator &integrator, const ModuleMaterial *override_material, const bool &auto_create=true) const
 
void destroy_gas ()
 
void destroy_integration_data ()
 
void destroy_integration_data (const unsigned int &integrator_model_id)
 
void dirty_motion_blur ()
 
void set_shading_layer (ModuleShadingLayer *shading_layer)
 
ModuleShadingLayerget_shading_layer () const
 
void get_shading_gas_ctx (const CtxEval &eval_ctx, const CtxShader &shader_ctx, CtxGas &gas_ctx) const
 
SceneIntegrationDataget_shading_integration_data (const ModuleIntegrator &integrator, const CtxEval &eval_ctx, const CtxShader &shader_ctx) const
 
const GasObjectget_shading_las (const ModuleIntegrator &integrator, const CtxEval &eval_ctx, const CtxShader &shader_ctx) const
 
template<class T >
CoreArray< T * > get_filtered_objects () const
 
template<class T >
void get_filtered_objects (CoreSet< T * > &set) const
 
template<class T >
void get_filtered_objects (CoreSet< OfObject * > &set)
 
template<class T >
void get_filtered_objects (CoreArray< OfObjectHandle > &objects, const OfContext *working_context=0)
 
void set_group_update_behavior (const GroupUpdateBehavior &bh)
 
GroupUpdateBehavior get_group_update_behavior () const
 
GroupUpdateMode get_update_mode () const
 
void set_update_mode (const GroupUpdateMode &update_mode)
 
virtual size_t get_memory_size () const override
 
void get_shading_gas_ctx (ModuleShadingLayer *shading_layer, CtxGas &ctx)
 
SceneIntegrationDataget_shading_integration_data (const ModuleIntegrator &integrator, const ModuleMaterial *override_material, ModuleShadingLayer *shading_layer)
 
void clear_shading_tables (ModuleShadingLayer *shading_layer)
 
void clear_shading_gas (ModuleShadingLayer *shading_layer)
 
void clear_shading_integration_data (const unsigned int &integrator_model_id, ModuleShadingLayer *shading_layer)
 
void clear_content ()
 Clear all group items and rules.
 
const bool & get_is_dirty () const
 Get if the group is dirty. This does not dictate the group content update, for this use check_update() to know if the group must be rebuilt now.
 
void set_is_dirty (const bool &value=true) const
 
void force_update_references ()
 Force group to update its reference list from its input and output information. This process is usualy done automaticaly on the main loop when a modifications happent, but in some cases you may want it do be done instantly. Will have no effect is group is not dirty!
 
bool has_rules () const
 Returns true if the group has an exclusion or inclusion rule (or both, obviously) currently set.
 
void get_inclusion_objects (CoreVector< OfObject * > &included) const
 
void get_inclusion_objects (CoreArray< OfObjectHandle > &included) const
 
void get_inclusion_rules (CoreVector< CoreString > &rules) const
 
void get_exclusion_objects (CoreVector< OfObject * > &excluded) const
 
void get_exclusion_objects (CoreArray< OfObjectHandle > &excluded) const
 
void get_exclusion_rules (CoreVector< CoreString > &rules) const
 
void set_inclusion_objects (const CoreBasicArray< OfObject * > &included)
 
void set_exclusion_objects (const CoreBasicArray< OfObject * > &excluded)
 
void set_inclusion_objects (const CoreBasicArray< ModuleObject * > &included)
 
void set_exclusion_objects (const CoreBasicArray< ModuleObject * > &excluded)
 
void add_inclusion_object (OfObject *obj)
 
void add_inclusion_objects (const CoreBasicArray< OfObject * > &included)
 
void add_inclusion_objects (const CoreBasicArray< ModuleObject * > &included)
 
void add_exclusion_object (OfObject *obj)
 
void add_exclusion_objects (const CoreBasicArray< OfObject * > &included)
 
void add_exclusion_objects (const CoreBasicArray< ModuleObject * > &included)
 
OfContextget_input_context () const
 
void get_result_filter (CoreVector< CoreString > &rules) const
 
MatteTableget_matte_table (const ModuleLayer3d *layer3d)
 Return a pointer to the matte table associated to the given layer, and create and fill it if necessary.
 
MatteTableget_matte_table (const ModuleRenderScene *render_scene)
 Return a pointer to the matte table associated to the given render scene, and create and fill it if necessary.
 
void clear_matte_table (const void *layer)
 Clear the matte table associated to a given layer or render scene.
 
bool build_dynamic_objects ()
 Deprecated. Force group content to be updated.
 
void set_objects (const CoreBasicArray< OfObject * > &objects)
 
void set_objects (const CoreBasicArray< ModuleObject * > &objects)
 
void set_group_rule (const CoreString &rule)
 
void set_group_exclusion_rule (const CoreString &rule)
 
CoreString get_group_rule () const
 
CoreString get_group_exclusion_rule () const
 

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
 
void set_group_objects (const CoreBasicArray< OfObject * > &new_group_content)
 
bool check_update () const
 return true if the group content should be updated, false otherwise
 

Friends

class SetGroupFilterCmd
 
class SetGroupModeCmd
 
class GroupManager
 

Additional Inherited Members

- Static Public Member Functions inherited from ModuleObject
static ResourceID declare_resource (const char *tag)
 
static ResourceID declare_resource (const CoreString &tag)
 
static bool declare_resource (ResourceID id, const char *tag)
 
static bool declare_resource (ResourceID id, const CoreString &tag)
 
static ResourceID get_resource_id (const char *tag)
 
static ResourceID get_resource_id (const CoreString &tag)
 
static const char * get_resource_tag (ResourceID id)
 
static void clear_unused_resources (SysThreadManager &thread_manager, const CoreBasicArray< OfObject * > &objects)
 
- Static Public Attributes inherited from ModuleObject
static constexpr unsigned int null_variation = 0
 Key of the null resource variation.
 

Member Function Documentation

void ModuleGroup::clear_content ( )

Clear all group items and rules.

The following group attributes are cleared:

  • inclusion_items
  • exclusion_items
  • inclusion_rule
  • exclusion_rule
void ModuleGroup::clear_matte_table ( const void *  layer)

Clear the matte table associated to a given layer or render scene.

Parameters
layerPointer to the layer or render scene to clear. When 0, all entries are cleared.
const bool& ModuleGroup::get_is_dirty ( ) const
inline

Get if the group is dirty. This does not dictate the group content update, for this use check_update() to know if the group must be rebuilt now.

See Also
check_update()
void ModuleGroup::set_filter ( const CoreBasicArray< CoreString > &  filter,
bool  is_exclusion_filter = false 
)

set a list of filters for the group.

Parameters
is_exclusion_filterif true, the specified filters are considered as exclusion filters, i.e : class of objects the group cannot reference
void ModuleGroup::set_input_context ( OfContext ctx)

Set the input context, limiting the objects the group can work with to those contained in the input context.

Note
if ctx value is nullptr, the input context will behave like if get_factory().get_root() has been set.