reverseIndices MethodStatic

Reverse the indices for the specified facets in the given index array.

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

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

Parameter Type Description
facetStartIndex number[] start indices of consecutive facets to be reversed, e.g., an IndexedPolyface's _facetStart
array. See the non-static 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