Struct ExtrudeSettings<T>
Contains settings pertaining to the creation of mesh geometry for an
extruded shape. Use with Spline
Inherited Members
Namespace: UnityEngine .Splines
Assembly: Unity.Splines.dll
Syntax
public struct ExtrudeSettings<T> where T : IExtrudeShape
Type Parameters
Name | Description |
---|---|
T | A type implementing IExtrude |
Constructors
ExtrudeSettings(int, bool, float2, float, T)
Create a new settings object. This is used by functions in
Spline
Declaration
public ExtrudeSettings(int segments, bool capped, float2 range, float radius, T shape)
Parameters
Type | Name | Description |
---|---|---|
int | segments | The number of segments to divide the extruded spline into when creating vertex rings. |
bool | capped | Defines whether the ends of the extruded spline mesh should be closed. |
float2 | range | The start and end points as normalized interpolation values. |
float | radius | Defines the size of the extruded mesh. |
T | shape | The IExtrude |
ExtrudeSettings(T)
Create a new settings object with an IExtrude
Declaration
public ExtrudeSettings(T shape)
Parameters
Type | Name | Description |
---|---|---|
T | shape | The IExtrude |
Properties
CapEnds
Whether the start and end of the mesh is filled. This setting is ignored when the extruded spline is closed. Important note - cap are triangulated using a method that assumes convex geometry. If the input shape is concave, caps may show visual artifacts or overlaps.
Declaration
public bool CapEnds { get; set; }
Property Value
Type | Description |
---|---|
bool |
FlipNormals
Set true to reverse the winding order of vertices so that the face normals are inverted. This is useful
primarily for Spline
Declaration
public bool FlipNormals { get; set; }
Property Value
Type | Description |
---|---|
bool |
Radius
The radius of the extruded mesh. Radius is half of the width of the entire shape.
The return value of Get
Declaration
public float Radius { get; set; }
Property Value
Type | Description |
---|---|
float |
Range
The section of the Spline to extrude. This value expects a normalized interpolation start and end. I.e., [0,1] is the entire Spline, whereas [.5, 1] is the last half of the Spline.
Declaration
public float2 Range { get; set; }
Property Value
Type | Description |
---|---|
float2 |
SegmentCount
How many sections compose the length of the mesh.
Declaration
public int SegmentCount { get; set; }
Property Value
Type | Description |
---|---|
int |
Shape
The IExtrude
Declaration
public T Shape { get; set; }
Property Value
Type | Description |
---|---|
T |