MeshGeometry.copy constructor
- MeshGeometry mesh
Implementation
MeshGeometry.copy(MeshGeometry mesh)
: stride = mesh.stride,
length = mesh.length,
attribs = mesh.attribs {
// Copy the buffer
buffer = Float32List(mesh.buffer.length);
buffer.setAll(0, mesh.buffer);
// Copy the indices
if (mesh.indices != null) {
indices = Uint16List(mesh.indices!.length)..setAll(0, mesh.indices!);
}
}