O'Reilly logo

3D Programming for Windows® by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DiffuseMaterial and Its Properties

When I introduced the DiffuseMaterial class in Chapter 1, I focused almost exclusively on its Brush property. The Brush property is null by default and without it DiffuseMaterial is entirely transparent, so obviously Brush is the most important of the class's properties.

DiffuseMaterial actually defines two additional properties named Color and AmbientColor, both of type Color and both with default values of White. Together with the Brush property and the angle of the DirectionalLight source, these two properties govern the extent to which the material reflects light. The Color property indicates the amount of reflected light from a DirectionalLight source, and the AmbientColor property indicates the amount of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required