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

Class containing geometric information used for the shading of a fragment. More...

Public Member Functions

bool is_facing_fragment () const
 Return whether the eye is facing the fragment normal.
 
bool is_facing () const
 Return whether the eye is facing the shading normal.
 
bool is_flipped () const
 Return whether the shading normal is flipped compared to the fragment one.
 
void flip ()
 Flip normals.
 
const GeometrySampleget_fragment_local_sample () const
 Get the fragment sample in the local space of the geometry.
 
const GeometrySampleget_fragment_sample () const
 Get the fragment sample on the geometry.
 
const GMathVec3d & get_local_geometric_position () const
 Get the geometric position of the fragment in the local space of the geometry.
 
const GMathVec3d & get_local_geometric_position_dt () const
 Get the geometric position of the fragment at (t + dt) in the local space of the geometry.
 
const GMathVec3d & get_local_smoothed_position () const
 Get the extrapolated smoothed position of the fragment in the local space of the geometry.
 
const GMathVec3d & get_geometric_position () const
 Get the geometric position of the fragment.
 
const GMathVec3d & get_geometric_position_dt () const
 Get the geometric position of the fragment at (t + dt)
 
const GMathVec3d & get_smoothed_position () const
 Get the extrapolated smoothed position of the fragment.
 
const GMathVec3d & get_front_geometric_position () const
 Get the geometric position offsetted in the direction of the shading normal.
 
const GMathVec3d & get_back_geometric_position () const
 Get the geometric position offsetted in the reverse direction of the shading normal.
 
const GMathVec3d & get_front_smoothed_position () const
 Get the smoothed position offsetted in the direction of the shading normal.
 
const GMathVec3d & get_back_smoothed_position () const
 Get the smoothed position offsetted in the reverse direction of the shading normal.
 
const GMathVec3d & get_fragment_front_geometric_position () const
 Get the geometric position offsetted in the direction of the fragment normal.
 
const GMathVec3d & get_fragment_back_geometric_position () const
 Get the geometric position offsetted in the reverse direction of the fragment normal.
 
const GMathVec3d & get_fragment_front_smoothed_position () const
 Get the smoothed position offsetted in the direction of the fragment normal.
 
const GMathVec3d & get_fragment_back_smoothed_position () const
 Get the smoothed position offsetted in the reverse direction of the fragment normal.
 
const GMathVec3d & get_eye_front_geometric_position () const
 Get the geometric position offsetted in the direction of the eye.
 
const GMathVec3d & get_eye_back_geometric_position () const
 Get the geometric position offsetted in the reverse direction of the eye.
 
const GMathVec3d & get_eye_front_smoothed_position () const
 Get the smoothed position offsetted in the direction of the eye.
 
const GMathVec3d & get_eye_back_smoothed_position () const
 Get the smoothed position offsetted in the reverse direction of the eye.
 
const GMathVec3d & get_eye_direction () const
 Get the normalized direction of the ray that has generated the sample.
 
const GMathVec3d & get_local_geometric_dpdu () const
 Get the geometric partial derivative for U in the local space of the geometry.
 
const GMathVec3d & get_local_geometric_dpdv () const
 Get the geometric partial derivative for V in the local space of the geometry.
 
const GMathVec3d & get_local_smoothed_dpdu () const
 Get the smoothed partial derivative for U in the local space of the geometry.
 
const GMathVec3d & get_local_smoothed_dpdv () const
 Get the smoothed partial derivative for V in the local space of the geometry.
 
const GMathVec3d & get_geometric_dpdu () const
 Get the geometric partial derivative for U.
 
const GMathVec3d & get_geometric_dpdv () const
 Get the geometric partial derivative for V.
 
const GMathVec3d & get_smoothed_dpdu () const
 Get the smoothed partial derivative for U.
 
const GMathVec3d & get_smoothed_dpdv () const
 Get the smoothed partial derivative for V.
 
const GMathVec3d & get_geometric_dndu () const
 Get the geometric partial normal derivative for U.
 
const GMathVec3d & get_geometric_dndv () const
 Get the geometric partial normal derivative for V.
 
const GMathVec3d & get_smoothed_dndu () const
 Get the smoothed partial normal derivative for U.
 
const GMathVec3d & get_smoothed_dndv () const
 Get the smoothed partial normal derivative for V.
 
const GMathVec3d & get_local_geometric_normal () const
 Get the geometric normal corresponding to the current sidedness in the local space of the geometry.
 
const GMathVec3d & get_local_smoothed_normal () const
 Get the smoothed normal corresponding to the current sidedness in the local space of the geometry.
 
const GMathVec3d & get_geometric_normal () const
 Get the geometric normal corresponding to the current sidedness.
 
const GMathVec3d & get_smoothed_normal () const
 Get the smoothed normal corresponding to the current sidedness.
 
const GMathVec3d & get_fragment_local_geometric_normal () const
 Get the geometric normal of the fragment in the local space of the geometry.
 
const GMathVec3d & get_fragment_local_smoothed_normal () const
 Get the smoothed normal of the fragment in the local space of the geometry.
 
const GMathVec3d & get_fragment_geometric_normal () const
 Get the geometric normal of the fragment.
 
const GMathVec3d & get_fragment_smoothed_normal () const
 Get the smoothed normal of the fragment.
 
const GMathVec3d & get_offset () const
 Get the offset used to compute front and back positions.
 
const GMathVec3d & get_normal () const
 Get the normal to use for the shading.
 
const GMathVec3d & get_dpdu () const
 Get the partial derivative for U.
 
const GMathVec3d & get_dpdv () const
 Get the partial derivative for V.
 
const GMathVec3d & get_dndu () const
 Get the partial normal derivative for U.
 
const GMathVec3d & get_dndv () const
 Get the partial normal derivative for V.
 
const GMathMatrix3x3d & get_frame () const
 Get the frame built from the shading normal.
 
void set_normal (const GMathVec3d &normal)
 Set a custom shading normal.
 
void set_dpdu_dpdv (const GMathVec3d &dpdu, const GMathVec3d &dpdv)
 Set a custom partial derivative for U and V.
 
void set_dndu_dndv (const GMathVec3d &dndu, const GMathVec3d &dndv)
 Set a custom partial normal derivative for U and V.
 
void set_frame (const GMathMatrix3x3d &frame)
 Set a custom shading frame.
 
void set_ray (const GMathRay<> *ray)
 Set a custom ray.
 
void log_positions () const
 

Friends

class CtxFragment
 

Detailed Description

Class containing geometric information used for the shading of a fragment.