TrackFlow Pro Documentation 1
Generate roller coasters, railroads, conveyors and more with a physics aware spline and meshing system.
Loading...
Searching...
No Matches
TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil Class Reference

A helper class to arrange and align the spline bezier handles in various ways. Enable in the menu Tools > TrackFlow > Sync Bezier Handles To Tangent On Frame Edit. More...

Static Public Member Functions

static bool SupportsBezierHandleUtilities (TrackFlowSpline spline)
 Check if a spline supports the handle utilities.
static void AlignOutToIn (TrackFlowSpline spline, int knotIndex)
 Align the out handle to the in handle.
static void AlignInToOut (TrackFlowSpline spline, int knotIndex)
 Align the in handle with the out handle.
static void MirrorBothHandles (TrackFlowSpline spline, int knotIndex)
 Mirror the handles, prioritize out handle position over in handle position.
static void StraightenBothToTangent (TrackFlowSpline spline, int knotIndex)
 Align both handles to the frame tangent.
static void StraightenOutToTangent (TrackFlowSpline spline, int knotIndex)
 Align the out handle with the frame tangent.
static void StraightenInToTangent (TrackFlowSpline spline, int knotIndex)
 Align the in handle to the frame tangent.
static void ZeroIn (TrackFlowSpline spline, int knotIndex)
 Zero out the in handle.
static void ZeroOut (TrackFlowSpline spline, int knotIndex)
 Zero out the out handle.
static void SyncHandlesToCurrentTangent (TrackFlowSpline spline, int knotIndex, bool syncIn, bool syncOut)
 Align either handle to the frame tangent given a knot index.

Properties

static bool SyncHandlesToTangentOnFrameEdit [get, set]

Static Private Member Functions

static void ToggleSyncHandlesToTangent ()
static bool ToggleSyncHandlesToTangentValidate ()
static bool TryGetKnot (TrackFlowSpline spline, int knotIndex, out TrackFlowKnot knot)
static float GetHandleLengthWorld (TrackFlowSpline spline, Vector3 localOffset)
static Vector3 GetTangentWorldOrFallback (TrackFlowSpline spline, int knotIndex)
static float EstimateDefaultHandleLengthWorld (TrackFlowSpline spline, int knotIndex)

Static Private Attributes

const string PrefKeySyncToTangent
const string MenuPath

Detailed Description

A helper class to arrange and align the spline bezier handles in various ways. Enable in the menu Tools > TrackFlow > Sync Bezier Handles To Tangent On Frame Edit.

Member Function Documentation

◆ AlignInToOut()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.AlignInToOut ( TrackFlowSpline spline,
int knotIndex )
static

Align the in handle with the out handle.

Parameters
spline
knotIndex

◆ AlignOutToIn()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.AlignOutToIn ( TrackFlowSpline spline,
int knotIndex )
static

Align the out handle to the in handle.

Parameters
spline
knotIndex

◆ EstimateDefaultHandleLengthWorld()

float TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.EstimateDefaultHandleLengthWorld ( TrackFlowSpline spline,
int knotIndex )
staticprivate

◆ GetHandleLengthWorld()

float TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.GetHandleLengthWorld ( TrackFlowSpline spline,
Vector3 localOffset )
staticprivate

◆ GetTangentWorldOrFallback()

Vector3 TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.GetTangentWorldOrFallback ( TrackFlowSpline spline,
int knotIndex )
staticprivate

◆ MirrorBothHandles()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.MirrorBothHandles ( TrackFlowSpline spline,
int knotIndex )
static

Mirror the handles, prioritize out handle position over in handle position.

Parameters
spline
knotIndex

◆ StraightenBothToTangent()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.StraightenBothToTangent ( TrackFlowSpline spline,
int knotIndex )
static

Align both handles to the frame tangent.

Parameters
spline
knotIndex

◆ StraightenInToTangent()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.StraightenInToTangent ( TrackFlowSpline spline,
int knotIndex )
static

Align the in handle to the frame tangent.

Parameters
spline
knotIndex

◆ StraightenOutToTangent()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.StraightenOutToTangent ( TrackFlowSpline spline,
int knotIndex )
static

Align the out handle with the frame tangent.

Parameters
spline
knotIndex

◆ SupportsBezierHandleUtilities()

bool TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.SupportsBezierHandleUtilities ( TrackFlowSpline spline)
static

Check if a spline supports the handle utilities.

Parameters
spline
Returns

◆ SyncHandlesToCurrentTangent()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.SyncHandlesToCurrentTangent ( TrackFlowSpline spline,
int knotIndex,
bool syncIn,
bool syncOut )
static

Align either handle to the frame tangent given a knot index.

Parameters
spline
knotIndex
syncIn
syncOut

◆ ToggleSyncHandlesToTangent()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.ToggleSyncHandlesToTangent ( )
staticprivate

◆ ToggleSyncHandlesToTangentValidate()

bool TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.ToggleSyncHandlesToTangentValidate ( )
staticprivate

◆ TryGetKnot()

bool TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.TryGetKnot ( TrackFlowSpline spline,
int knotIndex,
out TrackFlowKnot knot )
staticprivate

◆ ZeroIn()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.ZeroIn ( TrackFlowSpline spline,
int knotIndex )
static

Zero out the in handle.

Parameters
spline
knotIndex

◆ ZeroOut()

void TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.ZeroOut ( TrackFlowSpline spline,
int knotIndex )
static

Zero out the out handle.

Parameters
spline
knotIndex

Member Data Documentation

◆ MenuPath

const string TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.MenuPath
staticprivate
Initial value:
=
"Tools/TrackFlow/Sync Bezier Handles To Tangent On Frame Edit"

◆ PrefKeySyncToTangent

const string TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.PrefKeySyncToTangent
staticprivate
Initial value:
=
"TrackFlowPro.Editor.SyncBezierHandlesToTangentOnFrameEdit"

Property Documentation

◆ SyncHandlesToTangentOnFrameEdit

bool TrackFlowPro.Editor.TrackFlowBezierHandleEditorUtil.SyncHandlesToTangentOnFrameEdit
staticgetset

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