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 | Protected Member Functions | List of all members
ModuleTextureSpatial Class Reference

This class implements a Spatial Texture object in Clarisse. More...

Inheritance diagram for ModuleTextureSpatial:
ModuleTexture ModuleTextureOperator ModuleGlObject ModuleProjectItem ModuleObject OfModule ResourceUser EventObject CoreCustomData CoreBaseObject CoreBaseType ModuleTextureOsl

Public Types

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 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 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.
 

Protected Member Functions

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

Additional Inherited Members

- Protected Types inherited from ModuleTexture
typedef bool(* ApplyTextureMatrix )(OfObject &, const CtxEval &, CtxShader &, const ModuleTexture &, TextureOutput &output)
 
- Protected Attributes inherited from ModuleTexture
ApplyTextureMatrix m_apply_texture_matrix
 

Detailed Description

This class implements a Spatial Texture object in Clarisse.

This class implements an OSL Texture object in Clarisse.

Member Function Documentation

const Axis& ModuleTextureSpatial::get_axis ( ) const
inline

Returns the projection axis.

See Also
Axis
const ObjectSpace& ModuleTextureSpatial::get_object_space ( ) const
inline

Returns the object space.

See Also
ObjectSpace
const Projection& ModuleTextureSpatial::get_projection_type ( ) const
inline

Returns the projection type.

See Also
Projection