TriMesh.Write16bIndicesTo
TriMesh.Write16bIndicesTo method
Write the indices data as 16bit integer to the stream
public void Write16bIndicesTo(Stream stream)
Parameter | Type | Description |
---|---|---|
stream | Stream |
Examples
//convert a mesh to TriMesh, the layout is automatically inferred from input mesh
var triMesh = TriMesh.FromMesh(new Sphere().ToMesh());
//save it to a stream, 115 vertices * 32bytes per vertex
var stream = new MemoryStream();
triMesh.WriteVerticesTo(stream);
//save indices as ushort to stream, 504 indices * 2 bytes per index
triMesh.Write16bIndicesTo(stream);
See Also
- class TriMesh
- namespace Aspose.ThreeD.Entities
- assembly Aspose.3D