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. Continuing this example, numWrap = 2 (i.e., [6,7,8,6,7]) is useful when each vertex visit requires the next two points, e.g., to form two adjacent vectors for a cross product.

setNumWrap(numWrap: number): void

Parameter Type Description
numWrap number  

Returns - void

Defined in

Last Updated: 21 November, 2024