PathGeneratorCreateCurve Method |
Create a quad/bezier curve that curves using two control points from start to end.
Namespace:
DigitalRuby.ThunderAndLightning
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static float CreateCurve(
ICollection<Vector3> path,
Vector3 start,
Vector3 end,
Vector3 ctr1,
Vector3 ctr2,
int numberOfSegments,
float startT
)
Public Shared Function CreateCurve (
path As ICollection(Of Vector3),
start As Vector3,
end As Vector3,
ctr1 As Vector3,
ctr2 As Vector3,
numberOfSegments As Integer,
startT As Single
) As Single
public:
static float CreateCurve(
ICollection<Vector3>^ path,
Vector3 start,
Vector3 end,
Vector3 ctr1,
Vector3 ctr2,
int numberOfSegments,
float startT
)
static member CreateCurve :
path : ICollection<Vector3> *
start : Vector3 *
end : Vector3 *
ctr1 : Vector3 *
ctr2 : Vector3 *
numberOfSegments : int *
startT : float32 -> float32
Parameters
- path
- Type: System.Collections.GenericICollectionVector3
Receives the path points. Collection is not cleared. - start
- Type: Vector3
Start point - end
- Type: Vector3
End point - ctr1
- Type: Vector3
Control point 1 - ctr2
- Type: Vector3
Control point 2 - numberOfSegments
- Type: SystemInt32
Number of segments. The higher this number, the more points are sampled. - startT
- Type: SystemSingle
Start t. This can be the return value of a previous call to maintain a smooth path.
Return Value
Type:
SingleLeftover t. This can be passed back in to startT to continue a path smoothly.
See Also