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 atfacetStartIndex[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
- polyface/PolyfaceData.ts Line 618
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.