3UVMap::UVMap(
const uint8_t* data,
const uint8_t* rgbColors, uint16_t xPixels, uint16_t yPixels, uint8_t colors)
4 :
Image(data, rgbColors, xPixels, yPixels, colors) {
A material class for mapping UV texture coordinates to RGB colors.
Represents an image-based material with support for transformations and palette adjustments.
unsigned int xPixels
The width of the image in pixels.
const uint8_t * data
Pointer to the image data.
float hueAngle
The hue adjustment angle of the image.
unsigned int yPixels
The height of the image in pixels.
const uint8_t * rgbColors
Pointer to the color palette.
uint8_t colors
The number of colors in the palette.
Vector2D size
The size of the image.
static T Map(T value, T inLow, T inMax, T outMin, T outMax)
Maps a value from one range to another.
Represents an RGB color and provides methods for manipulation.
RGBColor HueShift(const float &hueDeg)
Shifts the hue of the color by a specified angle in degrees.
UVMap(const uint8_t *data, const uint8_t *rgbColors, uint16_t xPixels, uint16_t yPixels, uint8_t colors)
Constructs a UVMap with the given image data and color palette.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Retrieves the RGB color at a given 3D position using UV mapping.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
float X
The X-component of the 2D vector.
float Y
The Y-component of the 2D vector.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
float X
The X-component of the 3D vector.
float Y
The Y-component of the 3D vector.