Interface IVisualFactory
Creates and manages IVisual instances for topics, and can be registered in VisualFactoryRegistry.
Namespace: Unity.SimulationPro.Foundation.Visualizations
Assembly: Unity.SimulationPro.Foundation.Visualizations.dll
Syntax
public interface IVisualFactory
Properties
CanShowDrawing
Gets a value indicating whether this factory produces visuals that support 3D drawing output.
Declaration
bool CanShowDrawing { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Connector
Gets the IConnector associated with this factory.
Declaration
IConnector Connector { get; }
Property Value
| Type | Description |
|---|---|
| IConnector |
ID
Gets the unique identifier for this factory instance, used to distinguish between multiple factories of the same type.
Declaration
string ID { get; }
Property Value
| Type | Description |
|---|---|
| string |
Name
Gets the human-readable display name of this factory.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetOrCreateVisual(IConnector, string)
Returns an existing IVisual for the given topic, or creates one if none exists.
Declaration
IVisual GetOrCreateVisual(IConnector connector, string topic)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector providing topic subscriptions. |
| string | topic | The ROS topic name. |
Returns
| Type | Description |
|---|---|
| IVisual | The IVisual instance for the topic. |