reverseIndicesSingleFacet MethodStatic

Reverse the indices for the specified facet in the specified index array.

  • Parameterized over type T so non-number data (e.g., boolean visibility flags) can be reversed.

reverseIndicesSingleFacet<T>(facetIndex: number, facetStartIndex: number[], indices: T[], preserveStart: boolean): boolean

Parameter Type Description
facetIndex number index of the facet to reverse. The entries of indices to be reversed are found at
facetStartIndex[facetIndex] <= i < facetStartIndex[facetIndex + 1].
facetStartIndex number[] start indices of consecutive facets, e.g., an IndexedPolyface's _facetStart array.
See reverseIndices.
indices T[] the index array, e.g., pointIndex, normalIndex, etc.
preserveStart boolean true to preserve the start index of each facet (e.g., facet [1,2,3,4] becomes [1,4,3,2]);
false to reverse all indices (e.g., facet [1,2,3,4] becomes [4,3,2,1]).

Returns - boolean

Defined in

Last Updated: 17 May, 2024