Helper class for generating stroke meshes.
Public Member Functions | |
List< Mesh > | GenerateMeshes (VectorPath path) |
Generates one or more stroke meshes for the given path. More... | |
Public Member Functions inherited from Loonim.StrokePath | |
void | Generate (VectorPath path) |
Generates a stroke now using these settings. Note that the given path may be modified. More... | |
void | MoveTo (float x, float y) |
void | AddPoint (float x, float y, float c) |
Public Attributes | |
Vector2 | UvMultiplier =Vector2.one |
The UV's of the stroke go from 0 to 1. This is multiplied by it. Note that the mapping is such that x goes from 0-1 "along" the stroke. More... | |
List< Mesh > | Output |
The output set. More... | |
Public Attributes inherited from Loonim.StrokePath | |
float | Accuracy =1f |
The curve sampling accuracy (in terms of pixels). More... | |
int | LineCapMode |
The line cap mode. More... | |
int | LineJoinMode |
The line join mode. More... | |
float | Width |
The width of the stroke. More... | |
float | MiterLimit =4f |
The miter limit. More... | |
CurveSampler | WidthFunction |
A width function. Varies the width of the stroke (between 1 and 0). It's multiplied by Width. More... | |
Protected Member Functions | |
override void | StartMesh (bool closed, int lineCount) |
Called when we're starting to emit a mesh. More... | |
override void | EmitLine (StrokePoint inner, StrokePoint outer) |
Called when we're emitting a line segment. More... | |
override void | EndMesh () |
Called when we're done emitting a mesh. More... | |
Private Attributes | |
bool | FirstLine |
True if we're receiving the first line. More... | |
Vector2[] | UV1 |
The computed UVs. More... | |
Vector3[] | Vertices |
The computed vertices. More... | |
int[] | Triangles |
The computed triangles set. More... | |
int | VertexIndex =0 |
Current vertex index. More... | |
int | TriangleIndex =0 |
Current triangle index. More... | |
Additional Inherited Members | |
Properties inherited from Loonim.StrokePath | |
bool | IncludeFirstNode [get] |
float | SampleDistance [get, set] |
|
inlineprotectedvirtual |
Called when we're emitting a line segment.
Reimplemented from Loonim.StrokePath.
|
inlineprotectedvirtual |
Called when we're done emitting a mesh.
Reimplemented from Loonim.StrokePath.
|
inline |
Generates one or more stroke meshes for the given path.
|
inlineprotectedvirtual |
Called when we're starting to emit a mesh.
Reimplemented from Loonim.StrokePath.
|
private |
True if we're receiving the first line.
List<Mesh> Loonim.StrokePathMesh.Output |
The output set.
|
private |
Current triangle index.
|
private |
The computed triangles set.
|
private |
The computed UVs.
Vector2 Loonim.StrokePathMesh.UvMultiplier =Vector2.one |
The UV's of the stroke go from 0 to 1. This is multiplied by it. Note that the mapping is such that x goes from 0-1 "along" the stroke.
|
private |
Current vertex index.
|
private |
The computed vertices.