< Zurück | Inhalt | Weiter >

9.5 Material

java.lang.Object

|

+−−javax.media.j3d.SceneGraphObject

|

+−−javax.media.j3d.NodeComponent

|

+−−javax.media.j3d.Material


Table 9.3 Capability bits for the Material class


COMPONENT

OpenGL Reference: glColorMaterial, glMaterial

The Material class specifies surface rendering characteristics (table 9.3) using the following parameters:


Surface colors

Ambient Diffuse Emissive Specular

Lighting enable: Controls whether lighting is enabled for the Shape3D.

Shininess: Gloss parameter that controls the effect of specular lighting.


The effects of the various colors specified within the Material are described in detail in the context of lighting in chapter 10. Figure 9.7 shows a cube rendered with an applied Material, and per−vertex colors on four vertices of the cube.


image


Figure 9.7 Appearance with an applied Material with Ambient, Diffuse, Emissive, and Specular colors. Lighting calculations determine the shade of each surface