Download SIMSCRIPT III 3d Graphics Manual

Transcript
Figure 6.16: Example 9 output.
6.8 Text
There are many uses for graphic text in a simulation. For example, state information may
need to be displayed for an object being simulated. Or maybe the object needs to be
“tagged” with a unique text string so that it can be identified. Of course its possible that
text is “part of” the and object being simulated (like a traffic sign). SIMSCRIPT III 3d
graphics allows both scalable and non-scalable text to be display in a 3dworld. The class
used for text display is called 3detext and is derived from the 3dgraphic class.
The 3dtext class can be used to show a simple 1-line or multi-line text string within the
scene-graph. Currently, only predefined fonts are available as class attribute pointers that
can be assigned to the font attribute. These fonts are automatically initialized before the
SIMSCRIPT program is run. The choice of font affects not only the appearance of the
text but also its behavior. The application may require the text to act like part of the
scene, in other words to obey the same rules as any other geometric shape with regard to
62