Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
GeometryDiskSampler< REAL > Class Template Reference
Inheritance diagram for GeometryDiskSampler< REAL >:
GeometryPrimitive

Classes

struct  DirectionalFragmentData
 
struct  DirectionalSamplingData
 
struct  FragmentEvaluationData
 

Public Types

enum  UvMode {
  UV_SQUARE,
  UV_DISK
}
 Parametric modes. More...
 
- Public Types inherited from GeometryPrimitive
enum  SideFlags {
  SIDE_FRONT = 1,
  SIDE_BACK = 2,
  SIDE_BOTH = 3
}
 Visible side flags. More...
 

Public Member Functions

 GeometryDiskSampler (const REAL &radius=GMath< REAL >::half(), const SideFlags &side=SIDE_BOTH, const UvMode &uv_mode=UV_DISK)
 
const REAL & get_radius () const
 Get the radius of the disk.
 
void set_radius (const REAL &radius)
 Set the radius of the disk.
 
void set_sidedness (const SideFlags &sidedness)
 
REAL estimate_area (const GMathMatrix4x4< REAL > &xform) const
 
void compute_surface_point (GMathVec3< REAL > &position, GMathVec3< REAL > &dpdu, GMathVec3< REAL > &dpdv, GMathVec3< REAL > &normal, GMathVec3< REAL > &dndu, GMathVec3< REAL > &dndv, REAL u, REAL v) const
 
bool intersect_primitive (const GMathBasicRay< REAL > &ray, REAL &t, REAL &u, REAL &v) const
 
void init_fragment_data (FragmentEvaluationData &fragment_data, const GMathMatrix4x4< REAL > &xform) const
 
REAL compute_solid_angle (const FragmentEvaluationData &fragment_data, const GMathVec3< REAL > &position, const GMathVec3< REAL > &normal) const
 
REAL surface_sample (const GMathMatrix4x4< REAL > &xform, const FragmentEvaluationData &fragment_data, const GMathVec2< REAL > &sample, const GMathVec3< REAL > &position, GMathVec3< REAL > &direction, REAL &distance) const
 
REAL surface_pdf (const FragmentEvaluationData &fragment_data, const GMathVec3< REAL > &direction, const REAL &distance) const
 
void init_directional_fragment_data (DirectionalFragmentData &fragment_data, const GMathVec3< REAL > &position, const GMathMatrix4x4< REAL > &inv_xform) const
 
REAL direction_sample (const GMathMatrix4x4< REAL > &xform, const GMathMatrix4x4< REAL > &inv_xform, REAL det_xform, const DirectionalFragmentData &fragment_data, const GMathVec2< REAL > &sample, const GRandomDefault &rng, const GMathVec3< REAL > &position, GMathVec3< REAL > &direction, REAL &distance) const
 
REAL direction_pdf (const GMathMatrix4x4< REAL > &xform, const GMathMatrix4x4< REAL > &inv_xform, REAL det_xform, const DirectionalFragmentData &fragment_data, const GMathVec3< REAL > &position, const GMathVec3< REAL > &direction, const REAL &distance) const
 
REAL direction_sample (const GMathMatrix4x4< REAL > &xform, const GMathMatrix4x4< REAL > &inv_xform, REAL det_xform, const GMathVec2< REAL > &sample, const GRandomDefault &rng, const GMathVec3< REAL > &position, GMathVec3< REAL > &direction, REAL &distance) const
 
REAL direction_pdf (const GMathMatrix4x4< REAL > &xform, const GMathMatrix4x4< REAL > &inv_xform, REAL det_xform, const GMathVec3< REAL > &position, const GMathVec3< REAL > &direction, const REAL &distance) const
 
void init_directional_fragment_data (DirectionalFragmentData &fragment_data, const GMathVec3< REAL > &position, const DirectionalSamplingData &data) const
 
REAL direction_sample (const DirectionalSamplingData &data, const DirectionalFragmentData &fragment_data, const GMathVec2< REAL > &sample, const GRandomDefault &rng, const GMathVec3< REAL > &position, GMathVec3< REAL > &direction, REAL &distance) const
 
REAL direction_pdf (const DirectionalSamplingData &data, const DirectionalFragmentData &fragment_data, const GMathVec3< REAL > &position, const GMathVec3< REAL > &direction, const REAL &distance) const
 
REAL direction_sample (const DirectionalSamplingData &data, const GMathVec2< REAL > &sample, const GRandomDefault &rng, const GMathVec3< REAL > &position, GMathVec3< REAL > &direction, REAL &distance) const
 
REAL direction_pdf (const DirectionalSamplingData &data, const GMathVec3< REAL > &position, const GMathVec3< REAL > &direction, const REAL &distance) const
 
REAL init_ray_scatter (EquiAngularSampling< REAL > &eas, const GRandomDefault &rng, const GMathVec3< REAL > &center, const GMathVec3< REAL > &normal, const GMathMatrix4x4< REAL > &xform, const GMathBasicRay< REAL > *ray, const REAL &t_min, const REAL &t_max) const
 

Static Public Member Functions

static void init_directional_sampling_data (DirectionalSamplingData &data, const GMathMatrix4x4< REAL > &xform)
 
- Static Public Member Functions inherited from GeometryPrimitive
template<typename REAL >
static bool is_visible (SideFlags side, REAL dot_normal)
 
template<typename REAL >
static void compute_dndu_dndv (GMathVec3< REAL > &dndu, GMathVec3< REAL > &dndv, const GMathVec3< REAL > &dpdu, const GMathVec3< REAL > &dpdv, const GMathVec3< REAL > &normal, const GMathVec3< REAL > &d2pduu, const GMathVec3< REAL > &d2pduv, const GMathVec3< REAL > &d2pdvv)
 Compute the partial derivatives of the normal.
 

Protected Attributes

REAL m_radius
 
SideFlags m_side
 
UvMode m_uv_mode
 

Member Enumeration Documentation

template<typename REAL = double>
enum GeometryDiskSampler::UvMode

Parametric modes.

Enumerator:
UV_SQUARE 

the parametric coordinates are expressed on a square

UV_DISK 

the parametric coordinates are expressed on a disk