Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::math::THemisphere< T > Class Template Referencefinal

A hemisphere in 3-D space. More...

#include <THemisphere.h>

Public Member Functions

 THemisphere ()=default
 
 THemisphere (T radius)
 
getArea () const
 The area of the dome part.
 
TVector3< T > sampleToSurfaceArchimedes (const std::array< T, 2 > &sample) const
 Map the 2D sample to a position on the surface of the hemisphere.
 
TVector3< T > sampleToSurfaceArchimedes (const std::array< T, 2 > &sample, T *out_pdfA) const
 
TVector3< T > sampleToSurfaceCosThetaWeighted (const std::array< T, 2 > &sample) const
 
TVector3< T > sampleToSurfaceCosThetaWeighted (const std::array< T, 2 > &sample, T *out_pdfA) const
 
TVector3< T > sampleToSurfaceCosLobeWeighted (const std::array< T, 2 > &sample, T exponent) const
 
TVector3< T > sampleToSurfaceCosLobeWeighted (const std::array< T, 2 > &sample, T exponent, T *out_pdfA) const
 

Static Public Member Functions

static THemisphere makeUnit ()
 

Detailed Description

template<typename T>
class ph::math::THemisphere< T >

A hemisphere in 3-D space.

The hemisphere is facing up (y-axis) and does not include the disk part at the bottom. The origin of the hemisphere is located at the center of the full sphere.

Constructor & Destructor Documentation

◆ THemisphere() [1/2]

template<typename T >
ph::math::THemisphere< T >::THemisphere ( )
default

◆ THemisphere() [2/2]

template<typename T >
ph::math::THemisphere< T >::THemisphere ( T radius)
inlineexplicit

Member Function Documentation

◆ getArea()

template<typename T >
T ph::math::THemisphere< T >::getArea ( ) const
inline

The area of the dome part.

◆ makeUnit()

template<typename T >
THemisphere< T > ph::math::THemisphere< T >::makeUnit ( )
inlinestatic

◆ sampleToSurfaceArchimedes() [1/2]

template<typename T >
TVector3< T > ph::math::THemisphere< T >::sampleToSurfaceArchimedes ( const std::array< T, 2 > & sample) const
inline

Map the 2D sample to a position on the surface of the hemisphere.

A common mapping method that is based on Archimedes' derivation that the horizontal slices of a sphere have equal area. The mapped positions are distributed uniformly if the sample is uniform. For a unit hemisphere, this method effectively generates normalized directions.

◆ sampleToSurfaceArchimedes() [2/2]

template<typename T >
TVector3< T > ph::math::THemisphere< T >::sampleToSurfaceArchimedes ( const std::array< T, 2 > & sample,
T * out_pdfA ) const
inline

◆ sampleToSurfaceCosLobeWeighted() [1/2]

template<typename T >
TVector3< T > ph::math::THemisphere< T >::sampleToSurfaceCosLobeWeighted ( const std::array< T, 2 > & sample,
T exponent ) const
inline

◆ sampleToSurfaceCosLobeWeighted() [2/2]

template<typename T >
TVector3< T > ph::math::THemisphere< T >::sampleToSurfaceCosLobeWeighted ( const std::array< T, 2 > & sample,
T exponent,
T * out_pdfA ) const
inline

◆ sampleToSurfaceCosThetaWeighted() [1/2]

template<typename T >
TVector3< T > ph::math::THemisphere< T >::sampleToSurfaceCosThetaWeighted ( const std::array< T, 2 > & sample) const
inline

◆ sampleToSurfaceCosThetaWeighted() [2/2]

template<typename T >
TVector3< T > ph::math::THemisphere< T >::sampleToSurfaceCosThetaWeighted ( const std::array< T, 2 > & sample,
T * out_pdfA ) const
inline

The documentation for this class was generated from the following file: