#include <lightshaders/CylindricalEnvironment.h>
Inheritance diagram for CylindricalEnvironment:

Public Member Functions | |
| CylindricalEnvironment (const Image *image) | |
| void | estimateRadiance (const HitRecord &rec, Context &context, Vector3 &w_in, double &distance, rgb &radiance) const |
| rgb | estimateBGRadiance (const HitRecord &rec, const Vector3 &w_in, Context &context) const |
| bool | sampleDirection (const HitRecord &rec, Context &context, Vector3 &w_in, double &pdf) const |
| double | pdfDirection (const Vector3 &w_in, const HitRecord &rec, Context &context) const |
| rgb | value (const Vector3 &direction) const |
| void | directionToUV (const Vector3 &direction, unsigned int &u, unsigned int &v) const |
| given a direction, find the image coordinates (u,v) | |
| Vector3 | UVtoDirection (unsigned int u, unsigned int v) const |
| given a pixel, find the corresponding direction | |
Public Attributes | |
| EnvironmentSampler * | env_sampler |
| EnvironmentSampler for looking up probabilities and generating samples. | |
| const Image * | environment |
| The actual environment map image. | |
| unsigned int | w |
| stored width and height of the image (for performance) | |
| unsigned int | h |
|
||||||||||||||||||||||||
|
Estimate the radiance this light deposits towards a point in the scene. The light should not attempt an intersection with the scene to determine if an occlusion exists. Occlusion testing can be performed by the caller with the retured 'w_in' and 'distance'. Singular light sources, such as point lights, would only implement this function and allow the caller to test for occlusion. LightShaders intended for area lights may also implement this function as it may allow for importance sampling of luminaires based on estimated radiance.
Reimplemented from LightShader. |
|
||||||||||||||||
|
Estimate the radiance this light produces along the ray given by the input direction and the hit point in rec. This function is intended for background environments and should be called for rays that leave the scene without intersecting any geometry.
Reimplemented from LightShader. |
|
||||||||||||||||||||
|
Attempt to generate a directional sample towards this light source.
Reimplemented from LightShader. |
|
||||||||||||||||
|
Evaluate the pdf of generating the sampled direction.
Reimplemented from LightShader. |
1.4.3