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

Transparency

In the PerspectiveSquareCuboid.xaml file, remove the markup that defines the Material property, or set the Brush property of the first DiffuseMaterial element to Transparent. Here's what you'll see:

PerspectiveSquareCuboidNoMaterial.xaml

Figure 1-23. PerspectiveSquareCuboidNoMaterial.xaml

You're actually peering inside the figure. Although the orientation is visually ambiguous, the darker square part is actually the inside rear of the figure. Because the Material property is now gone or set to a transparent brush, any triangle viewed from the front is invisible. Because the BackMaterial still exists, any triangle viewed from the rear is red. Consequently, the top, left, and ...

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