Clarisse 4.0 SP12 SDK  4.0.5.12.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ModuleTextureOsl Class Reference
Inheritance diagram for ModuleTextureOsl:
ModuleTextureSpatial ModuleTexture ModuleTextureOperator ModuleGlObject ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType

Public Types

enum  ModuleTextureOSLStatus {
  MODULE_TEXTURE_OSL_STATUS_REQUIRE_COMPILE = 0,
  MODULE_TEXTURE_OSL_STATUS_COMPILED = 1 << 0,
  MODULE_TEXTURE_OSL_STATUS_PARAM_DIRTY = 1 << 2
}
 
- Public Types inherited from ModuleTextureSpatial
enum  Projection {
  PROJECTION_PLANAR,
  PROJECTION_CYLINDRICAL,
  PROJECTION_SPHERICAL,
  PROJECTION_CUBIC,
  PROJECTION_CAMERA,
  PROJECTION_PARAMETRIC,
  PROJECTION_UV,
  PROJECTION_UV_PROPERTY,
  PROJECTION_ENVIRONMENT,
  PROJECTION_COUNT
}
 Defines the projections that are available for spatial textures.
 
enum  Axis {
  AXIS_X,
  AXIS_Y,
  AXIS_Z,
  AXIS_COUNT
}
 Defines axis that are available for spatial textures.
 
enum  ObjectSpace {
  SPACE_OBJECT_BASE = 0,
  SPACE_OBJECT_DEFORMED = 3,
  SPACE_INSTANCE = 1,
  SPACE_WORLD = 2
}
 Defines the space in which the object must be considered when computing the projection.
 

Public Member Functions

const CoreStringget_shader_filename ()
 
bool compile_shader (const CoreString &shader_filename, const bool &reimport_parameters, CoreVector< CoreString > include_paths)
 
void dirty_parameters ()
 
OSLShaderThreadData * thread_data_create ()
 
void thread_data_destroy (OSLShaderThreadData *thread_data)
 
bool pre_evaluate (const CtxEval &eval_ctx)
 
bool evaluate (const CtxEval &eval_ctx, const TextureOutput &output, CtxShader &ctx, CtxFragment &fragment, const CtxVolume &volume, const CtxMotionBlur &motion_blur, const CtxGas &gas_ctx, const GMathRay::Type &ray_type, OSLThreadExec thread_exec, OSLShaderThreadData *thread_data, GMathVec3f &output_color)
 
const int & get_status ()
 
- Public Member Functions inherited from ModuleTextureSpatial
const GMathMatrix4x4d & get_uv_matrix () const
 Returns the UV matrix.
 
const void eval_uv_matrix (const CtxEval &eval_ctx, CtxShader &ctx, GMathMatrix4x4d &m) const
 
const GMathMatrix4x4d & get_proj_matrix () const
 Returns the projection matrix.
 
bool is_2d () const
 Returns whether the projection space is 2D.
 
bool is_3d () const
 Returns whether the projection space is 3D.
 
const Projectionget_projection_type () const
 Returns the projection type.
 
const Axisget_axis () const
 Returns the projection axis.
 
const ObjectSpaceget_object_space () const
 Returns the object space.
 
ModuleUvSlotget_uv_slot () const
 Returns the texture UV solt.
 
ModuleCameraget_camera () const
 Returns the camera use when using a camera projection.
 
const ModuleGroupget_camera_occluders () const
 Returns the group of objects to use as camera occluders.
 
const bool & is_camera_occlusion () const
 Returns whether camera occlusion is activated or not.
 
const bool & is_sticky_projection () const
 Returns whether the camera projection sticks to a reference frame or not.
 
const double & get_reference_frame () const
 Returns the frame used for the camera projection.
 
const double & get_reference_time () const
 Returns the time used for the camera projection.
 
const double & get_aspect_ratio () const
 Returns the aspect ratio of the texture. The aspect ratio of a map is width / height. Procedural texture have almost always an aspect ratio of 1.
 
const double & get_inv_aspect_ratio () const
 Returns the inverse of the aspect ratio of the texture. The inverse aspect ratio of a map is height / width. Procedural texture have almost always an aspect ratio of 1.
 
void set_aspect_ratio (const double &ratio)
 Sets the aspect ratio of the texture.
 
- Public Member Functions inherited from ModuleTexture
void pre_evaluate (const CtxEval &eval_ctx, CtxShader &ctx) const
 This function calls the pre evaluation callback.
 
bool evaluate (const CtxEval &eval_ctx, CtxShader &ctx, TextureOutput &output) const
 This function evaluates the texture.
 
bool evaluate (const CtxEval &eval_ctx, CtxShader &ctx, TextureOutput &output, GMathVec4f &color_dx, GMathVec4f &color_dy) const
 This function evaluates the texture.
 
const unsigned int & get_object_id () const
 Returns the ID of the current instance.
 
const double get_opacity (const CtxEval &eval_ctx, CtxShader &ctx) const
 Returns the opacity of the texture.
 
const bool & is_inverted () const
 Returns whether the output values will be inverted or not.
 
bool set_master_input_value (const CoreString &attr_name) final
 
- Public Member Functions inherited from ModuleTextureOperator
OfAttrget_master_input_value () const override
 
OfAttrget_pass_through () const override
 
OfAttrget_master_input () const override
 
- Public Member Functions inherited from ModuleGlObject
virtual bool pre_paint_gl (GlUtilsCtx &ctx) const
 
virtual bool paint_gl (GlUtilsCtx &ctx) const
 
virtual bool destroy_gl_data (GlUtilsGlCtx &gl_ctx) const
 
virtual size_t get_memory_size () const
 

Static Public Member Functions

static OSLThreadExec thread_exec_create ()
 
static void thread_exec_destroy (OSLThreadExec thread_exec)
 
- Static Public Member Functions inherited from ModuleTextureSpatial
static const char * get_projection_name (const Projection &projection)
 Returns the name of the specified project.
 
static const char * get_axis_name (const Axis &axis)
 Returns the name of the specified project.
 
static unsigned int get_max_reference_frame_count ()
 
- Static Public Member Functions inherited from ModuleTexture
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.
 

Additional Inherited Members

- Protected Types inherited from ModuleTexture
typedef bool(* ApplyTextureMatrix )(OfObject &, const CtxEval &, CtxShader &, const ModuleTexture &, TextureOutput &output)
 
- Protected Member Functions inherited from ModuleTextureSpatial
virtual void module_constructor (OfObject &object)
 
virtual void module_destructor ()
 
virtual void on_attribute_change (const OfAttr &attr, int &dirtiness, const int &dirtiness_flags)
 
- Protected Attributes inherited from ModuleTexture
ApplyTextureMatrix m_apply_texture_matrix