void UnionExtentsForFaces( IEnumerable<FaceHandle> hFaces, Transform transform, Sandbox.PolygonMesh/FaceExtents extents )

book_4_sparkGenerated
code_blocksInput

Description

The UnionExtentsForFaces method is used to compute the union of extents for a collection of faces in a polygon mesh. This method takes into account the transformation applied to the mesh and updates the provided FaceExtents object with the resulting union of extents.

Usage

To use the UnionExtentsForFaces method, you need to provide the following parameters:

  • hFaces: An IEnumerable of HalfEdgeMesh.FaceHandle representing the faces for which the extents are to be computed.
  • transform: A Transform object that represents the transformation applied to the mesh.
  • extents: A FaceExtents object that will be updated with the union of the extents of the specified faces.

Example

// Example usage of UnionExtentsForFaces
var polygonMesh = new PolygonMesh();
var faceHandles = new List<HalfEdgeMesh.FaceHandle> { /* Add face handles here */ };
var transform = new Transform();
var faceExtents = new PolygonMesh.FaceExtents();

polygonMesh.UnionExtentsForFaces(faceHandles, transform, faceExtents);

// faceExtents now contains the union of the extents for the specified faces.