Design objects are graphics designs that are built using BGL graphics commands. Some of the BGL commands used to create objects are:
For information on all the specific object commands in BGL, see the topic BGL Opcode Usage Guide. In BGL, a single POINT command is considered an element that was designed using object design as opposed to seed design. The following example shows the simplest of object designs, a single point in 3-D space.
Point125,22,-450
Although a single POINT command is considered a small object design element and a 3-D location is specified with the POINT command, the meaning of this design is incomplete until the location and color are specified by the SCALE and COLOR commands, respectively. The SCALE command specifies the world location and scale factor of the point, and the COLOR command specifies its color. The following example shows the object design with scale and color specified.
SCALEobject_end,2000,20,S_12,0046fcb1h,0,0c1b33180h,0,180,0
LCOLORC_YELLOW
Point125,22,-450
object_endlabelword
The SCALE command specifies the location of the 3-D design space in the real world and aligns the 0,0,0 point of the X,Y,Z design grid at the specified East, North, and altitude specified in the command (the 0046fcb1h,0,0c1b33180h,0,180,0
fields). The SCALE command specifies that all BGL commands between it and the object_end label branch if the plane is geographically so far away that this point will not be visible (the object_end,2000,20
, field). The SCALE command also specifies that the 3-D coordinates used in the POINT command are at design scale factor 12; this translates into 62.5mm per unit. As a result, the point’s X coordinate is 7.8125 meters (125 x 62.5mm) away from the origin on the X axis. Finally, the LCOLOR command specifies that the point is yellow. This information included in the preceding example of the SCALE command is enough to completely depict the point's location and appearance. The object design created by the example could appear in a piece of scenery design, within a module in Flight Simulator, or in an application
The most common way that the BGL graphics interpreter accesses and interprets the BGL code is from a scenery file or BGL file. One thing to keep in mind is the what an "object" is in relation to a BGL file. In a BGL file, object entities are used to group sections of object-oriented scenery designs into large groups called “objects.” The scenery display system’s front-end processor scans scenery BGL files on disk and pulls in object entities that are within viewing range to be displayed. Objects, in this context, are pieces of scenery defined by the OBJECT command.
Another use of the term "object" becomes apparent when using the ADDOBJ command. The BGL graphics interpreter has a radsort system that interprets a group of objects, sorts their distance from the user, and draws the objects in a farthest to nearest order, using the painters algorithm to accomplish hidden surface removal. Radsort means radial sort, and that's exactly what the radsort system does. An object in this context consists of a SCALE command, some graphics design commands (points, lines, surfaces) followed by a BGL_RETURN command (much like a graphics subroutine). The distance between the object and the user is, as far as the radsort system is concerned, the distance of the initial SCALE command from the user.