AddMeshInstances() public method

Add multiple mesh instances to the combiner, allocating space for them all up-front.
public AddMeshInstances ( IEnumerable instances ) : void
instances IEnumerable The instances to add.
return void
    /// <summary>
    /// Combine the given mesh instances into a single mesh and return it.
    /// </summary>
    /// <param name="instances">The mesh instances to combine.</param>
    /// <param name="generateStrips">true to use triangle strips, false to use triangle lists.</param>
    /// <returns>A combined mesh.</returns>
    public static Mesh Combine(IEnumerable <MeshInstance> instances, bool generateStrips)
    {
        var processor = new MeshCombineUtility(generateStrips);

        processor.AddMeshInstances(instances);
        return(processor.CreateCombinedMesh());
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Combine the given mesh instances into a single mesh and return it.
 /// </summary>
 /// <param name="instances">The mesh instances to combine.</param>
 /// <param name="generateStrips">true to use triangle strips, false to use triangle lists.</param>
 /// <returns>A combined mesh.</returns>
 public static Mesh Combine(IEnumerable<MeshInstance> instances, bool generateStrips)
 {
     var processor = new MeshCombineUtility(generateStrips);
     processor.AddMeshInstances(instances);
     return processor.CreateCombinedMesh();
 }