Description
The Physical Text is a simple Physical Object that carries a text string for display within the simulation. It performs no calculations and has no effect on the dynamics or behaviour of anything around it. Its only purpose is to hold a label, along with the size and colour that label should be drawn at, so that a visualisation product can render it in the scene.
Because it derives from a Physical Object, it is positioned and oriented like any other component. It can be attached to a spacecraft, a ground station or another component, and it inherits the full transform hierarchy, so a label attached to a component follows that component as it moves. This makes it useful for annotating a scene without adding any simulation behaviour.
In a headless or data-only run the object still exists and holds its values, but nothing is drawn. The text is only meaningful when a visualisation engine is attached.
Example Use Cases
- Component Labelling: Name individual parts of a spacecraft so they can be identified in a rendered view.
- Scene Annotation: Mark locations of interest, such as a landing site or a ground target.
- Status Display: Show a readable value in the scene by updating the text string as the simulation runs.
- Presentation and Training: Add callouts and captions to a scenario being recorded or demonstrated.
Module Implementation
The object exposes three properties, all of which can be changed at any point during the simulation:
| Property | Description | Type | Default |
|---|---|---|---|
| Text | The string to display. Any characters are permitted, including letters, numbers and symbols. | String | Default Text |
| FontSize | The size of the text in points. | Integer | 12 |
| FontColor | The colour of the text as a hexadecimal string, including the leading # symbol. | String | #FFFFFF |
The font size is independent of the Scale of the object. Scaling the object resizes it within the scene, whereas the font size sets how large the glyphs are drawn relative to the object itself. The two can be combined, so a label can be scaled with its parent while keeping a fixed relative text size.
Colours follow the standard six digit hexadecimal form of red, green and blue, so #FFFFFF is white, #000000 is black and #FF0000 is red.
Assumptions/Limitations
- The object has no mass, dynamics or simulation behaviour of its own. It is a visual aid only.
- Text is only rendered when a visualisation product is attached; the values are otherwise inert.
- How the text is drawn, including the font face, alignment and whether it turns to face the viewer, is decided by the visualisation product rather than by this object.
- Only a single colour is supported for the whole string. Per character styling and rich text formatting are not available.
- No font face selection is exposed, so the visualisation product chooses the typeface.
- The colour must be supplied as a hexadecimal string. Named colours and alpha transparency are not supported.
- The text is not automatically wrapped or bounded, so a long string may extend beyond the region intended for it.