Polarith AI
1.8
AIMLinearPath Class Reference

Description

Intended for creating and representing linear paths.

These paths can be used in combination with AIMFollowWaypoints to achieve patrol behaviours. The path points can either be edited via the methods SetPoints(List<Vector3>), SetLocalPoints(List<Vector3>) or by taking advantage of the easy-to-use custom inspector.

Inheritance diagram for AIMLinearPath:
AIMPathConnector

Public Fields

Action PathChanged
 Processed if the path was modified or not. More...
 

Protected Fields

readonly List< Vector3 > waypoints = new List<Vector3>()
 Global points of the path. More...
 
List< Vector3 > localWaypoints = new List<Vector3>()
 Local points of the path. More...
 
Color selectionColor = Colors.Orange
 "Determines the selection color for the vertices.") More...
 
Color firstColor = Color.magenta
 Determines the color of all vertices as well as the start color of the edges. More...
 
Color secondColor = Color.cyan
 Determines the end color of the edges as well as the color of the path destination. More...
 
float scale = 1.0f
 Resizes the visualized sphere for each path point. More...
 
bool enableVisualization = true
 Specifies if path points are to be visualized or not. More...
 

Properties

override IList< Vector3 > points [get]
 This property is used for the handling of the stored path points. More...
 

Public Methods

override IList< Vector3 > GetLocalPoints ()
 Returns the points in local coordinates, whereby it allocates memory and copies the original data. More...
 
override void GetLocalPointsNonAlloc (IList< Vector3 > points)
 Returns the points in local coordinates without allocating memory. More...
 
void Reverse ()
 Reverses the order of path points. More...
 
void SetPoints (List< Vector3 > points)
 Sets a new point list for the path, whereby it assumes that the points are in global coordinates. More...
 
void SetLocalPoints (List< Vector3 > points)
 Sets a new point list for the path, whereby it assumes that the points are in local coordinates. More...
 
virtual IList< Vector3 > GetPoints ()
 Returns the points in global coordinates, whereby it allocates memory and copies the original data. More...
 
virtual void GetPointsNonAlloc (IList< Vector3 > points)
 Returns the points in global coordinates without allocating memory. More...
 

Protected Methods

virtual void OnDrawGizmos ()
 Provides a basic visualization of the given points of this path. More...
 
virtual void DrawPoint (int index)
 Visualizes a specific path point by using Gizmos.DrawSphere(Vector3, float). More...
 
virtual void DrawEdge (int startPointIndex)
 Visualizes a specific edge drawing a fancy gradient. More...
 
Imprint