Curvy  7.1.0
CurvySplineSegment Class Reference
+ Inheritance diagram for CurvySplineSegment:
+ Collaboration diagram for CurvySplineSegment:

Detailed Description

Class covering a Curvy Spline Segment / ControlPoint

Classes

struct  ControlPointExtrinsicProperties
 Contains data about a control point related to it's parent spline. For example, is a control point a valid segment in the spline or not.
 

Static Public Attributes

static readonly Color GizmoTangentColor = new Color(0, 0.7f, 0)
 The color used in Gizmos to draw a segment's tangents More...
 

Public Attributes

Vector3[] Approximation = new Vector3[0]
 List of precalculated interpolations More...
 
float[] ApproximationDistances = new float[0]
 List of precalculated distances More...
 
Vector3[] ApproximationT = new Vector3[0]
 List of precalculated Tangent-Normals More...
 
Vector3[] ApproximationUp = new Vector3[0]
 List of precalculated Up-Vectors More...
 

Properties

bool AutoBakeOrientation [get, set]
 If set, Control Point's rotation will be set to the calculated Up-Vector3 More...
 
float AutoHandleDistance [get, set]
 
bool AutoHandles [get, set]
 Gets or Sets Auto Handles. When setting it the value of connected control points is also updated More...
 
Bounds Bounds [get]
 Gets this segment's bounds in world space More...
 
int CacheSize [get]
 Gets the number of individual cache points of this segment More...
 
CurvyConnection Connection [get, set]
 Gets/Sets the connection handler this Control Point is using (if any) More...
 
bool ConnectionSyncPosition [get, set]
 When part of a CurvyConnection, this defines whether the connection's position is applied to this Control Point The synchronization process is applied by CurvyConnection at each frame in its update methods. So if you modify the value of this property, and want the synchronization to happen right away, you will have to call the connection's CurvyConnection.SetSynchronisationPositionAndRotation(Vector3, Quaternion) with the connection's position and rotation as parameters More...
 
bool ConnectionSyncRotation [get, set]
 When part of a CurvyConnection, this defines whether the connection's rotation is applied to this Control Point The synchronization process is applied by CurvyConnection at each frame in its update methods. So if you modify the value of this property, and want the synchronization to happen right away, you will have to call the connection's CurvyConnection.SetSynchronisationPositionAndRotation(Vector3, Quaternion) with the connection's position and rotation as parameters More...
 
float Distance [get, set]
 Gets the distance from spline start to the first control point (localF=0) More...
 
float EndBias [get, set]
 End Bias More...
 
float EndContinuity [get, set]
 End Continuity More...
 
float EndTension [get, set]
 End Tension More...
 
CurvySplineSegment FollowUp [get]
 Gets the connected Control Point that is set as "Head To" More...
 
ConnectionHeadingEnum FollowUpHeading [get, set]
 Gets or sets the heading toward the "Head To" segment More...
 
Vector3 HandleIn [get, set]
 Bézier spline left handle in local coordinates More...
 
Vector3 HandleInPosition [get, set]
 Bézier spline left handle in world coordinates More...
 
Vector3 HandleOut [get, set]
 Bézier spline right handle in local coordinates More...
 
Vector3 HandleOutPosition [get, set]
 Bézier spline right handle in world coordinates More...
 
bool HasUnprocessedLocalOrientation [get]
 Returns true if the local orientation is different than the last one used in the segment approximations cache computation More...
 
bool HasUnprocessedLocalPosition [get]
 Returns true if the local position is different than the last one used in the segment approximations cache computation More...
 
bool IsFirstControlPoint [get]
 Gets whether this Control Point is the first IGNORING closed splines More...
 
bool IsLastControlPoint [get]
 Gets whether this Control Point is the last IGNORING closed splines More...
 
float Length [get]
 Gets the length of this spline segment More...
 
HashSet< CurvyMetadataBaseMetadata [get]
 The Metadata components added to this GameObject More...
 
HashSet< Component > MetaDataSet [get]
 The Metadata components added to this GameObject More...
 
bool OrientatinInfluencesSpline [get]
 Returns wheter the orientation of this Control Point influences the orientation of its containing spline's approximation points. Returns false if control point is not part of a spline More...
 
bool OverrideGlobalBias [get, set]
 Whether local Bias should be used More...
 
bool OverrideGlobalContinuity [get, set]
 Whether local Continuity should be used More...
 
bool OverrideGlobalTension [get, set]
 Whether local Tension should be used More...
 
bool SerializedOrientationAnchor [get, set]
 The serialized value of OrientationAnchor. This value is ignored in some cases (invisible control points, first and last visible control points). Use Spline.IsOrientationAnchor() to get the correct value. More...
 
CurvySpline Spline [get]
 Gets the parent spline More...
 
float StartBias [get, set]
 Start Bias More...
 
float StartContinuity [get, set]
 Start Continuity More...
 
float StartTension [get, set]
 Start Tension More...
 
CurvyOrientationSwirl Swirl [get, set]
 Swirling Mode More...
 
float SwirlTurns [get, set]
 Turns to swirl More...
 
bool SynchronizeTCB [get, set]
 Keep Start/End-TCB synchronized More...
 
float TF [get, set]
 Gets the TF of this Control Point TF stands for Total Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the spline's start and 1 means the spline's end. This is the "time" parameter used in the splines' formulas. A point's TF is not proportional to its distance from the spline's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the spline More...
 

Public Member Functions

void BakeOrientationToTransform ()
 Modify the control point's local rotation to match the segment's orientation More...
 
void DeleteMetadata ()
 Removes all Metadata components of this Control Point More...
 
void Disconnect ()
 Resets the connections related data (Connection, FollowUp, etc) while updating the Connection object and dirtying relevant splines. More...
 
void Disconnect (bool destroyEmptyConnection)
 Resets the connections related data (Connection, FollowUp, etc) while updating the Connection object and dirtying relevant splines. More...
 
float DistanceToLocalF (float localDistance)
 Gets the local F of a point given its local distance Local F stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment More...
 
int getApproximationIndexINTERNAL (float localF, out float frag)
 Internal, gets the index of mApproximation by F and the remaining fragment More...
 
GetInterpolatedMetadata< T, U > (float f)
 Gets an interpolated Metadata value for a certain F More...
 
GetMetadata< T > (bool autoCreate=false)
 Gets Metadata of this ControlPoint More...
 
float GetNearestPointF (Vector3 position, Space space=Space.Self)
 Gets the localF of the point on the segment that is the nearest to a given position localF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment More...
 
Quaternion GetOrientationFast (float localF, bool inverse=false, Space space=Space.Self)
 Gets the rotation of a point on the spline segment. The rotation's forward is the segment's tangent, and it's up is the segment's orientation Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result More...
 
Vector3 GetOrientationUpFast (float localF, Space space=Space.Self)
 Gets the Up vector of a point on the spline segment. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result More...
 
Vector3 GetTangent (float localF, Space space=Space.Self)
 Gets the normalized tangent at a point on the spline segment More...
 
Vector3 GetTangent (float localF, Vector3 position, Space space=Space.Self)
 Gets the normalized tangent at a point on the spline segment. This method is faster than GetTangent(float, Space) if you have already the position of the point. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result More...
 
Vector3 GetTangentFast (float localF, Space space=Space.Self)
 Gets the normalized tangent at a point on the spline segment. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result More...
 
Vector3 Interpolate (float localF, Space space=Space.Self)
 Gets the position of a point on the spline segment More...
 
void InterpolateAndGetTangent (float localF, out Vector3 position, out Vector3 tangent, Space space=Space.Self)
 Gets the position and normalized tangent at a point on the spline segment Is Faster than calling Interpolate(float, Space) and Interpolate(float, Space) separately More...
 
void InterpolateAndGetTangentFast (float localF, out Vector3 position, out Vector3 tangent, Space space=Space.Self)
 Gets the position and normalized tangent at a point on the spline segment Is Faster than calling Interpolate(float, Space) and Interpolate(float, Space) separately Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result More...
 
Vector3 InterpolateFast (float localF, Space space=Space.Self)
 Gets the position of a point on the spline segment. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result More...
 
Vector3 InterpolateScale (float localF)
 Gets the interpolated Scale More...
 
void LinkToSpline (CurvySpline spline)
 
float LocalFToDistance (float localF)
 Gets the local distance of a point at a certain localF. Local distance is the distance between a point and the start of its segment. Value ranges from 0 to the segment's Length, inclusive More...
 
float LocalFToTF (float localF)
 Gets TF for a certain local F TF stands for Total Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the spline's start and 1 means the spline's end. This is the "time" parameter used in the splines' formulas. A point's TF is not proportional to its distance from the spline's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the spline More...
 
void OnAfterPop ()
 
void OnBeforePush ()
 
void RegisterMetaData (CurvyMetadataBase metaData)
 Adds a MetaData instance to Metadata More...
 
void ReloadMetaData ()
 Rebuilds Metadata More...
 
void ResetConnectionRelatedData ()
 Resets the connections related data (Connection, FollowUp, etc) More...
 
void SetBezierHandleIn (Vector3 position, Space space=Space.Self, CurvyBezierModeEnum mode=CurvyBezierModeEnum.None)
 Sets Bezier HandleIn More...
 
void SetBezierHandleOut (Vector3 position, Space space=Space.Self, CurvyBezierModeEnum mode=CurvyBezierModeEnum.None)
 Sets Bezier HandleOut More...
 
void SetBezierHandles (float distanceFrag=-1, bool setIn=true, bool setOut=true, bool noDirtying=false)
 Automatically place Bezier handles relative to neighbour Control Points More...
 
void SetBezierHandles (float distanceFrag, Vector3 p, Vector3 n, bool setIn=true, bool setOut=true, bool noDirtying=false)
 Automatically place Bezier handles More...
 
void SetFollowUp (CurvySplineSegment target, ConnectionHeadingEnum heading=ConnectionHeadingEnum.Auto)
 Sets Follow-Up of this Control Point More...
 
void SetLocalPosition (Vector3 newPosition)
 Sets the local position while dirtying the spline, dirtying the connected splines, and updating the connected control points' positions accordingly. More...
 
void SetLocalRotation (Quaternion value)
 Sets the local rotation while dirtying the spline, dirtying the connected splines, and updating the connected control points' rotations accordingly. More...
 
void SetPosition (Vector3 value)
 Sets the global position while dirtying the spline, dirtying the connected splines, and updating the connected control points' positions accordingly. More...
 
void SetRotation (Quaternion value)
 Sets the global rotation while dirtying the spline, dirtying the connected splines, and updating the connected control points' rotations accordingly. More...
 
override string ToString ()
 
void UnlinkFromSpline ()
 
void UnregisterMetaData (CurvyMetadataBase metaData)
 Removes a MetaData instance from Metadata More...
 

Static Public Member Functions

static bool CanFollowUpHeadToEnd ([NotNull]CurvySplineSegment followUp)
 Returns true if followUp can be associated with a heading direction of ConnectionHeadingEnum.Plus More...
 
static bool CanFollowUpHeadToStart ([NotNull]CurvySplineSegment followUp)
 Returns true if followUp can be associated with a heading direction of ConnectionHeadingEnum.Minus More...
 

Member Function Documentation

void BakeOrientationToTransform ( )

Modify the control point's local rotation to match the segment's orientation

static bool CanFollowUpHeadToEnd ( [NotNull] CurvySplineSegment  followUp)
static

Returns true if followUp can be associated with a heading direction of ConnectionHeadingEnum.Plus

static bool CanFollowUpHeadToStart ( [NotNull] CurvySplineSegment  followUp)
static

Returns true if followUp can be associated with a heading direction of ConnectionHeadingEnum.Minus

void DeleteMetadata ( )

Removes all Metadata components of this Control Point

void Disconnect ( )

Resets the connections related data (Connection, FollowUp, etc) while updating the Connection object and dirtying relevant splines.

void Disconnect ( bool  destroyEmptyConnection)

Resets the connections related data (Connection, FollowUp, etc) while updating the Connection object and dirtying relevant splines.

Parameters
destroyEmptyConnectionwhether the related Connection should be destroyed if it becomes empty due to this Disconnect call
float DistanceToLocalF ( float  localDistance)

Gets the local F of a point given its local distance Local F stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment

Parameters
localDistanceThe distance between the segment's start and the point you are interested in. Value should be in the range from 0 to Length inclusive

>

int getApproximationIndexINTERNAL ( float  localF,
out float  frag 
)

Internal, gets the index of mApproximation by F and the remaining fragment

U GetInterpolatedMetadata< T, U > ( float  f)

Gets an interpolated Metadata value for a certain F

Template Parameters
TMetadata type inheriting from CurvyInterpolatableMetadataBase
UMetadata's Value type
Parameters
fa local F in the range 0..1
Returns
The interpolated value. If no Metadata of specified type is present at the given tf, the default value of type U is returned
Type Constraints
T :CurvyInterpolatableMetadataBase<U> 
T GetMetadata< T > ( bool  autoCreate = false)

Gets Metadata of this ControlPoint

Template Parameters
TMetadata type
Parameters
autoCreatewhether to create the Metadata component if it's not present
Returns
the Metadata component or null
Type Constraints
T :CurvyMetadataBase 
float GetNearestPointF ( Vector3  position,
Space  space = Space.Self 
)

Gets the localF of the point on the segment that is the nearest to a given position localF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment

Parameters
positionThe point's position
spaceThe space (spline's local space or the world space) in which the returned result is expressed

position is expressed

This method's precision and speed depend on the CurvySpline.CacheDensity

Quaternion GetOrientationFast ( float  localF,
bool  inverse = false,
Space  space = Space.Self 
)

Gets the rotation of a point on the spline segment. The rotation's forward is the segment's tangent, and it's up is the segment's orientation Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
inversewhether the orientation should look at the opposite direction of the tangent
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 GetOrientationUpFast ( float  localF,
Space  space = Space.Self 
)

Gets the Up vector of a point on the spline segment. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 GetTangent ( float  localF,
Space  space = Space.Self 
)

Gets the normalized tangent at a point on the spline segment

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 GetTangent ( float  localF,
Vector3  position,
Space  space = Space.Self 
)

Gets the normalized tangent at a point on the spline segment. This method is faster than GetTangent(float, Space) if you have already the position of the point. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
positionthe position of the point at localF. In other words, the result of Interpolate(float, Space)
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 GetTangentFast ( float  localF,
Space  space = Space.Self 
)

Gets the normalized tangent at a point on the spline segment. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 Interpolate ( float  localF,
Space  space = Space.Self 
)

Gets the position of a point on the spline segment

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
spaceThe space (spline's local space or the world space) in which the returned result is expressed
void InterpolateAndGetTangent ( float  localF,
out Vector3  position,
out Vector3  tangent,
Space  space = Space.Self 
)

Gets the position and normalized tangent at a point on the spline segment Is Faster than calling Interpolate(float, Space) and Interpolate(float, Space) separately

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
positionthe output position
tangentthe output tangent
spaceThe space (spline's local space or the world space) in which the returned result is expressed
void InterpolateAndGetTangentFast ( float  localF,
out Vector3  position,
out Vector3  tangent,
Space  space = Space.Self 
)

Gets the position and normalized tangent at a point on the spline segment Is Faster than calling Interpolate(float, Space) and Interpolate(float, Space) separately Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
positionthe output position
tangentthe output tangent
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 InterpolateFast ( float  localF,
Space  space = Space.Self 
)

Gets the position of a point on the spline segment. Instead of computing the exact value, this method uses a linear interpolation between cached points for faster result

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
spaceThe space (spline's local space or the world space) in which the returned result is expressed
Vector3 InterpolateScale ( float  localF)

Gets the interpolated Scale

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
Returns
the interpolated value
void LinkToSpline ( CurvySpline  spline)
float LocalFToDistance ( float  localF)

Gets the local distance of a point at a certain localF. Local distance is the distance between a point and the start of its segment. Value ranges from 0 to the segment's Length, inclusive

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
float LocalFToTF ( float  localF)

Gets TF for a certain local F TF stands for Total Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the spline's start and 1 means the spline's end. This is the "time" parameter used in the splines' formulas. A point's TF is not proportional to its distance from the spline's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the spline

Parameters
localFlocalF stands for Local Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the segment's start and 1 means the segment's end. This is the "time" parameter used in the splines' formulas. A point's localF is not proportional to its distance from the segment's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the segment
Returns
a TF value
void OnAfterPop ( )
void OnBeforePush ( )
void RegisterMetaData ( CurvyMetadataBase  metaData)

Adds a MetaData instance to Metadata

void ReloadMetaData ( )

Rebuilds Metadata

void ResetConnectionRelatedData ( )

Resets the connections related data (Connection, FollowUp, etc)

void SetBezierHandleIn ( Vector3  position,
Space  space = Space.Self,
CurvyBezierModeEnum  mode = CurvyBezierModeEnum.None 
)

Sets Bezier HandleIn

Parameters
positionHandleIn position
spaceThe space (spline's local space or the world space) in which the position is expressed
modeHandle synchronization mode
void SetBezierHandleOut ( Vector3  position,
Space  space = Space.Self,
CurvyBezierModeEnum  mode = CurvyBezierModeEnum.None 
)

Sets Bezier HandleOut

Parameters
positionHandleOut position
spaceThe space (spline's local space or the world space) in which the position is expressed
modeHandle synchronization mode
void SetBezierHandles ( float  distanceFrag = -1,
bool  setIn = true,
bool  setOut = true,
bool  noDirtying = false 
)

Automatically place Bezier handles relative to neighbour Control Points

Parameters
distanceFraghow much % distance between neighbouring CPs are applied to the handle length?
setInSet HandleIn?
setOutSet HandleOut?
noDirtyingIf true, the Bezier handles will be modified without dirtying any spline
void SetBezierHandles ( float  distanceFrag,
Vector3  p,
Vector3  n,
bool  setIn = true,
bool  setOut = true,
bool  noDirtying = false 
)

Automatically place Bezier handles

Parameters
distanceFraghow much % distance between neighbouring CPs are applied to the handle length?
pPosition the In-Handle relates to
nPosition the Out-Handle relates to
setInSet HandleIn?
setOutSet HandleOut?
noDirtyingIf true, the Bezier handles will be modified without dirtying any spline
void SetFollowUp ( CurvySplineSegment  target,
ConnectionHeadingEnum  heading = ConnectionHeadingEnum.Auto 
)

Sets Follow-Up of this Control Point

Parameters
targetthe Control Point to follow to
headingthe Heading on the target's spline
void SetLocalPosition ( Vector3  newPosition)

Sets the local position while dirtying the spline, dirtying the connected splines, and updating the connected control points' positions accordingly.

Parameters
newPosition
void SetLocalRotation ( Quaternion  value)

Sets the local rotation while dirtying the spline, dirtying the connected splines, and updating the connected control points' rotations accordingly.

Parameters
value
void SetPosition ( Vector3  value)

Sets the global position while dirtying the spline, dirtying the connected splines, and updating the connected control points' positions accordingly.

Parameters
value
void SetRotation ( Quaternion  value)

Sets the global rotation while dirtying the spline, dirtying the connected splines, and updating the connected control points' rotations accordingly.

Parameters
value
override string ToString ( )
void UnlinkFromSpline ( )
void UnregisterMetaData ( CurvyMetadataBase  metaData)

Removes a MetaData instance from Metadata

Member Data Documentation

Vector3 [] Approximation = new Vector3[0]

List of precalculated interpolations

Based on Spline's CacheDensity

float [] ApproximationDistances = new float[0]

List of precalculated distances

Based on Spline's CacheDensity

Vector3 [] ApproximationT = new Vector3[0]

List of precalculated Tangent-Normals

Based on Spline's CacheDensity

Vector3 [] ApproximationUp = new Vector3[0]

List of precalculated Up-Vectors

Based on Spline's CacheDensity

readonly Color GizmoTangentColor = new Color(0, 0.7f, 0)
static

The color used in Gizmos to draw a segment's tangents

Property Documentation

bool AutoBakeOrientation
getset

If set, Control Point's rotation will be set to the calculated Up-Vector3

This is particularly useful when connecting splines

float AutoHandleDistance
getset
bool AutoHandles
getset

Gets or Sets Auto Handles. When setting it the value of connected control points is also updated

Bounds Bounds
get

Gets this segment's bounds in world space

int CacheSize
get

Gets the number of individual cache points of this segment

The actual approximations arrays' size is CacheSize + 1

CurvyConnection Connection
getset

Gets/Sets the connection handler this Control Point is using (if any)

If set to null, FollowUp wil be set to null to

bool ConnectionSyncPosition
getset

When part of a CurvyConnection, this defines whether the connection's position is applied to this Control Point The synchronization process is applied by CurvyConnection at each frame in its update methods. So if you modify the value of this property, and want the synchronization to happen right away, you will have to call the connection's CurvyConnection.SetSynchronisationPositionAndRotation(Vector3, Quaternion) with the connection's position and rotation as parameters

bool ConnectionSyncRotation
getset

When part of a CurvyConnection, this defines whether the connection's rotation is applied to this Control Point The synchronization process is applied by CurvyConnection at each frame in its update methods. So if you modify the value of this property, and want the synchronization to happen right away, you will have to call the connection's CurvyConnection.SetSynchronisationPositionAndRotation(Vector3, Quaternion) with the connection's position and rotation as parameters

float Distance
getset

Gets the distance from spline start to the first control point (localF=0)

float EndBias
getset

End Bias

remarks>This only applies to interpolation methods using Bias

float EndContinuity
getset

End Continuity

This only applies to interpolation methods using Continuity

float EndTension
getset

End Tension

This only applies to interpolation methods using Tension

CurvySplineSegment FollowUp
get

Gets the connected Control Point that is set as "Head To"

ConnectionHeadingEnum FollowUpHeading
getset

Gets or sets the heading toward the "Head To" segment

Vector3 HandleIn
getset

Bézier spline left handle in local coordinates

Vector3 HandleInPosition
getset

Bézier spline left handle in world coordinates

Vector3 HandleOut
getset

Bézier spline right handle in local coordinates

Vector3 HandleOutPosition
getset

Bézier spline right handle in world coordinates

bool HasUnprocessedLocalOrientation
get

Returns true if the local orientation is different than the last one used in the segment approximations cache computation

bool HasUnprocessedLocalPosition
get

Returns true if the local position is different than the last one used in the segment approximations cache computation

bool IsFirstControlPoint
get

Gets whether this Control Point is the first IGNORING closed splines

bool IsLastControlPoint
get

Gets whether this Control Point is the last IGNORING closed splines

float Length
get

Gets the length of this spline segment

HashSet<CurvyMetadataBase> Metadata
get

The Metadata components added to this GameObject

HashSet<Component> MetaDataSet
get

The Metadata components added to this GameObject

bool OrientatinInfluencesSpline
get

Returns wheter the orientation of this Control Point influences the orientation of its containing spline's approximation points. Returns false if control point is not part of a spline

bool OverrideGlobalBias
getset

Whether local Bias should be used

This only applies to interpolation methods using Bias

bool OverrideGlobalContinuity
getset

Whether local Continuity should be used

This only applies to interpolation methods using Continuity

bool OverrideGlobalTension
getset

Whether local Tension should be used

This only applies to interpolation methods using Tension

bool SerializedOrientationAnchor
getset

The serialized value of OrientationAnchor. This value is ignored in some cases (invisible control points, first and last visible control points). Use Spline.IsOrientationAnchor() to get the correct value.

CurvySpline Spline
get

Gets the parent spline

float StartBias
getset

Start Bias

This only applies to interpolation methods using Bias

float StartContinuity
getset

Start Continuity

This only applies to interpolation methods using Continuity

float StartTension
getset

Start Tension

This only applies to interpolation methods using Tension

CurvyOrientationSwirl Swirl
getset

Swirling Mode

float SwirlTurns
getset

Turns to swirl

bool SynchronizeTCB
getset

Keep Start/End-TCB synchronized

Applies only to TCB Interpolation

float TF
getset

Gets the TF of this Control Point TF stands for Total Fragment. It's a value ranging from 0 to 1 inclusive. 0 means the spline's start and 1 means the spline's end. This is the "time" parameter used in the splines' formulas. A point's TF is not proportional to its distance from the spline's start. Depending on the spline, a value of 0.5 does not always mean the middle, distance wise, of the spline

This yields the same result as LocalFToTF(0)


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