Class PointCloud2VisualizerSettings
ScriptableObject settings for the PointCloud2 visualizer. Configures which message fields map to XYZ position, color channels, and point size, as well as the color mode used to compute per-point colors.
Inheritance
Inherited Members
Namespace: Unity.SimulationPro.Foundation.Visualizations
Assembly: Unity.SimulationPro.Foundation.Visualizations.dll
Syntax
[CreateAssetMenu(fileName = "PointCloud2VisualizerSettings", menuName = "Robotics/Sensor Visualizers/PointCloud2", order = 1)]
public class PointCloud2VisualizerSettings : VisualizerSettingsGeneric<PointCloud2Msg>
Properties
BChannel
Gets or sets the field name used for the blue channel when PointCloud2VisualizerSettings.ColorMode is SeparateRGB.
Declaration
public string BChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
BRange
Gets or sets the [min, max] range over which the blue channel value is normalized.
Declaration
public float[] BRange { get; set; }
Property Value
| Type | Description |
|---|---|
| float[] |
Channels
Gets or sets the names of all fields present in the most recently received message.
Declaration
public string[] Channels { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
ColorModeSetting
Gets or sets the active color mode for deriving per-point colors from message fields.
Declaration
public PointCloud2VisualizerSettings.ColorMode ColorModeSetting { get; set; }
Property Value
| Type | Description |
|---|---|
| PointCloud2VisualizerSettings.ColorMode |
GChannel
Gets or sets the field name used for the green channel when PointCloud2VisualizerSettings.ColorMode is SeparateRGB.
Declaration
public string GChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
GRange
Gets or sets the [min, max] range over which the green channel value is normalized.
Declaration
public float[] GRange { get; set; }
Property Value
| Type | Description |
|---|---|
| float[] |
GlobalColor
Gets or sets the fallback color used when no color channel mapping is active.
Declaration
public Color GlobalColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
HueChannel
Gets or sets the field name used as the HSV hue source when PointCloud2VisualizerSettings.ColorMode is HSV.
Declaration
public string HueChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HueRange
Gets or sets the [min, max] range over which the hue channel value is normalized when PointCloud2VisualizerSettings.ColorMode is HSV.
Declaration
public float[] HueRange { get; set; }
Property Value
| Type | Description |
|---|---|
| float[] |
RChannel
Gets or sets the field name used for the red channel when PointCloud2VisualizerSettings.ColorMode is SeparateRGB.
Declaration
public string RChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RRange
Gets or sets the [min, max] range over which the red channel value is normalized.
Declaration
public float[] RRange { get; set; }
Property Value
| Type | Description |
|---|---|
| float[] |
RgbChannel
Gets or sets the field name that contains the packed RGB value when PointCloud2VisualizerSettings.ColorMode is CombinedRGB.
Declaration
public string RgbChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Size
Gets or sets the base point radius in world units used when UseSizeChannel is false.
Declaration
public float Size { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
SizeChannel
Gets or sets the field name used as a per-point radius source when UseSizeChannel is true.
Declaration
public string SizeChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SizeRange
Gets or sets the [min, max] range over which the size channel value is normalized to compute per-point radius.
Declaration
public float[] SizeRange { get; set; }
Property Value
| Type | Description |
|---|---|
| float[] |
UseRgbChannel
Gets or sets whether a color channel drives per-point colors rather than the global color.
Declaration
public bool UseRgbChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UseSizeChannel
Gets or sets whether a size channel drives per-point radius rather than the fixed Size.
Declaration
public bool UseSizeChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
XChannel
Gets or sets the field name used as the X coordinate.
Declaration
public string XChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
YChannel
Gets or sets the field name used as the Y coordinate.
Declaration
public string YChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ZChannel
Gets or sets the field name used as the Z coordinate.
Declaration
public string ZChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
CreateGUI(PointCloud2Msg, MessageMetadata)
Creates a GUI callback that renders an Inspector panel for the message data.
Declaration
public override Action CreateGUI(PointCloud2Msg message, MessageMetadata meta)
Parameters
| Type | Name | Description |
|---|---|---|
| PointCloud2Msg | message | The message data to visualize. |
| MessageMetadata | meta | Metadata about the received message (topic, timestamp, frame). |
Returns
| Type | Description |
|---|---|
| Action | An action that draws the GUI. |
Overrides
Draw(Drawing3d, PointCloud2Msg, MessageMetadata, Transform)
Draws a 3D visualization of the message data.
Declaration
public override void Draw(Drawing3d drawing, PointCloud2Msg message, MessageMetadata meta, Transform visualizerTransform)
Parameters
| Type | Name | Description |
|---|---|---|
| Drawing3d | drawing | The 3D drawing context to render into. |
| PointCloud2Msg | message | The message data to visualize. |
| MessageMetadata | meta | Metadata about the received message (topic, timestamp, frame). |
| Transform | visualizerTransform | The visualizerTransform. |