addSurface method

int addSurface(
  1. Surface surface
)

Add a new surface to this mesh. Return the index of the newly added surface. Surfaces are always added to the end of the list.

Implementation

int addSurface(Surface surface) {
  _surfaces.add(surface);
  updateBounds();
  return _surfaces.length - 1;
}