Class GenericMesher
Create meshes of point sets or polygons.
Inheritance
System.Object
GenericMesher
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.U2D.TriangleNet.Meshing
Syntax
public class GenericMesher
Constructors
GenericMesher()
Declaration
public GenericMesher()
GenericMesher(Configuration)
Declaration
public GenericMesher(Configuration config)
Parameters
Type | Name | Description |
---|---|---|
Configuration | config |
GenericMesher(ITriangulator)
Declaration
public GenericMesher(ITriangulator triangulator)
Parameters
Type | Name | Description |
---|---|---|
ITriangulator | triangulator |
GenericMesher(ITriangulator, Configuration)
Declaration
public GenericMesher(ITriangulator triangulator, Configuration config)
Parameters
Type | Name | Description |
---|---|---|
ITriangulator | triangulator | |
Configuration | config |
Methods
StructuredMesh(Double, Double, Int32, Int32)
Generates a structured mesh with bounds [0, 0, width, height].
Declaration
public static IMesh StructuredMesh(double width, double height, int nx, int ny)
Parameters
Type | Name | Description |
---|---|---|
System.Double | width | Width of the mesh (must be > 0). |
System.Double | height | Height of the mesh (must be > 0). |
System.Int32 | nx | Number of segments in x direction. |
System.Int32 | ny | Number of segments in y direction. |
Returns
Type | Description |
---|---|
IMesh | Mesh |
StructuredMesh(Rectangle, Int32, Int32)
Generates a structured mesh.
Declaration
public static IMesh StructuredMesh(Rectangle bounds, int nx, int ny)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | bounds | Bounds of the mesh. |
System.Int32 | nx | Number of segments in x direction. |
System.Int32 | ny | Number of segments in y direction. |
Returns
Type | Description |
---|---|
IMesh | Mesh |
Triangulate(IList<Vertex>)
Declaration
public IMesh Triangulate(IList<Vertex> points)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<Vertex> | points |
Returns
Type | Description |
---|---|
IMesh |
Triangulate(IPolygon)
Declaration
public IMesh Triangulate(IPolygon polygon)
Parameters
Type | Name | Description |
---|---|---|
IPolygon | polygon |
Returns
Type | Description |
---|---|
IMesh |
Triangulate(IPolygon, ConstraintOptions)
Declaration
public IMesh Triangulate(IPolygon polygon, ConstraintOptions options)
Parameters
Type | Name | Description |
---|---|---|
IPolygon | polygon | |
ConstraintOptions | options |
Returns
Type | Description |
---|---|
IMesh |
Triangulate(IPolygon, ConstraintOptions, QualityOptions)
Declaration
public IMesh Triangulate(IPolygon polygon, ConstraintOptions options, QualityOptions quality)
Parameters
Type | Name | Description |
---|---|---|
IPolygon | polygon | |
ConstraintOptions | options | |
QualityOptions | quality |
Returns
Type | Description |
---|---|
IMesh |
Triangulate(IPolygon, QualityOptions)
Declaration
public IMesh Triangulate(IPolygon polygon, QualityOptions quality)
Parameters
Type | Name | Description |
---|---|---|
IPolygon | polygon | |
QualityOptions | quality |
Returns
Type | Description |
---|---|
IMesh |