Highroad Engine v1.3
Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMBezierLineRenderer Class Reference

Add this class to a line renderer and it'll add control points that let you turn your line into a bezier curve More...

Inheritance diagram for MoreMountains.Tools.MMBezierLineRenderer:

Public Attributes

Transform[] AdjustmentHandles
 a list of handles to control your line. Usually 4, but you can have more. More...
 
int NumberOfSegments = 50
 the amount of segments of the line renderer (more segments, less visible straight lines) More...
 
string SortingLayerName = "Default"
 the sorting layer for this line renderer More...
 
int NumberOfCurves = 0
 the amount of curves we're working with More...
 

Protected Member Functions

virtual void Awake ()
 On Awake we initialize our line renderer More...
 
virtual void Initialization ()
 Grabs the sorting layer, computes the amount of curves More...
 
virtual void LateUpdate ()
 On Update we draw our curve More...
 
virtual void DrawCurve ()
 For each point, determines the bezier position and feeds it to the line renderer More...
 
virtual Vector3 BezierPoint (float t, Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3)
 Computes the coordinates of a point on the bezier curve controlled by p0, p1, p2 and p3 More...
 

Protected Attributes

int _sortingLayerID
 
LineRenderer _lineRenderer
 
Vector3 _point
 
Vector3 _p
 
bool _initialized = false
 

Detailed Description

Add this class to a line renderer and it'll add control points that let you turn your line into a bezier curve

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMBezierLineRenderer.Awake ( )
protectedvirtual

On Awake we initialize our line renderer

◆ BezierPoint()

virtual Vector3 MoreMountains.Tools.MMBezierLineRenderer.BezierPoint ( float  t,
Vector3  p0,
Vector3  p1,
Vector3  p2,
Vector3  p3 
)
protectedvirtual

Computes the coordinates of a point on the bezier curve controlled by p0, p1, p2 and p3

Parameters
t
p0
p1
p2
p3
Returns

◆ DrawCurve()

virtual void MoreMountains.Tools.MMBezierLineRenderer.DrawCurve ( )
protectedvirtual

For each point, determines the bezier position and feeds it to the line renderer

◆ Initialization()

virtual void MoreMountains.Tools.MMBezierLineRenderer.Initialization ( )
protectedvirtual

Grabs the sorting layer, computes the amount of curves

◆ LateUpdate()

virtual void MoreMountains.Tools.MMBezierLineRenderer.LateUpdate ( )
protectedvirtual

On Update we draw our curve

Member Data Documentation

◆ _initialized

bool MoreMountains.Tools.MMBezierLineRenderer._initialized = false
protected

◆ _lineRenderer

LineRenderer MoreMountains.Tools.MMBezierLineRenderer._lineRenderer
protected

◆ _p

Vector3 MoreMountains.Tools.MMBezierLineRenderer._p
protected

◆ _point

Vector3 MoreMountains.Tools.MMBezierLineRenderer._point
protected

◆ _sortingLayerID

int MoreMountains.Tools.MMBezierLineRenderer._sortingLayerID
protected

◆ AdjustmentHandles

Transform [] MoreMountains.Tools.MMBezierLineRenderer.AdjustmentHandles

a list of handles to control your line. Usually 4, but you can have more.

◆ NumberOfCurves

int MoreMountains.Tools.MMBezierLineRenderer.NumberOfCurves = 0

the amount of curves we're working with

◆ NumberOfSegments

int MoreMountains.Tools.MMBezierLineRenderer.NumberOfSegments = 50

the amount of segments of the line renderer (more segments, less visible straight lines)

◆ SortingLayerName

string MoreMountains.Tools.MMBezierLineRenderer.SortingLayerName = "Default"

the sorting layer for this line renderer


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