PolygonModifier.Triangulate

Triangulate(Scene)

Convert all polygon-based meshes into full triangle mesh

public static void Triangulate(Scene scene)
ParameterTypeDescription
sceneSceneThe scene to process

Examples

The following code shows how to merge all objects from a scene into a single mesh.

var mesh = new Cylinder().ToMesh();

//Triangulate this quadrangle-based mesh to triangle-based 
mesh = PolygonModifier.Triangulate(mesh);

var scene = new Scene(mesh);

      scene.Save("test.obj");

See Also


Triangulate(Mesh)

Convert a polygon-based mesh into full triangle mesh

public static Mesh Triangulate(Mesh mesh)
ParameterTypeDescription
meshMeshThe original non-triangle mesh

Return Value

The generated new triangle mesh

Examples

The following code shows how to merge all objects from a scene into a single mesh.

var mesh = new Cylinder().ToMesh();

//Triangulate this quadrangle-based mesh to triangle-based 
mesh = PolygonModifier.Triangulate(mesh);

var scene = new Scene(mesh);

      scene.Save("test.obj");

See Also


Triangulate(IList<Vector4>, IList<int[]>, bool, out Vector3[])

public static int[][] Triangulate(IList<Vector4> controlPoints, IList<int[]> polygons, 
    bool generateNormals, out Vector3[] nor_out)

See Also


Triangulate(IList<Vector4>, IList<int[]>)

public static int[][] Triangulate(IList<Vector4> controlPoints, IList<int[]> polygons)

See Also


Triangulate(IList<Vector4>, int[])

public static int[][] Triangulate(IList<Vector4> controlPoints, int[] polygon)

See Also


Triangulate(IList<Vector4>)

public static int[][] Triangulate(IList<Vector4> controlPoints)

See Also