Detailed Description

Helper class for generating stroke meshes.

Inheritance diagram for Loonim.StrokePathMesh:
Loonim.StrokePath Blaze.PointReceiverStepped

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]
 

Member Function Documentation

override void Loonim.StrokePathMesh.EmitLine ( StrokePoint  inner,
StrokePoint  outer 
)
inlineprotectedvirtual

Called when we're emitting a line segment.

Reimplemented from Loonim.StrokePath.

override void Loonim.StrokePathMesh.EndMesh ( )
inlineprotectedvirtual

Called when we're done emitting a mesh.

Reimplemented from Loonim.StrokePath.

List<Mesh> Loonim.StrokePathMesh.GenerateMeshes ( VectorPath  path)
inline

Generates one or more stroke meshes for the given path.

override void Loonim.StrokePathMesh.StartMesh ( bool  closed,
int  lineCount 
)
inlineprotectedvirtual

Called when we're starting to emit a mesh.

Reimplemented from Loonim.StrokePath.

Member Data Documentation

bool Loonim.StrokePathMesh.FirstLine
private

True if we're receiving the first line.

List<Mesh> Loonim.StrokePathMesh.Output

The output set.

int Loonim.StrokePathMesh.TriangleIndex =0
private

Current triangle index.

int [] Loonim.StrokePathMesh.Triangles
private

The computed triangles set.

Vector2 [] Loonim.StrokePathMesh.UV1
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.

int Loonim.StrokePathMesh.VertexIndex =0
private

Current vertex index.

Vector3 [] Loonim.StrokePathMesh.Vertices
private

The computed vertices.