AlternatingCCTreeBuilder Class

Context structure for building an AlternatingConvexClipTreeNode from a polygon.

  • The polygon is copied to the local m_points structure.
  • During construction, m_stack contains indices of a sequence of points with uniform concavity.


Name Description
buildHullTree(root: AlternatingCCTreeNode): boolean

  • Input a ClipTreeRoot that has start and count data
  • Build the hull for that data range
  • Store the hull points in the root
  • Add children with start and count data
  • Recursively move to children
collectHullChain(kStart: number, numK: number, sign: number): void    
cyclicStackPoint(cyclicIndex: number): Point3d    
extendHullChain(k: number, sign: number, pushAfterPops: boolean): void Pop from the stack until the sign condition is satisfied  
indexAfter(i: number): number    
indexBefore(i: number): number    
pushIndex(primaryPointIndex: number): void    
signFromStackTip(pointIndex: number, sign: number): 1 | -1    
createPointsRef(points: Point3d[], result?: AlternatingCCTreeBuilder): AlternatingCCTreeBuilder Static    


Name Type Description
indexOfMaxX Accessor ReadOnly number    
period Accessor ReadOnly number    

Defined in

Last Updated: 20 September, 2019