[ Maverik Level 1 functions ]

#

mav_paletteColourIndexMatchGet

mav_paletteColourIndexMatchGet, mav_paletteMaterialIndexMatchGet, mav_paletteTextureIndexMatchGet, mav_paletteLightIndexMatchGet, mav_paletteFontIndexMatchGet

## Summary

Return a matching index in the palette.

## 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);

- MAV_palette *p
  Palette to query

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

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

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

- float er, eg, eb, ea
  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.

Back to the index page.