|
| | Color (double r, double g, double b) |
| | Creates a new color with the specified normalized red, green, and blue components.
|
| |
| | Color (int r, int g, int b, int colorDepth=8) |
| | Creates a new color with the specified red, green, and blue components and the specified color depth.
|
| |
| | Color (Vector3 vector3) |
| | Creates a new color with the specified Vector3 components as normalized RGB values.
|
| |
| Color & | clamp () |
| | Clamps the components of this color to the range \([0, 1]\).
|
| |
| double | luminance () const |
| | Returns the luminance of this color.
|
| |
| | Vector3 (double _x, double _y, double _z) |
| | Creates a new 3D vector with the specified components.
|
| |
| | Vector3 (double _x, double _y, double _z) |
| | Creates a new 3D vector with the specified components.
|
| |
| Vector3 | clone () const |
| | Returns a copy of this 3D vector.
|
| |
| Vector3 & | copy (const Vector3 &source) |
| | Copies the components of the specified 3D vector to this 3D vector.
|
| |
| Vector3 & | set (double _x, double _y, double _z) |
| | Sets the components of this vector.
|
| |
| double | length () const |
| | Returns the length of this 3D vector.
|
| |
| Vector3 | unit () const |
| | Returns the unit vector of this 3D vector.
|
| |
| Vector3 & | normalize () |
| | Normalizes this 3D vector.
|
| |
| Vector3 | absolute () const |
| | Returns a new 3D vector with the absolute values of the components of this 3D vector.
|
| |
| Vector3 & | abs () |
| | Sets the components of this 3D vector to their absolute values.
|
| |
| Vector3 & | clamp (const Vector3 &min, const Vector3 &max) |
| | Clamps the components of this 3D vector to the specified minimum and maximum 3D vectors component-wise.
|
| |
| Vector3 & | clamp (double min, double max) |
| | Clamps the components of this 3D vector to the specified minimum and maximum values.
|
| |
| double | operator[] (std::size_t index) const |
| | Returns the component at the specified index of this 3D vector.
|
| |
| Vector3 & | operator+= (const Vector3 &v) |
| | Adds the specified 3D vector to this vector.
|
| |
| Vector3 & | operator+= (double s) |
| | Adds the specified constant to all components in this 3D vector.
|
| |
| Vector3 & | operator-= (const Vector3 &v) |
| | Subtracts the specified 3D vector from this vector.
|
| |
| Vector3 & | operator-= (double s) |
| | Subtracts the specified constant from all components in this 3D vector.
|
| |
| Vector3 & | operator*= (const Vector3 &v) |
| | Multiplies the components of this vector with the corresponding components of the specified 3D vector.
|
| |
| Vector3 & | operator*= (double s) |
| | Multiplies all components of this 3D vector with the specified constant.
|
| |
| Vector3 & | operator/= (const Vector3 &v) |
| | Divides the components of this vector by the corresponding components of another 3D vector.
|
| |
| Vector3 & | operator/= (double s) |
| | Divides the components of this 3D vector by the specified constant.
|
| |
The color class.
The class inherits from Vector3 and the x, y, and z components map to the normalized red, green, and blue components of the color, respectively.