The graphical appearance of a DisplayEntity and its subclasses is determined by its DisplayModel. The two objects work together to generate an object's display. In general, the DisplayEntity determines what is displayed, while its DisplayModel determines how it is displayed. A number of different subclasses of DisplayModel are available to match the various subclasses of DisplayEntity.
For example, the Text and TextModel objects work together to display text: the text to be displayed is determined by the Text object, while the style of the displayed text (font, bold, italics, colour, etc.) is determined by the TextModel. In this case, the TextModel plays the same role as a text style in word processing software. Users can ensure that the same text style is used for multiple Text objects by sharing the same TextModel between all these objects.
One DisplayModel can be shared between multiple DisplayEntities. This is an essential feature for the case of complex 3D content built from millions of triangles. In this case, a ColladaModel (a subclass of DisplayModel) stores 3D information that can be shared between multiple DisplayEntities. The 3D content is loaded and stored only once, even though it is displayed many times in various locations.
Although DisplayModels determine the appearance of a DisplayEntity, the DisplayModel has no graphics itself and therefore cannot be dragged and dropped in the normal manner. To create a new DisplayModel, simply duplicate an existing DisplayModel. JaamSim starts with a pre-defined example of each type of DisplayModel that can be used for this purpose. Duplicate an existing DisplayModel by right-clicking its entry in the Object Selector and selecting Duplicate, then edit its keyword values and name as necessary.
A selection of DisplayModels can be found in the Display Models palette in the Object Selector. Each type of DisplayModel is intended for specific types of DisplayEntities.
Types of DisplayModel
DisplayModel |
Description |
Usage |
TextModel |
A text style (font, colour, etc.). |
Text, OverlayText, BillboardText, and OverlayClock objects. |
PolylineModel |
A series of line segments connected by nodes. |
Selected sub-classes of DisplayEntity such as Polyline, Arrow, EntityConveyor, and EntityDelay. |
ShapeModel |
A flat geometric object such as a circle or rectangle. |
DisplayEntity and all its sub-classes. |
ImageModel |
An imported picture. |
DisplayEntity and all its sub-classes. |
ColladaModel |
An imported 3D object. |
DisplayEntity and all its sub-classes. |
GraphModel |
Formatting inputs for graphs. |
Graph object. |
All of these DisplayModel objects have the same Graphics keywords that control optional rendering and scaling at different drawing ranges.
DisplayModel Inputs
Keyword |
Description |
Graphics |
|
VisibleViews |
A list of Views for which this DisplayModel is shown. If empty, the model appears on all Views. |
DrawRange |
A list of two values for the minimum and maximum distance from the camera this object is visible. |
ModelScale |
A list of three multiplicative factors by which to scale the model in the x, y and z dimensions respectively. |