Simple Waypoint System  5.5
Public Member Functions | Public Attributes | List of all members
BezierPathManager

Stores waypoints of a bezier path, accessed by walker objects. Provides gizmo visualization in the editor. More...

Inheritance diagram for BezierPathManager:
PathManager

Public Member Functions

override void Create (Transform[] waypoints, bool makeChildren=false)
 Create or update waypoint representation from the array passed in, optionally parenting them to the path. More...
 
override Vector3[] GetPathPoints (bool local=false)
 Returns waypoint positions (path positions) as Vector3 array. More...
 
override int GetWaypointCount ()
 Returns waypoint length (should be equal to events count). More...
 
override Transform GetWaypoint (int index)
 Returns the bezier path waypoint transform according to the index passed in. More...
 
override int GetWaypointIndex (int pathPoint)
 Converts bezier point on the path to waypoint index. Returns -1 if the point lies in between two waypoints. More...
 
override int GetPathPointIndex (int waypoint)
 Converts waypoint index to bezier point on the path. More...
 
void CalculatePath ()
 Recalculates final path points. Can be called at runtime to allow repositioning, but do consider update rate vs. performance! More...
 
- Public Member Functions inherited from PathManager
void Create (Transform parent=null)
 Create or update waypoint representation from child objects or external parent. More...
 
virtual float GetHandleSize (Vector3 pos)
 

Public Attributes

Vector3[] pathPoints = new Vector3[]{}
 Path points (not waypoints) creating the path. More...
 
List< BezierPointbPoints = new List<BezierPoint>()
 List to store bezier points for this path. More...
 
bool showHandles = true
 Toggles drawing of control point handles. More...
 
bool connectHandles = true
 Toggles independent control point handles on/off. More...
 
Color color3 = new Color(108 / 255f, 151 / 255f, 1, 1)
 Gizmo color for control point handles. More...
 
float pathDetail = 1
 Detail value for interpolations when calculating path points. More...
 
bool customDetail = false
 Toggles custom detail for single path segments. More...
 
List< float > segmentDetail = new List<float>()
 List of detail values for single path segments, when enabled. More...
 
- Public Attributes inherited from PathManager
Transform[] waypoints = new Transform[]{}
 Waypoint array creating the path. More...
 
bool drawCurved = true
 Toggles drawing of linear or curved gizmo lines. More...
 
bool drawDirection = false
 Toggles drawing of waypoint direction rotation. More...
 
Color color1 = new Color(1, 0, 1, 0.5f)
 Gizmo color for path ends. More...
 
Color color2 = new Color(1, 235 / 255f, 4 / 255f, 0.5f)
 Gizmo color for lines and waypoints. More...
 
Vector3 size = new Vector3(.7f, .7f, .7f)
 Gizmo size for path ends. More...
 
float radius = .4f
 Gizmo radius for waypoints. More...
 
bool skipCustomNames = true
 Skip custom names on waypoint renaming. More...
 
GameObject replaceObject
 Gameobject for replacing waypoints. More...
 

Detailed Description

Stores waypoints of a bezier path, accessed by walker objects. Provides gizmo visualization in the editor.

Member Function Documentation

void CalculatePath ( )

Recalculates final path points. Can be called at runtime to allow repositioning, but do consider update rate vs. performance!

override void Create ( Transform[]  waypoints,
bool  makeChildren = false 
)
virtual

Create or update waypoint representation from the array passed in, optionally parenting them to the path.

Reimplemented from PathManager.

override int GetPathPointIndex ( int  waypoint)
virtual

Converts waypoint index to bezier point on the path.

Reimplemented from PathManager.

override Vector3 [] GetPathPoints ( bool  local = false)
virtual

Returns waypoint positions (path positions) as Vector3 array.

Reimplemented from PathManager.

override Transform GetWaypoint ( int  index)
virtual

Returns the bezier path waypoint transform according to the index passed in.

Reimplemented from PathManager.

override int GetWaypointCount ( )
virtual

Returns waypoint length (should be equal to events count).

Reimplemented from PathManager.

override int GetWaypointIndex ( int  pathPoint)
virtual

Converts bezier point on the path to waypoint index. Returns -1 if the point lies in between two waypoints.

Reimplemented from PathManager.

Member Data Documentation

List<BezierPoint> bPoints = new List<BezierPoint>()

List to store bezier points for this path.

Color color3 = new Color(108 / 255f, 151 / 255f, 1, 1)

Gizmo color for control point handles.

bool connectHandles = true

Toggles independent control point handles on/off.

bool customDetail = false

Toggles custom detail for single path segments.

float pathDetail = 1

Detail value for interpolations when calculating path points.

Vector3 [] pathPoints = new Vector3[]{}

Path points (not waypoints) creating the path.

List<float> segmentDetail = new List<float>()

List of detail values for single path segments, when enabled.

bool showHandles = true

Toggles drawing of control point handles.


The documentation for this class was generated from the following file: