A pool of mesh buffers are used during GPU shape draws. They store generated meshes and display them to a TextureCamera.
Public Member Functions | |
MeshBuffer () | |
void | CreateGameObject () |
void | AddMesh (VectorPath path, float xOffset, float yOffset, Triangulator triangulator) |
void | AddPoint (float x, float y) |
void | MoveTo (float x, float y) |
void | SetActive (bool active) |
void | RequireSize (int verts, int tris) |
void | Flush () |
Public Attributes | |
float | XScaleFactor =-10f |
A number to scale the mesh by. More... | |
float | YScaleFactor =10f |
A number to scale the mesh by. More... | |
float | XOffset |
A number to offset the mesh by on x. More... | |
float | YOffset |
A number to offset the mesh by on y. More... | |
Mesh | Mesh |
The underlying unity mesh. More... | |
int | TotalVertices |
The total number of verts being used. Note that it's not necessarily the same as Vertices.Length. More... | |
Vector3[] | Vertices |
The computed vertices. More... | |
Color32[] | Colours |
The vertex colour set. More... | |
int[] | Triangles |
Triangle set. More... | |
int | CurrentVertex |
Current vertex progress. More... | |
int | CurrentTriangle |
Current triangle progress. More... | |
MeshBuffer | NextInPool |
Pooled meshes are stored as a linked list. More... | |
Static Public Attributes | |
static Material | SharedMaterial |
The material shared by all mesh buffers. More... | |
Package Attributes | |
GameObject | Gameobject |
The gameobject the mesh is attached to. More... | |
Properties | |
float | SampleDistance [get, set] |
Properties inherited from Blaze.PointReceiver | |
float | SampleDistance [get, set] |
Private Attributes | |
bool | CloseBeforeThis =true |
True if there is a close before the current node. More... | |
bool | IsClosing |
Is the current rendering node a close? More... | |
float | CloseX |
The close x coordinate. More... | |
float | CloseY |
The close y coordinate. More... | |
float | PreviousX |
The previous x coordinate. More... | |
float | PreviousY |
The previous y coordinate. More... | |
float | PreviousInnerSpread |
The inner spread used by the previous segment. More... | |
float | PreviousOuterSpread |
The outer spread used by the previous segment. More... | |
int | StartIndex |
Vertex index of the "first" tent on a path. More... | |
bool | Moved =true |
True if a MoveTo just occured. More... | |
MoveFromPoint | LatestMoveFrom |
The stack of non-closed MoveTo nodes. More... | |
float | CurrentAccuracy |
The current curve sampling accuracy. More... | |
bool | Winding =true |
Triangulator | Triangulator =null |
TriangulationVertex | FirstInContour |
TriangulationVertex | LastInContour |
Static Private Attributes | |
static readonly Color32 | MidGrey =new Color32(255,255,255,127) |
static readonly Color32 | White =new Color32(255,255,255,255) |
static readonly Color32 | Black =new Color32(255,255,255,0) |
|
inline |
|
inline |
|
inline |
Implements Blaze.PointReceiver.
|
inline |
|
inline |
|
inline |
Implements Blaze.PointReceiver.
|
inline |
|
inline |
|
staticprivate |
|
private |
True if there is a close before the current node.
|
private |
The close x coordinate.
|
private |
The close y coordinate.
Color32 [] Blaze.MeshBuffer.Colours |
The vertex colour set.
|
private |
The current curve sampling accuracy.
int Blaze.MeshBuffer.CurrentTriangle |
Current triangle progress.
int Blaze.MeshBuffer.CurrentVertex |
Current vertex progress.
|
private |
|
package |
The gameobject the mesh is attached to.
|
private |
Is the current rendering node a close?
|
private |
|
private |
The stack of non-closed MoveTo nodes.
Mesh Blaze.MeshBuffer.Mesh |
The underlying unity mesh.
|
staticprivate |
|
private |
True if a MoveTo just occured.
MeshBuffer Blaze.MeshBuffer.NextInPool |
Pooled meshes are stored as a linked list.
|
private |
The inner spread used by the previous segment.
|
private |
The outer spread used by the previous segment.
|
private |
The previous x coordinate.
|
private |
The previous y coordinate.
|
static |
The material shared by all mesh buffers.
|
private |
Vertex index of the "first" tent on a path.
int Blaze.MeshBuffer.TotalVertices |
The total number of verts being used. Note that it's not necessarily the same as Vertices.Length.
int [] Blaze.MeshBuffer.Triangles |
Triangle set.
|
private |
Vector3 [] Blaze.MeshBuffer.Vertices |
The computed vertices.
|
staticprivate |
|
private |
float Blaze.MeshBuffer.XOffset |
A number to offset the mesh by on x.
float Blaze.MeshBuffer.XScaleFactor =-10f |
A number to scale the mesh by.
float Blaze.MeshBuffer.YOffset |
A number to offset the mesh by on y.
float Blaze.MeshBuffer.YScaleFactor =10f |
A number to scale the mesh by.
|
getset |