material derived from ygNode Example Source Header

Description: adjusts the material properties of all nodes below it

notes:
Category: Attributes
Author: Alex Hill
11/01/01
04/01/04 Alex Hill - added "alpha" message to adjust transparency
Revision: 07/01/05 Alex Hill - fixed initial message bug and removed relative mode

    Messages
ambient three floats set the ambient color of the material
diffuse three floats set the diffuse color of the material
emission three floats set the emission color of the material
specular three floats set the specular color of the material
shininess float set the shininess of the material
alpha float set the alpha of the material
    Comments

constructor material

1 dont include in documentation

destructor ~material

method reset

1 reset all colors and shininess to zero

method message

1 set the ambient color of the material
2 set the diffuse color of the material
3 set the emission color of the material
4 set the specular color of the material
5 set the shininess of the material
6 set the alpha of the material
7 set the change status of the material

method app

1 if changed then set the geoset list

method setGSetList

1 if node type is a pfGeode
1.1 for each geoset
1.1.1 add geoset to the geoset list
2 else, if node type is a pfText
2.1 for each string
2.1.1 add geoset to the geoset list
3 else, if node type is a pfGroup
3.1 call setGSetList recursively on all children

method setColor

method setShininess

method setAlpha