NAME
DtMtlGetDiffuseClr - Get the diffuse color of the given
material.
SYNOPSIS
#include <Dt.h>
int DtMtlGetDiffuseClr( char *name, int index, float *red, float *green, float *blue )
DESCRIPTION
DtMtlGetDiffuseClr() returns the diffuse color of the
material name. The diffuse color is returned via the
pointers to the red, green, and blue parameters. The index
parameter should be set to 0.
Some implementations of Dt support multiple sub-materials
within a single group, with the different sub-materials
being indexed by the index parameter. A group will have a
single material, with different sets of colors for different
regions indexed by the index parameter. In such
implementations, DtMtlGetDiffuseClr() will return an RGB
value for each indexed sub-material in the material.
OPENMODEL IMPLEMENTATION
The OpenModel implementation of Dt does not support multiple
color sets in a single material. A warning message is
printed if the index parameter is non-zero but the parameter
is otherwise ignored. Colors per vertex are implemented
using DtShapeGetVerticesColor(3W).
DIAGNOSTICS
DtMtlGetDiffuseClr() returns one on success and zero on
failure.
FILES
Link with -lDtOMio