Class Visualizer
This is a singleton class used for drawing points and paths for visualizatoin purposes.
You can add points and paths with a string key tag for easy selective destroying of visualization objects.
Note: Visualizer object is not needed for drawing VisualElement objects.
Inheritance
System.Object
Visualizer
Assembly: cs.temp.dll.dll
Syntax
public class Visualizer : Singleton<Visualizer>
Fields
DrawFilter
Declaration
public Visualizer.FilterValues DrawFilter
Field Value
Methods
AddArrow(Arrow, String)
Declaration
public void AddArrow(Arrow arrow, string key)
Parameters
Type |
Name |
Description |
Arrow |
arrow |
|
System.String |
key |
|
AddArrow(Vector3, Vector3, String, Single, Color)
Declaration
public Arrow AddArrow(Vector3 startPoint, Vector3 endPoint, string key, float radius, Color color)
Parameters
Type |
Name |
Description |
Vector3 |
startPoint |
|
Vector3 |
endPoint |
|
System.String |
key |
|
System.Single |
radius |
|
Color |
color |
|
Returns
AddArrow(Vector3, Vector3, String, Single, Color, Single, Color)
Declaration
public Arrow AddArrow(Vector3 startPoint, Vector3 endPoint, string key, float radius, Color color, float headRadius, Color headColor)
Parameters
Type |
Name |
Description |
Vector3 |
startPoint |
|
Vector3 |
endPoint |
|
System.String |
key |
|
System.Single |
radius |
|
Color |
color |
|
System.Single |
headRadius |
|
Color |
headColor |
|
Returns
AddLine(Vector3, Vector3, String)
Declaration
public Line AddLine(Vector3 startPoint, Vector3 endPoint, string key)
Parameters
Type |
Name |
Description |
Vector3 |
startPoint |
|
Vector3 |
endPoint |
|
System.String |
key |
|
Returns
AddLine(Vector3, Vector3, String, Single)
Declaration
public Line AddLine(Vector3 startPoint, Vector3 endPoint, string key, float thickness)
Parameters
Type |
Name |
Description |
Vector3 |
startPoint |
|
Vector3 |
endPoint |
|
System.String |
key |
|
System.Single |
thickness |
|
Returns
AddLine(Vector3, Vector3, String, Single, Color)
Declaration
public Line AddLine(Vector3 startPoint, Vector3 endPoint, string key, float thickness, Color color)
Parameters
Type |
Name |
Description |
Vector3 |
startPoint |
|
Vector3 |
endPoint |
|
System.String |
key |
|
System.Single |
thickness |
|
Color |
color |
|
Returns
AddPath(List<Vector3>, String)
Creates Path object for visualizer to draw from given positions list
Declaration
public Path AddPath(List<Vector3> pointsInWorld, string key)
Parameters
Type |
Name |
Description |
List<Vector3> |
pointsInWorld |
List of positions for path initialization
|
System.String |
key |
String key tag
|
Returns
AddPath(List<Vector3>, String, Color)
Creates Path object for visualizer to draw from given positions list from given positions list and sets point color
Declaration
public Path AddPath(List<Vector3> pointsInWorld, string key, Color _pointColor)
Parameters
Type |
Name |
Description |
List<Vector3> |
pointsInWorld |
List of positions for path initialization
|
System.String |
key |
String key tag
|
Color |
_pointColor |
Point color
|
Returns
AddPath(Path, String)
Adds Path object for visualizer to draw
Declaration
public void AddPath(Path path, string key)
Parameters
Type |
Name |
Description |
Path |
path |
Path object
|
System.String |
key |
String key tag
|
AddPoint(Point, String)
Declaration
public void AddPoint(Point point, string key)
Parameters
Type |
Name |
Description |
Point |
point |
|
System.String |
key |
|
AddPoint(Vector3, String)
Adds single point for visualizer to draw
Declaration
public Point AddPoint(Vector3 pointInWorld, string key)
Parameters
Type |
Name |
Description |
Vector3 |
pointInWorld |
Position in space
|
System.String |
key |
String key tag
|
Returns
AddPoint(Vector3, String, Single)
Adds single point for visualizer to draw and sets it's size
Declaration
public Point AddPoint(Vector3 pointInWorld, string key, float pointSize)
Parameters
Type |
Name |
Description |
Vector3 |
pointInWorld |
Position in space
|
System.String |
key |
String key tag
|
System.Single |
pointSize |
Point size
|
Returns
AddPoint(Vector3, String, Single, Color)
Adds single point for visualizer to draw and sets it's size and color
Declaration
public Point AddPoint(Vector3 pointInWorld, string key, float pointSize, Color pointColor)
Parameters
Type |
Name |
Description |
Vector3 |
pointInWorld |
Position in space
|
System.String |
key |
String key tag
|
System.Single |
pointSize |
Point size
|
Color |
pointColor |
Point color
|
Returns
AddPointCloud(PointCloud, String)
Declaration
public PointcloudMesh AddPointCloud(PointCloud pc, string key)
Parameters
Type |
Name |
Description |
PointCloud |
pc |
|
System.String |
key |
|
Returns
Type |
Description |
PointcloudMesh |
|
Creates Labust.Visualization.Primitives.Transform object for visualizer to draw
from UnityEngine.Transform
Declaration
public Transform AddTransform(UnityEngine.Transform transform, string key)
Parameters
Type |
Name |
Description |
UnityEngine.Transform |
transform |
Transform
|
System.String |
key |
|
Returns
CheckKeyExists(String)
Declaration
public bool CheckKeyExists(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
ClearAll()
Removes all objects stored under given key.
Declaration
FlushKey(String)
Removes all objects stored under given key.
Declaration
public void FlushKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
String key tag
|
GetElementById(String)
Return visual element by it's Id
Declaration
public VisualElement GetElementById(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Type |
Description |
VisualElement |
|
Initialize()
Declaration
protected override void Initialize()
RemoveById(String)
Removes visual element by it's Id
Declaration
public void RemoveById(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|