Class Path
Draw path as by-part linear with points connected with a cylinder 3D primitive object.
Inherited Members
Namespace: Marus.Visualization.Primitives
Assembly: cs.temp.dll.dll
Syntax
public class Path : VisualElement
Constructors
Path()
Empty constructor which initializes empty _points list and empty _startPointLineDict dictionary
Declaration
public Path()
Path(List<Vector3>)
Constructor which initializes path from list of points.
Declaration
public Path(List<Vector3> pointsInWorld)
Parameters
| Type | Name | Description |
|---|---|---|
| List<Vector3> | pointsInWorld | List of points to create a path from. |
Path(List<Vector3>, Single, Color, Single, Color)
Constructor which initializes path from given points and sets all the path properties.
Declaration
public Path(List<Vector3> pointsInWorld, float _PointSize, Color _PointColor, float _LineThickness, Color _LineColor)
Parameters
| Type | Name | Description |
|---|---|---|
| List<Vector3> | pointsInWorld | List of points |
| System.Single | _PointSize | Point size |
| Color | _PointColor | Point color |
| System.Single | _LineThickness | Line thickness |
| Color | _LineColor | Line color |
Path(Single, Color)
Constructor which initializes empty _points list and empty _startPointLineDict dictionary and sets line color and line thickness.
Declaration
public Path(float LineThickness, Color lc)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | LineThickness | |
| Color | lc |
Fields
LineColor
Line color
Declaration
public Color LineColor
Field Value
| Type | Description |
|---|---|
| Color |
LineThickness
Line thickness
Declaration
public float LineThickness
Field Value
| Type | Description |
|---|---|
| System.Single |
OnDestroyPath
Declaration
public UnityEvent OnDestroyPath
Field Value
| Type | Description |
|---|---|
| UnityEvent |
PointColor
Point color
Declaration
public Color PointColor
Field Value
| Type | Description |
|---|---|
| Color |
PointSize
Point size
Declaration
public float PointSize
Field Value
| Type | Description |
|---|---|
| System.Single |
Methods
AddPointToPath(Vector3)
Adds a single point to existing path.
Declaration
public void AddPointToPath(Vector3 point)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | point | Point to add |
AddPointToPath(Vector3, Single, Color)
Adds a single point to existing path with given size and color.
Declaration
public void AddPointToPath(Vector3 point, float PointSize, Color PointColor)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | point | Point to add |
| System.Single | PointSize | Point size |
| Color | PointColor | Point color |
Destroy()
Destroys path object
Declaration
public override void Destroy()
Overrides
Draw()
Draws path
Declaration
public override void Draw()
Overrides
GetPathDimension()
Declaration
public Vector3 GetPathDimension()
Returns
| Type | Description |
|---|---|
| Vector3 |
GetPathGameObject()
Declaration
public GameObject GetPathGameObject()
Returns
| Type | Description |
|---|---|
| GameObject |
GetPathPosition()
Declaration
public Vector3 GetPathPosition()
Returns
| Type | Description |
|---|---|
| Vector3 |
RefreshAndFade(Single)
Checks if any point is older than limit and removes if needed.
Declaration
public void RefreshAndFade(float limit)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | limit | Point age limit in seconds |
SetLineColor(Color)
Declaration
public void SetLineColor(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color |
SetLineThickness(Single)
Declaration
public void SetLineThickness(float LineThickness)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | LineThickness |
SetPointColor(Color)
Declaration
public void SetPointColor(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color |
SetPointParent(GameObject)
Declaration
public void SetPointParent(GameObject parent)
Parameters
| Type | Name | Description |
|---|---|---|
| GameObject | parent |
SetPointSize(Single)
Declaration
public void SetPointSize(float size)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | size |