类别要求

IPolygon

Tiangle

SubPolygon

Step

Intersection

Tessellation

Octree

Classify

click to edit

Triangle-AABB intersection

tiangle-triangle test

add and merge points

store valid edge, face pbi

refine edge pbi

refine face pbi

tessellation

create tess graph

extract faces #

remove overlap

resolve cross and overlap

find isolated components

Global

plane-based rep

vertex-based vertex

vertex

plane

Options

triangulation?

geometry primitive

mesh list

edge list

vertex list

triangle list

subpolygon list

with hole

without hole

circular sort

node neighbor

connection end points

find next cons

mark edge point

get connected component

determine orientation

通过连接外部点,得到的连线和这个component的最外相交,(必然是外层loop的一部分),以及这个连线的方向,可以确定外层loop的方向,和属于的那个包裹loop的方向。

data structure

components

loops

algorithm

找一个顶点和最外层loop相连

用这个connection跟所有其他的connection求交

linear sort

找到相交对

确定merge的两个loop

pbi相交

pbi顶点相交

plane

connection

vertex_id

node

可以用plane表示

cyPointT

如果是connection,则测试connection.ver_plane跟这个线的关系

如果是vertex,则在vertex周围做一个bsp,判断远端点在bsp内还是外部

检查

pbi检查

triangle检查

tess-graph检查

facepbi

edgepbi

方向和edge一致

pends

vert的方向正确

pends

没有重复的点

每个pbi引用的点在内

孤立点不在任何一个pbi上

detect intersection

倒叙

需要loop idx

需要两个相邻的con

需要检测相邻的con是否包含了点

需要遍历每一对相邻con

pbi的引用一定会在points当中,因为这个阶段那就是这样设计的。此时没有任何edge被合并,只有coincidnet vertex被关联起来。

refine

没有新的边生成,有的只是新的pbi,以及pbi之间的合并。有新的顶点生成,这些顶点不可能是原来已有的顶点(否则一定已经被记录在face或者边上)

pick a seed

不能放在已经废弃的上面。