NAME
DtMtlGetAllClrbyID - Get all the colors, shininess
and transparency for the given material.
SYNOPSIS
#include <Dt.h>
int DtMtlGetAllClrbyID ( int mtl_id, int index, float *ared, float *agreen, float *ablue, float *dred, float *dgreen, float *dblue, float *sred, float *sgreen, float *sblue, float *ered, float *egreen, float *eblue, float *shininess, float *transparency )
DESCRIPTION
DtMtlGetAllClrbyID() returns the ambient, diffuse, specular
emissive colors, the shininess and the transparency of the
material referenced by mtl_id and index. The usual usage
is to set the index to 0 while referring to the mtl_id as a
number between 0 and the maximum number of materials which
can be determined by using the DtMtlGetSceneCount(3W) command.
The values are returned via the pointers to the 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
DtMtlGetAllClrbyID() returns one on success and zero on
failure.
FILES
Link with -lDtOMio