Examples

The hollow cylinders shown in Figure 187 are drawn with the special purpose attribute bundles created in the code fragment below. To keep the code fragment concise, creating the cylinders and calling the Draw functions are not shown.


    1  TFrameBundle3D frameBundle( TRGBColor( 0,0,0 ), 5.0 );
    2  THairlineFrameBundle3D hairFrameBundle( TRGBColor( 0, 0, 0 ) );
    3  TFillBundle3D fillBundle( TRGBColor( 0.75, 0.75, 0.75 ) );
Line 1: Frame bundle with black frame, 5.0 world-coordinate unit pen width, and the default, kCenterFrame, pen balance to center the frame over the geometry border.

Line 2: Hairline frame bundle with a black hairline frame that efficiently draws a thin, centered frame.

Line 3: Fill bundle that defines a light gray fill. The default reflectance shader and scene bundle attributes are inherited. The shader uses the fill color and lighting information in the scene bundle to compute the final color of the fill. In this example, darker grays and colors appear black. You can adjust the appearance of darker grays and colors by adjusting the lighting in the scene bundle as described in Chapter 17.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker