API_​MaterialType

Description of a surface material attribute.

    typedef struct {
        API_Attr_Head       head;
        Int32               filler_1;
        API_MaterTypeID     mtype;
        short               ambientPc;
        short               diffusePc;
        short               specularPc;
        short               transpPc;
        short               shine;
        short               transpAtt;
        short               emissionAtt;
        short               filler_2;
        API_RGBColor        surfaceRGB;
        API_RGBColor        specularRGB;
        API_RGBColor        emissionRGB;
        API_AttributeIndex  ifill;
        short               fillCol;
        short               filler_3;
        API_Texture         texture;
    } API_MaterialType;

 

Members

head
Contains the header information, including type and database index.
mtype
The type of the material. Usable values are enumerated in API_MaterTypeID.
ambientPc
The reflection of ambient light. [0..100]
diffusePc
The reflection of diffuse light. [0..100]
specularPc
The reflection of specular light. [0..100]
transpPc
Transparency factor. [0..100]
shine
The shininess factor multiply by 100. [0..10000]
transpAtt
The transparency attenuation multiply by 100. [0..400]
emissionAtt
The emission attenuation factor multiply by 100. [0..65535]
surfaceRGB
The color of the surface.
specularRGB
The specular color.
emissionRGB
The emission color.
ifill
Internal use
fillCol
Color number of defined 3D hatch (0 means: use BODY color)
texture
The texture of the material.

 

Remarks

This attribute type is also used by the 3D components. The material of a 3D polygon can be accessed through the API_UmatType structure.

There is no additional data assigned to material attributes in the API_AttributeDef structure.

Pay attention to the texture member if its fileLoc pointer is dynamically allocadted.

 

Requirements

Version: API 1.3 or later
Header: APIdefs_Attributes.h

 

See Also

API_RGBColor, API_Texture, API_UmatType, API_Attr_Head, API_MaterTypeID, API_Attribute, API_AttributeIndex,
Attribute Manager, API Types