![]() |
PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
|
A normal vector in 3D space. This struct has three floating-point fields: x, y, and z.
More...
Public Member Functions | |
| Normal () | |
| Empty constructor. | |
| Normal (float x, float y, float z) | |
| Constructor with float parameters. More... | |
| override string | ToString () |
| Returns normal's components x, y, z as a string. More... | |
| Vec | ToVec () |
| Returns the Normal as a Vec. | |
| Normal | Neg () |
| Invert the direction of a normal. More... | |
| Normal | NormalizeNormal () |
| Normalize the normal, so that it's norm is equal to 1. More... | |
Static Public Member Functions | |
| static bool | are_close (Normal p, Normal q) |
| Check if two normals are similar enough to be considered equal. | |
| static Normal | operator* (Normal n, float s) |
| Returns the product between a vector and a scalar. More... | |
| static float | VecDotNormal (Vec v, Normal w) |
| Returns the dot product between a vector and a normal. More... | |
| static Vec | VecCrossNormal (Vec v, Normal w) |
| Returns the cross product between a vector and a normal. More... | |
| static Normal | NormalCrossNormal (Normal v, Normal w) |
| Returns the cross product between two normals. More... | |
| static float | SquaredNorm (Normal n) |
| Returns the squared norm of a normal. More... | |
| static float | Norm (Normal n) |
| Returns the norm of a normal. More... | |
Public Attributes | |
| float | x |
| float | y |
| float | z |
A normal vector in 3D space. This struct has three floating-point fields: x, y, and z.
| PGENLib.Normal.Normal | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Constructor with float parameters.
| x | |
| y | |
| z |
| Normal PGENLib.Normal.Neg | ( | ) |
Invert the direction of a normal.
|
static |
Returns the norm of a normal.
| n |
Returns the cross product between two normals.
| v | |
| w |
| Normal PGENLib.Normal.NormalizeNormal | ( | ) |
Normalize the normal, so that it's norm is equal to 1.
Returns the product between a vector and a scalar.
| n | |
| s |
|
static |
Returns the squared norm of a normal.
| n |
| override string PGENLib.Normal.ToString | ( | ) |
Returns normal's components x, y, z as a string.
Returns the cross product between a vector and a normal.
| v | |
| w |
Returns the dot product between a vector and a normal.
| v | |
| w |