3Image::Image(
const uint8_t* data,
const uint8_t* rgbColors,
unsigned int xPixels,
unsigned int yPixels, uint8_t colors) {
Defines an Image material for rendering images as textures in 3D rendering.
void SetColorPalette(const uint8_t *rgbColors)
Sets the color palette.
unsigned int xPixels
The width of the image in pixels.
void SetPosition(Vector2D offset)
Sets the position offset of the image.
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.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Calculates the RGB color at a specific position.
const uint8_t * rgbColors
Pointer to the color palette.
void SetSize(Vector2D size)
Sets the size of the image.
void SetData(const uint8_t *data)
Sets the image data.
Vector2D offset
The offset position of the image.
float angle
The rotation angle of the image in degrees.
uint8_t colors
The number of colors in the palette.
Image(const uint8_t *data, const uint8_t *rgbColors, unsigned int xPixels, unsigned int yPixels, uint8_t colors)
Constructs an Image material.
void SetRotation(float angle)
Sets the rotation angle of the image.
void SetHueAngle(float hueAngle)
Sets the hue adjustment angle of the image.
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.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Vector2D Rotate(const float &angle, const Vector2D &offset) const
Rotates this vector by a specified angle (in degrees or radians) around a given offset.
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.