Send rays from the Camera (observer) to corresponding pixels of an HdrImage (screen), converting "u-v" Camera coordinates to "column-raw" index of the HdrImage.
Image | must be a :class:.HdrImage object that has already been initialized |
Camera | must be a descendeant of the :class:.Camera object |
Pcg | random number generator |
SamplePerSize | If SamplesPerSide is larger than zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg |
More...
|
| ImageTracer (HdrImage image, ICamera camera, PCG pcg, int samplePerSide=1) |
| Constructor with parameters. If SamplePerSide is usefull to implement the antialiasing: if it's not zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg . More...
|
|
| ImageTracer (HdrImage image, ICamera camera, int samplePerSide=1) |
| Constructor with parameters. If SamplePerSide is usefull to implement the antialiasing: if it's not zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg . More...
|
|
Ray | FireRay (int col, int row, float uPixel=0.5f, float vPixel=0.5f) |
| Shoot one light ray through image pixel of coordinates (col, row), which are measured in the same way as in HdrImage: the bottom left corner is placed at (0, 0). The parameters (uPixel, vPixel) specify where the ray should cross the pixel: (0.5f, 0.5f) represents the pixel's center. More...
|
|
void | FireAllRays (Func< Ray, Color > func) |
| Shoot several light rays crossing each of the pixels in the image. For each pixel of the HdrImage object, fire one ray and pass it to the function func , which must accept a Ray as its only parameter and must return a Color object, representing the color to assign to that pixel in the image. More...
|
|
Send rays from the Camera (observer) to corresponding pixels of an HdrImage (screen), converting "u-v" Camera coordinates to "column-raw" index of the HdrImage.
Image | must be a :class:.HdrImage object that has already been initialized |
Camera | must be a descendeant of the :class:.Camera object |
Pcg | random number generator |
SamplePerSize | If SamplesPerSide is larger than zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg |
◆ ImageTracer() [1/2]
PGENLib.ImageTracer.ImageTracer |
( |
HdrImage |
image, |
|
|
ICamera |
camera, |
|
|
PCG |
pcg, |
|
|
int |
samplePerSide = 1 |
|
) |
| |
Constructor with parameters. If SamplePerSide is usefull to implement the antialiasing: if it's not zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg
.
- Parameters
-
image | |
camera | |
pcg | |
samplePerSide | |
◆ ImageTracer() [2/2]
PGENLib.ImageTracer.ImageTracer |
( |
HdrImage |
image, |
|
|
ICamera |
camera, |
|
|
int |
samplePerSide = 1 |
|
) |
| |
Constructor with parameters. If SamplePerSide is usefull to implement the antialiasing: if it's not zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg
.
- Parameters
-
image | |
camera | |
samplePerSide | |
◆ FireAllRays()
void PGENLib.ImageTracer.FireAllRays |
( |
Func< Ray, Color > |
func | ) |
|
Shoot several light rays crossing each of the pixels in the image. For each pixel of the HdrImage
object, fire one ray and pass it to the function func
, which must accept a Ray
as its only parameter and must return a Color
object, representing the color to assign to that pixel in the image.
- Parameters
-
◆ FireRay()
Ray PGENLib.ImageTracer.FireRay |
( |
int |
col, |
|
|
int |
row, |
|
|
float |
uPixel = 0.5f , |
|
|
float |
vPixel = 0.5f |
|
) |
| |
Shoot one light ray through image pixel of coordinates (col, row), which are measured in the same way as in HdrImage: the bottom left corner is placed at (0, 0). The parameters (uPixel, vPixel) specify where the ray should cross the pixel: (0.5f, 0.5f) represents the pixel's center.
- Parameters
-
col | Type int |
row | Type int |
uPixel | Type float in the range [0, 1], default = 0.5 |
vPixel | Type float in the range [0, 1], default = 0.5 |
- Returns
The documentation for this struct was generated from the following file:
- /Users/fra/Documenti/Università/Magistrale/SNIF/PhotoGENius/PGENLib/Cameras.cs