Constructor NativeSpline
NativeSpline(ISpline, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(ISpline spline, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
ISpline | spline | The ISpline object to convert to a NativeSpline. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(ISpline, bool, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(ISpline spline, bool cacheUpVectors, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
ISpline | spline | The ISpline object to convert to a NativeSpline. |
bool | cacheUpVectors | Whether to cache the values of the Up vectors along the entire spline to reduce the time it takes to access those Up vectors. If you set this to true, the creation of native splines might be less performant because all the Up vectors along the spline are computed. Consider how often you need to access the values of Up vectors along the spline before you cache them. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(ISpline, float4x4, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(ISpline spline, float4x4 transform, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
ISpline | spline | The ISpline object to convert to a NativeSpline. |
float4x4 | transform | A transform matrix to be applied to the spline knots and tangents. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(ISpline, float4x4, bool, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(ISpline spline, float4x4 transform, bool cacheUpVectors, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
ISpline | spline | The ISpline object to convert to a NativeSpline. |
float4x4 | transform | A transform matrix to be applied to the spline knots and tangents. |
bool | cacheUpVectors | Whether to cache the values of the Up vectors along the entire spline to reduce the time it takes to access those Up vectors. If you set this to true, the creation of native splines might be less performant because all the Up vectors along the spline are computed. Consider how often you need to access the values of Up vectors along the spline before you cache them. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(IReadOnlyList<BezierKnot>, bool, float4x4, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(IReadOnlyList<BezierKnot> knots, bool closed, float4x4 transform, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<BezierKnot> | knots | A collection of sequential BezierKnot forming the spline path. |
bool | closed | Whether the spline is open (has a start and end point) or closed (forms an unbroken loop). |
float4x4 | transform | Apply a transformation matrix to the control Knots. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(IReadOnlyList<BezierKnot>, bool, float4x4, bool, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(IReadOnlyList<BezierKnot> knots, bool closed, float4x4 transform, bool cacheUpVectors, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<BezierKnot> | knots | A collection of sequential BezierKnot forming the spline path. |
bool | closed | Whether the spline is open (has a start and end point) or closed (forms an unbroken loop). |
float4x4 | transform | Apply a transformation matrix to the control Knots. |
bool | cacheUpVectors | Whether to cache the values of the Up vectors along the entire spline to reduce the time it takes to access those Up vectors. If you set this to true, the creation of native splines might be less performant because all the Up vectors along the spline are computed. Consider how often you need to access the values of Up vectors along the spline before you cache them. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(IReadOnlyList<BezierKnot>, IReadOnlyList<int>, bool, float4x4, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(IReadOnlyList<BezierKnot> knots, IReadOnlyList<int> splits, bool closed, float4x4 transform, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<BezierKnot> | knots | A collection of sequential BezierKnot forming the spline path. |
IReadOnlyList<int> | splits | A collection of knot indices that should be considered degenerate curves for the purpose of creating a non-interpolated gap between curves. |
bool | closed | Whether the spline is open (has a start and end point) or closed (forms an unbroken loop). |
float4x4 | transform | Apply a transformation matrix to the control Knots. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |
NativeSpline(IReadOnlyList<BezierKnot>, IReadOnlyList<int>, bool, float4x4, bool, Allocator)
Create a new NativeSpline from a set of BezierKnot.
Declaration
public NativeSpline(IReadOnlyList<BezierKnot> knots, IReadOnlyList<int> splits, bool closed, float4x4 transform, bool cacheUpVectors, Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<BezierKnot> | knots | A collection of sequential BezierKnot forming the spline path. |
IReadOnlyList<int> | splits | A collection of knot indices that should be considered degenerate curves for the purpose of creating a non-interpolated gap between curves. |
bool | closed | Whether the spline is open (has a start and end point) or closed (forms an unbroken loop). |
float4x4 | transform | Apply a transformation matrix to the control Knots. |
bool | cacheUpVectors | Whether to cache the values of the Up vectors along the entire spline to reduce the time it takes to access those Up vectors. If you set this to true, the creation of native splines might be less performant because all the Up vectors along the spline are computed. Consider how often you need to access the values of Up vectors along the spline before you cache them. |
Allocator | allocator | The memory allocation method to use when reserving space for native arrays. |