Photon Engine 2.0.0-beta
A physically based renderer.
|
A hemisphere in 3-D space. More...
#include <THemisphere.h>
Public Member Functions | |
THemisphere ()=default | |
THemisphere (T radius) | |
T | 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 () |
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.
|
default |
|
inlineexplicit |
|
inline |
The area of the dome part.
|
inlinestatic |
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |