setNumWrap Method

Set the number of vertices replicated in visitor arrays (both data and index arrays).

  • 0,1,2 are the most common as numWrap.
  • Example: suppose [6,7,8] is the pointIndex array representing a triangle. First edge would be 6,7. Second edge is 7,8. Third edge is 8,6. To access 6 for the third edge, we have to go back to the start of array. Therefore, it is useful to store 6 at the end of pointIndex array, i.e., [6,7,8,6] meaning numWrap = 1.
  • numWrap = 2 is useful when vertex visit requires two adjacent vectors, e.g. for cross products.

setNumWrap(numWrap: number): void

Parameter Type Description
numWrap number  

Returns - void

Defined in

Last Updated: 04 May, 2024