#include <string>
#include <tuple>
#include <cmath>
#include "vec3.hpp"
#include "struct.hpp"
#include "object.hpp"
Go to the source code of this file.
|
void | print (std::string str) |
| print a string More...
|
|
double | RGBtosRGB (double l) |
| Translate color from linear RGB to sRGB. More...
|
|
double | sRGBtoRGB (double l) |
| Translate color from sRGB to linear RGB. More...
|
|
void | setImageColor (Image &img, RGBA rgba, int x, int y) |
| Set the Image Color at pixel (x,y) based on the RGBA input. More...
|
|
double | setExpose (double c) |
|
ObjectInfo | unpackIntersection (const ObjectInfo &sphere, const ObjectInfo &plane) |
|
std::tuple< double, double, double > | getBarycentric (const Triangle &tri, const point3 &point) |
|
double | randD (double start, double end) |
|
double | standerdD (double stddev) |
|
point3 | spherePoint () |
|
void | print (int i) |
|
void | print (double f) |
|
void | printErr (std::string str) |
|
- Author
- Jin (jinj2.nosp@m.@ill.nosp@m.inois.nosp@m..edu)
- Version
- 0.1
- Date
- 2024-11-06
- Copyright
- Copyright (c) 2024
◆ print()
◆ RGBtosRGB()
double RGBtosRGB |
( |
double |
l | ) |
|
Translate color from linear RGB to sRGB.
- Parameters
-
- Returns
- double sRGB value. (0~1)
◆ setImageColor()
void setImageColor |
( |
Image & |
img, |
|
|
RGBA |
rgba, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Set the Image Color at pixel (x,y) based on the RGBA input.
- Parameters
-
img | The image to set. |
rgba | The color to use, in linear RGB color space. |
x | x coordinate of the pixel. |
y | y coordinate of the pixel. |
◆ sRGBtoRGB()
double sRGBtoRGB |
( |
double |
l | ) |
|
Translate color from sRGB to linear RGB.
- Parameters
-
- Returns
- double Linear RGB value.(0~1)