PolygonMesh
Namespace:FairyGUI
Source:Assets/Scripts/Core/Mesh/PolygonMesh.cs (line 9)
public class PolygonMesh : IMeshFactory, IHitTest
Interfaces:IMeshFactory, IHitTest
Constructors
PolygonMesh()
public PolygonMesh();
Source:Core/Mesh/PolygonMesh.cs (line 48)
Fields
colors
public Color32[] colors;
Source:Core/Mesh/PolygonMesh.cs (line 39)
fillColor
public Color32? fillColor;
Source:Core/Mesh/PolygonMesh.cs (line 34)
lineColor
public Color32 lineColor;
Source:Core/Mesh/PolygonMesh.cs (line 29)
lineWidth
public float lineWidth;
Source:Core/Mesh/PolygonMesh.cs (line 24)
points
public readonly List<Vector2> points;
points must be in clockwise order, and must start from bottom-left if stretchUV is set.
Source:Core/Mesh/PolygonMesh.cs (line 14)
texcoords
public readonly List<Vector2> texcoords;
if you dont want to provide uv, leave it empty.
Source:Core/Mesh/PolygonMesh.cs (line 19)
usePercentPositions
public bool usePercentPositions;
Source:Core/Mesh/PolygonMesh.cs (line 44)
Methods
Add(Vector2)
public void Add(Vector2 point);
| Parameter | Type | Description |
|---|---|---|
point | Vector2 |
Source:Core/Mesh/PolygonMesh.cs (line 58)
Add(Vector2, Vector2)
public void Add(Vector2 point, Vector2 texcoord);
| Parameter | Type | Description |
|---|---|---|
point | Vector2 | |
texcoord | Vector2 |
Source:Core/Mesh/PolygonMesh.cs (line 68)
HitTest(Rect, Vector2)
public bool HitTest(Rect contentRect, Vector2 point);
| Parameter | Type | Description |
|---|---|---|
contentRect | Rect | |
point | Vector2 |
Source:Core/Mesh/PolygonMesh.cs (line 250)
OnPopulateMesh(VertexBuffer)
public void OnPopulateMesh(VertexBuffer vb);
| Parameter | Type | Description |
|---|---|---|
vb | VertexBuffer |
Source:Core/Mesh/PolygonMesh.cs (line 74)