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

Class holding all informations about a geometry fragment. More...

Inheritance diagram for GeometryFragment:
GeometryIntersection

Public Member Functions

void clear ()
 Clear the fragment.
 
void init (const GeometryObjectDescriptor &object, const GeometrySampleDescriptor &sample=GeometrySampleDescriptor(), const GeometryMediumDescriptor &medium=GeometryMediumDescriptor())
 Init the fragment.
 
void init (const GeometryObjectDescriptor &object, const GeometrySampleDescriptor &sample, const GMathMatrix4x4d &world_matrix, GMathMatrix4x4d *world_matrix_dt=0)
 Init the fragment.
 
void init (const GeometryObjectDescriptor &object, const GeometrySampleDescriptor &sample, const GeometryMediumDescriptor &medium, const GMathMatrix4x4d &world_matrix, GMathMatrix4x4d *world_matrix_dt=0)
 Init the fragment.
 
void set_object_desc (const GeometryObjectDescriptor &object)
 Set informations about the geometry and the scene objects.
 
void set_sample_desc (const GeometrySampleDescriptor &sample)
 Set informations about the location of the fragment on the geometry.
 
void set_medium_desc (const GeometryMediumDescriptor &medium)
 Set informations about the medium.
 
bool is_facing (const CtxEval &eval_ctx) const
 Tell if the fragment normal is facing the incident ray.
 
bool is_facing (const CtxEval &eval_ctx, const GMathVec3d &direction) const
 Tell if the fragment normal is facing a given direction.
 
void set_scene_object (ModuleSceneObject *object, const unsigned int &index=0, GeometryOverride *override=0)
 Init the hierarchy of scene objects to 1 element and set its pointer, its index in the scene, and the geometry override applied on it.
 
void set_scene_object_count (const unsigned int &count)
 Set the size of the scene objects hierarchy.
 
void set_scene_object (const unsigned int &i, ModuleSceneObject *object, const unsigned int &index=0, GeometryOverride *override=0)
 Set the pointer to a scene object in the hierarchy, the index in the scene, and the geometry override applied on it.
 
void set_light (ModuleLight *light, const unsigned int &index=0)
 
void set_geometry_index (const unsigned int &geometry_index)
 Set the index of the geometry in regard to the first scene object in the hierarchy.
 
void set_local_geometry_index (const unsigned int &geometry_index)
 Sets the index of the geometry hit in the last scene object.
 
void set_vertex_id (const unsigned int &vertex_id)
 Set the ID of the vertex associated to the fragment.
 
void set_primitive_id (const unsigned int &primitive_id)
 Set the ID of the primitive in which the fragment is.
 
void set_sub_primitive_id (const unsigned int &primitive_id)
 Set the ID of the sub-primitive in which the fragment is.
 
void set_material_index (const unsigned int &material_index)
 Set the index of the material in regard to the first scene object in the hierarchy.
 
void reset_world_matrix ()
 Reset the world matrix to identity.
 
void set_world_matrix (const GMathMatrix4x4d &xform)
 Set the world matrix of the geometry.
 
void multiply_world_matrix (const GMathMatrix4x4d &xform)
 Multiply the matrix of the geometry by another matrix.
 
void set_world_matrix_dt (GMathMatrix4x4d *xform)
 Set the world matrix of the geometry at (t + dt)
 
void set_ray (const GMathRay<> *ray)
 Set the ray associated to the fragment.
 
void set_local_eye_dir (const GMathVec3d &eye_dir)
 Set the direction of the eye in the geometry space.
 
void set_time (const double &time, const double &delta=0.0)
 Set the local time of the fragment and its delta (related to the frame)
 
void set_uv (const double &u, const double &v)
 Set UV coordinates of the fragment on the primitive.
 
void set_uvw (const double &u, const double &v, const double &w)
 Set UVW coordinates of the fragment on the primitive.
 
void set_sub_uv (const double &u, const double &v)
 Set UV coordinates of the fragment on the sub-primitive.
 
void set_sub_uvw (const double &u, const double &v, const double &w)
 Set UVW coordinates of the fragment on the sub-primitive.
 
void set_geometry (const GeometryObject *base_geometry, const GeometryObject *deformed_geometry=0)
 Set the pointers to the geometry representations.
 
void set_medium_opacity (const GMathVec3f &opacity)
 Set the opacity of the fragment.
 
void set_medium_thickness (const float &thickness)
 Set the thickness of the fragment.
 
void set_medium_density (const float &density)
 Set the density of the fragment.
 
void set_medium_density_diff (const GMathVec3f &density_diff)
 Set the differential of the density for the fragment.
 
void set_custom_data (GeometryCustomData *data)
 Attach custom data to the fragment.
 
const GeometrySourceHierarchyget_scene_objects () const
 Get the hierarchy of scene objects from which the geometry is accessible.
 
unsigned int get_scene_object_count () const
 Get the size of the scene object hierarchy.
 
unsigned int get_scene_object_index (const unsigned int &i) const
 Get the index of a scene object in the hierarchy.
 
unsigned int get_first_scene_object_index () const
 Get the index in the scene of the first scene object in the hierarchy.
 
unsigned int get_last_scene_object_index () const
 Get the index in regard to its parent of the last scene object in the hierarchy.
 
unsigned int get_first_visibility_object_index () const
 Get the index of the first scene object overriding visibility or the last object if no override.
 
ModuleSceneObjectget_scene_object (const unsigned int &i) const
 Get the pointer to a scene object in the hierarchy.
 
ModuleSceneObjectget_first_scene_object () const
 Get the pointer to the first scene object in the hierarchy.
 
ModuleSceneObjectget_last_scene_object () const
 Get the pointer to the last scene object in the hierarchy.
 
ModuleSceneObjectget_first_visibility_object () const
 Get the pointer to the first scene object overriding visibility or the last object if no override.
 
unsigned int get_light_index () const
 Get the index of the light from which the intersection belongs to.
 
ModuleLightget_light () const
 Get the the light from which the intersection belongs to.
 
GeometryOverrideget_geometry_override (const unsigned int &i) const
 Get the geometry override of a scene object in the hierarchy.
 
GeometryOverrideget_first_geometry_override () const
 Get the geometry override in the scene of the first scene object in the hierarchy.
 
GeometryOverrideget_last_geometry_override () const
 Get the geometry override in regard to its parent of the last scene object in the hierarchy.
 
GeometryOverrideget_first_visibility_geometry_override () const
 Get the geometry override of the first scene object overriding visibility or the last object if no override.
 
const unsigned int & get_geometry_index () const
 Get the index of the geometry in regard to the first scene object in the hierarchy.
 
const unsigned int & get_local_geometry_index () const
 Returns the index of the last geometry hit in the scene object.
 
const unsigned int & get_vertex_id () const
 Get the ID of the vertex associated to the fragment.
 
const unsigned int & get_primitive_id () const
 Get the ID of the primitive containing the fragment.
 
const unsigned int & get_sub_primitive_id () const
 Get the ID of the sub-primitive containing the fragment.
 
const unsigned int & get_material_index () const
 Get the index of the material in regard to the first scene object in the hierarchy.
 
bool has_world_matrix () const
 Tell if the geometry has a transformation matrix.
 
const GMathMatrix4x4d & get_world_matrix () const
 Get the transformation matrix of the geometry.
 
GMathMatrix4x4d * get_world_matrix_dt () const
 Get the transformation matrix of the geometry at (t + dt)
 
const GMathRayget_ray () const
 Get the ray that has generated the fragment.
 
const GMathVec3d & get_local_eye_dir () const
 Get the local direction of the eye that see the fragment.
 
GMathVec3d get_uvw () const
 Get the parametric coordinates of the fragment in the primitive.
 
GMathVec3d get_sub_uvw () const
 Get the parametric coordinates of the fragment in the sub-primitive.
 
const double & get_time () const
 Get the local time of the fragment (related to the frame)
 
const double & get_time_delta () const
 Get the time delta used to compute the motion vector.
 
const double & get_u () const
 Get the U parametric coordinate of the fragment in the primitive.
 
const double & get_v () const
 Get the V parametric coordinate of the fragment in the primitive.
 
const double & get_w () const
 Get the W parametric coordinate of the fragment in the primitive.
 
const double & get_sub_u () const
 Get the U parametric coordinate of the fragment in the sub-primitive.
 
const double & get_sub_v () const
 Get the V parametric coordinate of the fragment in the sub-primitive.
 
const double & get_sub_w () const
 Get the W parametric coordinate of the fragment in the sub-primitive.
 
const GeometryObjectget_base_geometry () const
 Get a pointer to the non deformed version of the geometry.
 
const GeometryObjectget_deformed_geometry () const
 Get a pointer to the deformed version of the geometry.
 
const GMathVec3f & get_medium_opacity () const
 Get the opacity of the fragment.
 
const float & get_medium_thickness () const
 Get the thickness of the fragment.
 
const float & get_medium_density () const
 Get the density of the fragment.
 
const GMathVec3f & get_medium_density_diff () const
 Get the differential of the density for the fragment.
 
const GeometryObjectDescriptorget_object_desc () const
 Get informations about the geometry and the scene objects.
 
const GeometrySampleDescriptorget_sample_desc () const
 Get informations about the location of the fragment on the geometry.
 
const GeometryMediumDescriptorget_medium_desc () const
 Get informations about the medium.
 
GeometryCustomDataget_custom_data () const
 Get the custom data attached to the fragment.
 
CORE_FORCE_INLINE const
GeometrySample
get_local_sample (const CtxEval &eval_ctx) const
 Get the geometric values associated to the fragment in the local space of the geometry.
 
CORE_FORCE_INLINE GeometrySample get_local_deformed_sample (const CtxEval &eval_ctx) const
 Get the geometric values associated to the fragment in the local space of the geometry.
 
CORE_FORCE_INLINE const
GeometrySample
get_world_sample (const CtxEval &eval_ctx) const
 Get the geometric values associated to the fragment in world space.
 
CORE_FORCE_INLINE const
GeometryDifferential
get_differentials (const CtxEval &eval_ctx) const
 Get differential geometry associated to the fragment.
 
CORE_FORCE_INLINE const double & get_primitive_area (const CtxEval &eval_ctx) const
 Get the area of the primitive on which the fragment is.
 
void set_user_sample (const GeometrySample &sample)
 Override the values of samples with an user defined one.
 
void set_user_sample (const GeometrySample &sample, const GMathMatrix4x4d &xform, GMathMatrix4x4d *xform_dt=0)
 Override the values of samples with an user defined one.
 
void set_user_sample (const GeometrySample &local_sample, const GeometrySample &world_sample, const GMathMatrix4x4d &xform, GMathMatrix4x4d *xform_dt=0)
 Override the values of samples with an user defined one.
 
void set_user_differentials (const GeometryDifferential &diff)
 Override the differentials on the geometry with user defined ones.
 
void set_user_differentials (const CtxEval &eval_ctx, const GMathVec3d &dpdx, const GMathVec3d &dpdy)
 Override the differentials on the geometry with user defined ones.
 
void set_user_differentials (const CtxEval &eval_ctx, const GMathVec3d &dpdx, const GMathVec3d &dpdy, const double &area)
 Override the differentials on the geometry with user defined ones.
 
void set_user_differentials (const CtxEval &eval_ctx, const double &spot_size)
 Override the differentials on the geometry with user defined ones.
 
void set_user_primitive_area (const double &area)
 Override the value of the primitive area with an user defined one.
 
void copy_params (const GeometryFragment &other)
 Copy the description of a fragment without the geometric data.
 
void copy_params_and_matrix_dt (const GeometryFragment &other)
 Copy the description of a fragment without replacing the pointer on the matrix dt but in copying the other matrix dt on the current pointer. If there is no matrix dt in other then it will copy the world matrix in the current matrix dt.
 
bool is_near_edge (const CtxEval &eval_ctx, const double &edge_width, double &weight) const
 
bool is_near_visible_edge (const CtxEval &eval_ctx, const double &edge_width, double &weight) const
 
bool is_near_sub_edge (const CtxEval &eval_ctx, const double &edge_width, double &weight) const
 
void set_user_surface_sample (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv)
 Helper function to init an user surface sample and override the fragment ones with it.
 
void set_user_surface_sample (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathVec3d &smoothed_position, const GMathVec3d &smoothed_normal)
 
void set_user_surface_sample (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathMatrix4x4d &xform, GMathMatrix4x4d *xform_dt=0)
 
void set_user_surface_sample (const GMathVec3d &position, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathVec3d &smoothed_position, const GMathVec3d &smoothed_normal, const GMathMatrix4x4d &xform, GMathMatrix4x4d *xform_dt=0)
 
void set_user_point_sample (const GMathVec3d &position, const GMathVec3d &normal, const bool &normalized)
 Helper function to init an user point sample and override the fragment ones with it.
 
void set_user_point_sample (const GMathVec3d &geometric_position, const GMathVec3d &geometric_normal, const GMathVec3d &smoothed_position, const GMathVec3d &smoothed_normal, const bool &normalized)
 
void set_user_point_sample (const GMathVec3d &position, const GMathVec3d &normal, const bool &normalized, const GMathMatrix4x4d &xform, GMathMatrix4x4d *xform_dt=0)
 
void set_user_point_sample (const GMathVec3d &geometric_position, const GMathVec3d &geometric_normal, const GMathVec3d &smoothed_position, const GMathVec3d &smoothed_normal, const bool &normalized, const GMathMatrix4x4d &xform, GMathMatrix4x4d *xform_dt=0)
 

Static Public Member Functions

static void compute_differentials (const GeometrySample &sample, const GMathRay<> *ray, GeometryDifferential &diff)
 
static void compute_differentials (const GeometrySample &sample, const double &spot_size, GeometryDifferential &diff)
 
static void compute_position_differentials (const GMathVec3d &position, const GMathVec3d &normal, const GMathRay<> &ray, GeometryPositionDifferential &diff)
 
static void compute_parametric_differentials (const GMathVec3d &normal, const GMathVec3d &dpdu, const GMathVec3d &dpdv, const GMathVec3d &dpdx, const GMathVec3d &dpdy, GMathVec2d &duvdx, GMathVec2d &duvdy)
 

Detailed Description

Class holding all informations about a geometry fragment.

A fragment is the result of an intersection between a ray and a geometry primitive. It contains all the information related to this intersection:

Geometric informations are computed only on demand. Informations expressed in local space are always computed on the base geometry (non deformed) whereas those expressed in world space are computed on the deformed geometry.

Member Function Documentation

void GeometryFragment::compute_differentials ( const GeometrySample sample,
const GMathRay<> *  ray,
GeometryDifferential diff 
)
static

Compute differentials for a given sample

Parameters
[in]samplethe sample for which the differentials have to be computed
[in]raythe ray to use for the computation
[out]diffthe resulting differentials
void GeometryFragment::compute_differentials ( const GeometrySample sample,
const double &  spot_size,
GeometryDifferential diff 
)
static

Compute differentials for a given sample

Parameters
[in]samplethe sample for which the differentials have to be computed
[in]spot_sizeapproximative size of the differentials
[out]diffthe resulting differentials
void GeometryFragment::compute_parametric_differentials ( const GMathVec3d &  normal,
const GMathVec3d &  dpdu,
const GMathVec3d &  dpdv,
const GMathVec3d &  dpdx,
const GMathVec3d &  dpdy,
GMathVec2d &  duvdx,
GMathVec2d &  duvdy 
)
static

Compute parametric differentials for a given sample

Parameters
[in]normalsample normal
[in]dpduposition partial derivative for U
[in]dpdvposition partial derivative for V
[in]dpdxposition partial derivative for X
[in]dpdyposition partial derivative for Y
[out]duvdxthe resulting parametric partial derivative for X
[out]duvdythe resulting parametric partial derivative for Y
void GeometryFragment::compute_position_differentials ( const GMathVec3d &  position,
const GMathVec3d &  normal,
const GMathRay<> &  ray,
GeometryPositionDifferential diff 
)
static

Compute position differentials for a given sample

Parameters
[in]positionsample position
[in]normalsample normal
[in]rayray with differentials
[out]diffthe resulting differentials
CORE_FORCE_INLINE const GeometryDifferential& GeometryFragment::get_differentials ( const CtxEval eval_ctx) const

Get differential geometry associated to the fragment.

Parameters
[in]eval_ctxa valid evaluation context
Returns
the differential
const unsigned int& GeometryFragment::get_geometry_index ( ) const
inline

Get the index of the geometry in regard to the first scene object in the hierarchy.

Note
This index is encoded on 32 bits so it can be false if the geometry is reached from a hierarchy of complex scatterers.
GeometryOverride* GeometryFragment::get_geometry_override ( const unsigned int &  i) const
inline

Get the geometry override of a scene object in the hierarchy.

Parameters
[in]ithe position of the scene object in the hierarchy
Returns
the index of the scene object in regard to its parent
CORE_FORCE_INLINE GeometrySample GeometryFragment::get_local_deformed_sample ( const CtxEval eval_ctx) const

Get the geometric values associated to the fragment in the local space of the geometry.

Parameters
[in]eval_ctxa valid evaluation context
Returns
the geometric sample
Note
the sample is computed with the deformed version of the geometry
Warning
To use with care, it can be a lot less optimized than using get_local_sample(), as calling this function always create a sample on the stack and always compute it, and return it by copy. There is no caching system like get_local_sample() and get_world_sample().
CORE_FORCE_INLINE const GeometrySample& GeometryFragment::get_local_sample ( const CtxEval eval_ctx) const

Get the geometric values associated to the fragment in the local space of the geometry.

Parameters
[in]eval_ctxa valid evaluation context
Returns
the geometric sample
Note
the sample is computed with the non deformed version of the geometry
CORE_FORCE_INLINE const double& GeometryFragment::get_primitive_area ( const CtxEval eval_ctx) const

Get the area of the primitive on which the fragment is.

Parameters
[in]eval_ctxa valid evaluation context
Returns
the area of the primitive
ModuleSceneObject* GeometryFragment::get_scene_object ( const unsigned int &  i) const
inline

Get the pointer to a scene object in the hierarchy.

Parameters
[in]ithe position of the scene object in the hierarchy
Returns
the pointer to the scene object
unsigned int GeometryFragment::get_scene_object_index ( const unsigned int &  i) const
inline

Get the index of a scene object in the hierarchy.

Parameters
[in]ithe position of the scene object in the hierarchy
Returns
the index of the scene object in regard to its parent
CORE_FORCE_INLINE const GeometrySample& GeometryFragment::get_world_sample ( const CtxEval eval_ctx) const

Get the geometric values associated to the fragment in world space.

Parameters
[in]eval_ctxa valid evaluation context
Returns
the geometric sample
Note
the sample is computed with the deformed version of the geometry
void GeometryFragment::init ( const GeometryObjectDescriptor object,
const GeometrySampleDescriptor sample = GeometrySampleDescriptor(),
const GeometryMediumDescriptor medium = GeometryMediumDescriptor() 
)
inline

Init the fragment.

Parameters
[in]objectinformations about the geometry and the scene objects
[in]sampleinformation about the location of the fragment on the geometry
[in]meiduminformation about the medium
Note
The matrix is set to identity.
void GeometryFragment::init ( const GeometryObjectDescriptor object,
const GeometrySampleDescriptor sample,
const GMathMatrix4x4d &  world_matrix,
GMathMatrix4x4d *  world_matrix_dt = 0 
)
inline

Init the fragment.

Parameters
[in]objectinformations about the geometry and the scene objects
[in]sampleinformation about the location of the fragment on the geometry
[in]world_matrixthe matrix of the geometry in world space
[in]motion_matrixthe matrix of the geometry in world space at (t + dt)
void GeometryFragment::init ( const GeometryObjectDescriptor object,
const GeometrySampleDescriptor sample,
const GeometryMediumDescriptor medium,
const GMathMatrix4x4d &  world_matrix,
GMathMatrix4x4d *  world_matrix_dt = 0 
)
inline

Init the fragment.

Parameters
[in]objectinformations about the geometry and the scene objects
[in]sampleinformation about the location of the fragment on the geometry
[in]meiduminformation about the medium
[in]world_matrixthe matrix of the geometry in world space
[in]motion_matrixthe matrix of the geometry in world space at (t + dt)
bool GeometryFragment::is_facing ( const CtxEval eval_ctx) const
inline

Tell if the fragment normal is facing the incident ray.

Parameters
[in]eval_ctxa valid evaluation context
Returns
true if the fragment normal is facing the ray, else false
bool GeometryFragment::is_facing ( const CtxEval eval_ctx,
const GMathVec3d &  direction 
) const
inline

Tell if the fragment normal is facing a given direction.

Parameters
[in]eval_ctxa valid evaluation context
[in]directionthe direction to test against the normal
Returns
true if the fragment normal is facing the direction, else false
bool GeometryFragment::is_near_edge ( const CtxEval eval_ctx,
const double &  edge_width,
double &  weight 
) const

Tell whether the fragment is near an edge of the primitive. This function uses the ray differentials to determine the distance to edges. Therefore, the width of edges is expressed in pixels.

Parameters
[in]eval_ctxa valid evaluation context
[in]edge_widththe width of edges in pixels
[out]weighta value between 0 and 1 corresponding to the distance to the edge in regard to the specified edge width
Returns
true if the fragment is near an edge, else false
bool GeometryFragment::is_near_sub_edge ( const CtxEval eval_ctx,
const double &  edge_width,
double &  weight 
) const

Tell whether the fragment is near an edge of the sub-primitive.

Parameters
[in]eval_ctxa valid evaluation context
[in]edge_widththe width of edges in pixels
[out]weighta value between 0 and 1 corresponding to the distance to the edge in regard to the specified edge width
Returns
true if the fragment is near an edge, else false
bool GeometryFragment::is_near_visible_edge ( const CtxEval eval_ctx,
const double &  edge_width,
double &  weight 
) const

Tell whether the fragment is near a visible edge of the primitive. This function is equivalent to is_near_edge but it discards edges that are not considered visible by the geometry.

Parameters
[in]eval_ctxa valid evaluation context
[in]edge_widththe width of edges in pixels
[out]weighta value between 0 and 1 corresponding to the distance to the edge in regard to the specified edge width
Returns
true if the fragment is near an edge, else false
void GeometryFragment::set_geometry ( const GeometryObject base_geometry,
const GeometryObject deformed_geometry = 0 
)
inline

Set the pointers to the geometry representations.

Parameters
[in]base_geometrypointer to the non deformed geometry
[in]deformed_geometrypointer to the deformed geometry
void GeometryFragment::set_scene_object ( const unsigned int &  i,
ModuleSceneObject object,
const unsigned int &  index = 0,
GeometryOverride override = 0 
)
inline

Set the pointer to a scene object in the hierarchy, the index in the scene, and the geometry override applied on it.

Parameters
[in]ithe position of the scene object in the hierarchy
[in]objectthe pointer to the scene object
[in]indexthe index of the scene object in regard to his parent (in the scene if i = 0)
[in]overridethe geometry override applied on the scene object
void GeometryFragment::set_user_differentials ( const GeometryDifferential diff)
inline

Override the differentials on the geometry with user defined ones.

Parameters
[in]diffgeometry differentials to set
void GeometryFragment::set_user_differentials ( const CtxEval eval_ctx,
const GMathVec3d &  dpdx,
const GMathVec3d &  dpdy 
)
inline

Override the differentials on the geometry with user defined ones.

Parameters
[in]eval_ctxa valid evaluation context
[in]dpdxthe position partial derivative for the X direction
[in]dpdythe position partial derivative for the Y direction
void GeometryFragment::set_user_differentials ( const CtxEval eval_ctx,
const GMathVec3d &  dpdx,
const GMathVec3d &  dpdy,
const double &  area 
)
inline

Override the differentials on the geometry with user defined ones.

Parameters
[in]eval_ctxa valid evaluation context
[in]dpdxthe position partial derivative for the X direction
[in]dpdythe position partial derivative for the Y direction
[in]areathe area covered by differentials
void GeometryFragment::set_user_differentials ( const CtxEval eval_ctx,
const double &  spot_size 
)
inline

Override the differentials on the geometry with user defined ones.

Parameters
[in]eval_ctxa valid evaluation context
[in]spot_sizeapproximative size of the differentials
void GeometryFragment::set_user_point_sample ( const GMathVec3d &  position,
const GMathVec3d &  normal,
const bool &  normalized 
)
inline

Helper function to init an user point sample and override the fragment ones with it.

See Also
GeometrySample
void GeometryFragment::set_user_sample ( const GeometrySample sample)
inline

Override the values of samples with an user defined one.

Parameters
[in]samplethe samples values to set
Note
The local and world samples take the same values and the matrix is set to identity.
void GeometryFragment::set_user_sample ( const GeometrySample sample,
const GMathMatrix4x4d &  xform,
GMathMatrix4x4d *  xform_dt = 0 
)
inline

Override the values of samples with an user defined one.

Parameters
[in]samplethe samples values to set
[in]xformthe world matrix of the geometry
[in]xform_dtthe world matrix of the geometry at (t + dt)
Note
The local and world samples use the same values but the world sample is transformed by the given matrix.
void GeometryFragment::set_user_sample ( const GeometrySample local_sample,
const GeometrySample world_sample,
const GMathMatrix4x4d &  xform,
GMathMatrix4x4d *  xform_dt = 0 
)
inline

Override the values of samples with an user defined one.

Parameters
[in]local_samplethe samples values to set in local space
[in]world_samplethe samples values to set in world space
[in]xformthe world matrix of the geometry
[in]xform_dtthe world matrix of the geometry at (t + dt)
Note
The world sample is considered as being already transformed by the world matrix.
void GeometryFragment::set_user_surface_sample ( const GMathVec3d &  position,
const GMathVec3d &  dpdu,
const GMathVec3d &  dpdv 
)
inline

Helper function to init an user surface sample and override the fragment ones with it.

See Also
GeometrySample