Class GuiVisualizer<T>.GuiVisual
Subscribes to a topic and delegates GUI rendering to the parent GuiVisualizer<T>.
Implements
Inherited Members
Namespace: Unity.SimulationPro.Foundation.Visualizations
Assembly: Unity.SimulationPro.Foundation.Visualizations.dll
Syntax
public class GuiVisualizer<T>.GuiVisual : IVisual
Constructors
GuiVisual(IConnector, string, GuiVisualizer<T>)
Creates a new GuiVisualizer<T>.GuiVisual and subscribes to the specified topic.
Declaration
public GuiVisual(IConnector connector, string topic, GuiVisualizer<T> factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector to subscribe on. |
| string | topic | ROS topic name. |
| GuiVisualizer<T> | factory | The parent factory used for GUI creation. |
Properties
IsDrawingEnabled
The is drawing enabled.
Declaration
public bool IsDrawingEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
hasAction
Gets a value indicating whether a GUI action has been generated for the current message.
Declaration
public bool hasAction { get; }
Property Value
| Type | Description |
|---|---|
| bool |
hasDrawing
Always false; GUI visualizers do not produce 3D drawings.
Declaration
public bool hasDrawing { get; }
Property Value
| Type | Description |
|---|---|
| bool |
message
Gets the most recently received message, or the default value if no message has arrived yet.
Declaration
public T message { get; }
Property Value
| Type | Description |
|---|---|
| T |
meta
Gets the metadata associated with the most recently received message.
Declaration
public MessageMetadata meta { get; }
Property Value
| Type | Description |
|---|---|
| MessageMetadata |
Methods
AddMessage(IMessage)
Stores the incoming message and clears the cached GUI action so it will be regenerated on the next OnGUI() call.
Declaration
public void AddMessage(IMessage message)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessage | message | The message data to visualize. |
OnGUI()
On GUI.
Declaration
public void OnGUI()
Redraw()
Redraw.
Declaration
public void Redraw()
SetDrawingEnabled(bool)
No-op; this visual is GUI-only and has no 3D drawing.
Declaration
public void SetDrawingEnabled(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | Whether drawing should be enabled. |