mav_paletteColourIndexMatchGet(3)

NAME
mav_paletteColourIndexMatchGet - Return a matching index in the palette.

LEVEL
Maverik Level 1

SYNTAX
int mav_paletteColourIndexMatchGet(MAV_palette *p, float ar, float ag, float ab, float aa);

int mav_paletteMaterialIndexMatchGet(MAV_palette *p, float ar, float ag, float ab, float aa, float dr, float dg, float db, float da, float sr, float sg, float sb, float sa, float er, float eg, float eb, float ea, float shin);

int mav_paletteTextureIndexMatchGet(MAV_palette *p, char *name);

int mav_paletteLightIndexMatchGet(MAV_palette *p, float ar, float ag, float ab, float aa, float dr, float dg, float db, float da, float sr, float sg, float sb, float sa);

int mav_paletteFontIndexMatchGet(MAV_palette *p, char *name);

ARGUMENTS

MAV_palette *p
    Palette to query

float ar,
    Ambient R, G, B, A (0.0-1.0).

float dr,
    Diffuse R, G, B, A (0.0-1.0).

float sr,
    Specular R, G, B, A (0.0-1.0).

float er,
    Emissive R, G, B, A (0.0-1.0).

float shin
    Shininess (specular Phong exponent) (0.0-128.0)

char *name
    File or font name

DESCRIPTION
These functions return the index of the first matching relevant component in a given palette. If no matching index can be found -1 returned.