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

Helper to evaluate an attribute value in a rendering context, according to texture/shading variable. More...

Public Member Functions

void set_attribute (const OfAttr &attr)
 Set the attribute to evaluate.
 
void set_attribute (const OfAttr *attr)
 Set the attribute to evaluate.
 
void resync_attribute ()
 Take attribute new properties into account.
 
const OfAttrget_attribute () const
 
const bool & is_bound_to_shading_variable () const
 
bool is_textured () const
 
ModuleTextureget_texture () const
 
CORE_FORCE_INLINE bool eval_attr_value_vec (const CtxEval &ctx_eval, CtxShader &ctx_shader, GMathVec4f &c) const
 Evaluate the attribute as a color on this particular rendering context.
 
CORE_FORCE_INLINE bool eval_attr_value_out (const CtxEval &ctx_eval, CtxShader &ctx_shader, TextureOutput &out) const
 Evaluate the attribute as a texture output on this particular rendering context.
 
CORE_FORCE_INLINE bool eval_attr_value_double (const CtxEval &ctx_eval, CtxShader &ctx_shader, double &value) const
 Evaluate the attribute as a double on this particular rendering context.
 
CORE_FORCE_INLINE bool sample_attr_value_vec (const CtxEval &ctx_eval, CtxShader &ctx_shader, GMathVec4f &c) const
 Sample the attribute as a color on this particular rendering context.
 
CORE_FORCE_INLINE bool sample_attr_value_out (const CtxEval &ctx_eval, CtxShader &ctx_shader, TextureOutput &out) const
 Sample the attribute as a texture output on this particular rendering context.
 
CORE_FORCE_INLINE bool sample_attr_value_double (const CtxEval &ctx_eval, CtxShader &ctx_shader, double &value) const
 Sample the attribute as a double on this particular rendering context.
 
CORE_FORCE_INLINE bool eval (const CtxEval &ctx_eval, CtxShader &ctx_shader, GMathVec4f &c) const
 
CORE_FORCE_INLINE bool eval (const CtxEval &ctx_eval, CtxShader &ctx_shader, TextureOutput &out) const
 
CORE_FORCE_INLINE bool eval (const CtxEval &ctx_eval, CtxShader &ctx_shader, double &value) const
 
CORE_FORCE_INLINE bool sample (const CtxEval &ctx_eval, CtxShader &ctx_shader, GMathVec4f &c) const
 
CORE_FORCE_INLINE bool sample (const CtxEval &ctx_eval, CtxShader &ctx_shader, TextureOutput &out) const
 
CORE_FORCE_INLINE bool sample (const CtxEval &ctx_eval, CtxShader &ctx_shader, double &value) const
 
bool eval_attr_value_string (const CtxEval &ctx_eval, CtxShader &ctx_shader, UniqueString &out) const
 Evaluate the attribute as a string on this particular rendering context.
 
const UniqueStringeval_shading_variable_value_string (const CtxEval &ctx_eval, CtxShader &ctx_shader, bool &status) const
 Evaluate the attribute shading variable value as a string on this particular rendering context.
 

Detailed Description

Helper to evaluate an attribute value in a rendering context, according to texture/shading variable.

Member Function Documentation

CORE_FORCE_INLINE bool OfAttrDynEvaluator::eval ( const CtxEval ctx_eval,
CtxShader ctx_shader,
GMathVec4f &  c 
) const
inline
CORE_FORCE_INLINE bool OfAttrDynEvaluator::eval ( const CtxEval ctx_eval,
CtxShader ctx_shader,
TextureOutput out 
) const
inline
CORE_FORCE_INLINE bool OfAttrDynEvaluator::eval ( const CtxEval ctx_eval,
CtxShader ctx_shader,
double &  value 
) const
inline
CORE_FORCE_INLINE bool OfAttrDynEvaluator::eval_attr_value_double ( const CtxEval ctx_eval,
CtxShader ctx_shader,
double &  value 
) const
inline

Evaluate the attribute as a double on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]outEvaluated double.
Note
This method returns true if the double is not null.
CORE_FORCE_INLINE bool OfAttrDynEvaluator::eval_attr_value_out ( const CtxEval ctx_eval,
CtxShader ctx_shader,
TextureOutput out 
) const
inline

Evaluate the attribute as a texture output on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]outEvaluated texture output.
Note
This method returns true if the output is not filled with null values.
bool OfAttrDynEvaluator::eval_attr_value_string ( const CtxEval ctx_eval,
CtxShader ctx_shader,
UniqueString out 
) const

Evaluate the attribute as a string on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]stringEvaluated string.
Note
This method returns true if the string is not empty.
CORE_FORCE_INLINE bool OfAttrDynEvaluator::eval_attr_value_vec ( const CtxEval ctx_eval,
CtxShader ctx_shader,
GMathVec4f &  c 
) const
inline

Evaluate the attribute as a color on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]cEvaluated color.
Note
This method returns true if the color is not filled with null values.
const UniqueString & OfAttrDynEvaluator::eval_shading_variable_value_string ( const CtxEval ctx_eval,
CtxShader ctx_shader,
bool &  status 
) const

Evaluate the attribute shading variable value as a string on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]statusTrue if the returned value is valid, false otherwise.
Note
This method returns the shading variable value.
void OfAttrDynEvaluator::resync_attribute ( )

Take attribute new properties into account.

Note
Call this method when the attribute has been modified.
CORE_FORCE_INLINE bool OfAttrDynEvaluator::sample ( const CtxEval ctx_eval,
CtxShader ctx_shader,
GMathVec4f &  c 
) const
inline
CORE_FORCE_INLINE bool OfAttrDynEvaluator::sample ( const CtxEval ctx_eval,
CtxShader ctx_shader,
TextureOutput out 
) const
inline
CORE_FORCE_INLINE bool OfAttrDynEvaluator::sample ( const CtxEval ctx_eval,
CtxShader ctx_shader,
double &  value 
) const
inline
CORE_FORCE_INLINE bool OfAttrDynEvaluator::sample_attr_value_double ( const CtxEval ctx_eval,
CtxShader ctx_shader,
double &  value 
) const
inline

Sample the attribute as a double on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]outEvaluated double.
Note
Similar to eval_attr_value_double method, but will not use the texture cache of the CtxEval.
CORE_FORCE_INLINE bool OfAttrDynEvaluator::sample_attr_value_out ( const CtxEval ctx_eval,
CtxShader ctx_shader,
TextureOutput out 
) const
inline

Sample the attribute as a texture output on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]outEvaluated texture output.
Note
Similar to eval_attr_value_out method, but will not use the texture cache of the CtxEval.
CORE_FORCE_INLINE bool OfAttrDynEvaluator::sample_attr_value_vec ( const CtxEval ctx_eval,
CtxShader ctx_shader,
GMathVec4f &  c 
) const
inline

Sample the attribute as a color on this particular rendering context.

Parameters
[in]ctx_evalThe evaluation context.
[in]ctx_shaderThe shader context.
[out]cEvaluated color.
Note
Similar to eval_attr_value_vec method, but will not use the texture cache of the CtxEval.
void OfAttrDynEvaluator::set_attribute ( const OfAttr attr)
inline

Set the attribute to evaluate.

Parameters
[in]attrThe attribute to evaluate.
Note
This method automaticaly call the resync_attribute one.
void OfAttrDynEvaluator::set_attribute ( const OfAttr attr)
inline

Set the attribute to evaluate.

Parameters
[in]attrThe pointer to the attribute to evaluate.
Note
This method automaticaly call the resync_attribute one.