MeshBuilder::AllowNestedComponents

Marks that the mesh may contain nested components with winding numbers greater than one

By default, a Mesh models a solid. You can be inside or outside the solid, but not "twice inside". This means that the winding number of this Mesh is always 0 or 1 and surfaces always transition from 0 to 1.

Enabling this means that the mesh might have components that are "twice inside" or more.

Consider two nested sphere surfaces in the same Mesh. If the normals of the outer sphere point outwards and that of the inner inwards, then this is a hollow sphere and NOT a case of nested components. However, if both normals point outwards, then the inner sphere is "twice inside" and has a winding number of 2. In that case, you need to set this property for correct results.

Note:
Allowing surface- or self-intersections already implies nested components. However, the nested sphere example has no surface- or self-intersections. AllowNestedComponents without the intersection flags has less performance penalty than with.
Note:
this is an advanced usage flag of a relatively rare use case.

Signature

class MeshBuilder:
    // Marks that the mesh may contain nested components with winding numbers greater than one
    fun allowNestedComponents()