Show / Hide Table of Contents

Class KochanekBartelsSpline

Hermite interpolated spline with Kochanek-Bartels tangent calculation

Inheritance
System.Object
Spline
KochanekBartelsSpline
Inherited Members
Spline.InterpolatedPoints
Namespace: VRSketchingGeometry.Splines
Assembly: VRSketchingGeometry.dll
Syntax
public class KochanekBartelsSpline : Spline
Remarks

Original author: tterpi

Constructors

KochanekBartelsSpline(Int32)

Constructor for the KochanekBartelsSpline class.

Declaration
public KochanekBartelsSpline(int steps = 20)
Parameters
Type Name Description
System.Int32 steps

Number of interpolation steps for each segment.

Methods

AddControlPoint(Vector3)

Declaration
public override SplineModificationInfo AddControlPoint(Vector3 controlPoint)
Parameters
Type Name Description
UnityEngine.Vector3 controlPoint
Returns
Type Description
SplineModificationInfo
Overrides
Spline.AddControlPoint(Vector3)

AddControlPoint(KochanekBartelsControlPoint)

Add control point at the end of the curve.

Declaration
public SplineModificationInfo AddControlPoint(KochanekBartelsControlPoint controlPoint)
Parameters
Type Name Description
KochanekBartelsControlPoint controlPoint
Returns
Type Description
SplineModificationInfo

DeleteControlPoint(Int32)

Delete the control point at index. If the index is not the first or last control point the curve will skip the deleted control point and connect the control point before and after the deleted one.

Declaration
public override SplineModificationInfo DeleteControlPoint(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
SplineModificationInfo
Overrides
Spline.DeleteControlPoint(Int32)

GetControlPoints()

Declaration
public override List<Vector3> GetControlPoints()
Returns
Type Description
System.Collections.Generic.List<UnityEngine.Vector3>
Overrides
Spline.GetControlPoints()

GetNumberOfControlPoints()

Declaration
public override int GetNumberOfControlPoints()
Returns
Type Description
System.Int32
Overrides
Spline.GetNumberOfControlPoints()

InsertControlPoint(Int32, Vector3)

Declaration
public override SplineModificationInfo InsertControlPoint(int index, Vector3 controlPoint)
Parameters
Type Name Description
System.Int32 index
UnityEngine.Vector3 controlPoint
Returns
Type Description
SplineModificationInfo
Overrides
Spline.InsertControlPoint(Int32, Vector3)

InsertControlPoint(Int32, KochanekBartelsControlPoint)

Insert a control point at index.

Declaration
public SplineModificationInfo InsertControlPoint(int index, KochanekBartelsControlPoint controlPoint)
Parameters
Type Name Description
System.Int32 index
KochanekBartelsControlPoint controlPoint
Returns
Type Description
SplineModificationInfo

SetControlPoint(Int32, Vector3)

Declaration
public override SplineModificationInfo SetControlPoint(int index, Vector3 controlPoint)
Parameters
Type Name Description
System.Int32 index
UnityEngine.Vector3 controlPoint
Returns
Type Description
SplineModificationInfo
Overrides
Spline.SetControlPoint(Int32, Vector3)

SetControlPoint(Int32, KochanekBartelsControlPoint)

Reset the existing control point at index.

Declaration
public SplineModificationInfo SetControlPoint(int index, KochanekBartelsControlPoint controlPoint)
Parameters
Type Name Description
System.Int32 index
KochanekBartelsControlPoint controlPoint
Returns
Type Description
SplineModificationInfo

SetControlPoints(Vector3[])

Set all control points and recalculate.

Declaration
public override void SetControlPoints(Vector3[] controlPoints)
Parameters
Type Name Description
UnityEngine.Vector3[] controlPoints
Overrides
Spline.SetControlPoints(Vector3[])

SetControlPoints(KochanekBartelsControlPoint[])

Declaration
public void SetControlPoints(KochanekBartelsControlPoint[] controlPoints)
Parameters
Type Name Description
KochanekBartelsControlPoint[] controlPoints
In This Article
Back to top Generated by DocFX