Class Road
A simple plane with skirts at the edges to better blend with uneven terrain.
// Looks like this
__________
/ \
Implements
Inherited Members
Namespace: UnityEngine .Splines.ExtrusionShapes
Assembly: Unity.Splines.dll
Syntax
[Serializable]
public sealed class Road : IExtrudeShape
Properties
SideCount
How many vertices make up a single ring around the mesh.
Declaration
public int SideCount { get; }
Property Value
Type | Description |
---|---|
int | How many vertices make up a revolution for each segment of the extruded mesh. |
See Also
Methods
GetPosition(float, int)
This method is responsible for returning a 2D position of the template shape for each vertex of a single
ring around the extruded mesh.
Note that both interpolation t
and index
are provided as a convenience.
Declaration
public float2 GetPosition(float t, int index)
Parameters
Type | Name | Description |
---|---|---|
float | t | The normalized interpolation [0...1] for a vertex around an extruded ring. |
int | index | The index of the vertex in the extruded ring. |
Returns
Type | Description |
---|---|
float2 | A 2D position interpolated along a template shape to be extruded. This value will be converted to a 3D point and rotated to align with the spline at the current segment index. |