Class BuildRasterizedPath
- Namespace
- FluffyUnderware.Curvy.Generator.Modules
Rasterizes a Path, i.e. samples it into a finite list of points based on the given resolution parameters.
public class BuildRasterizedPath : CGModule, IPathProvider
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourDTVersionedMonoBehaviourBuildRasterizedPath
- Implements
- Inherited Members
Remarks
Most modules that consume paths do their own rasterization on the fly. Use this module when you need a rasterized path explicitly, for example when attaching a PathController to a path without going through BuildShapeExtrusion.
Fields
InPath
[HideInInspector]
[InputSlotInfo(typeof(CGPath), Name = "Path", RequestDataOnly = true)]
public CGModuleInputSlot InPath
Field Value
OutPath
[HideInInspector]
[OutputSlotInfo(typeof(CGPath), Name = "Path", DisplayName = "Rasterized Path")]
public CGModuleOutputSlot OutPath
Field Value
Properties
AngleThreshold
The maximum angle between consecutive path segments, in degrees, used when Optimize is enabled
public float AngleThreshold { get; set; }
Property Value
From
The start of the rasterization range, as a relative distance (between 0 and 1) on the source path
public float From { get; set; }
Property Value
Length
The length of the rasterization range
public float Length { get; set; }
Property Value
Optimize
When enabled, segments are placed based on the path's curvature rather than at a fixed distance. Fewer segments are used on straight sections, more on curves.
public bool Optimize { get; set; }
Property Value
- See Also
Path
The rasterized path output, or null if not yet computed
[CanBeNull]
public CGPath Path { get; }
Property Value
PathIsClosed
Whether the input path is closed
public bool PathIsClosed { get; }
Property Value
Resolution
Defines how densely the path spline's sampling points are. When the value is 100, the number of sampling points per world distance unit is equal to the spline's MaxPointsPerUnit
public int Resolution { get; set; }
Property Value
To
The end of the rasterization range, as a relative distance (between 0 and 1) on the source path
public float To { get; set; }
Property Value
UseBuggedRange
Curvy versions prior to 8.0.0 had a bug in the computation of the rasterization range for closed splines. Enable this value to keep that bugged behaviour if your project depends on it
public bool UseBuggedRange { get; set; }
Property Value
Methods
Refresh()
Add Module processing code in here
public override void Refresh()