Class Circle
Create a circle shape to be extruded along a spline.
___
/ \
| |
\ /
---
Implements
Inherited Members
Namespace: UnityEngine.Splines.ExtrusionShapes
Assembly: Unity.Splines.dll
Syntax
[Serializable]
public sealed class Circle : IExtrudeShape
Properties
SideCount
How many vertices make up a single ring around the mesh.
Declaration
public int SideCount { get; set; }
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. |
See Also
Setup(ISpline, int)
Implement this function to access information about the ISpline path being extruded and number of segments. SplineMesh invokes this method once prior to extruding the mesh.
Declaration
public void Setup(ISpline path, int segmentCount)
Parameters
Type | Name | Description |
---|---|---|
ISpline | path | The ISpline that this template is being extruded along. |
int | segmentCount | The total number of segments to be created on the extruded mesh. This is equivalent to the number of vertex "rings" that make up the mesh positions. |