本文整理汇总了Java中org.poly2tri.triangulation.delaunay.DelaunayTriangle.clearDelunayEdges方法的典型用法代码示例。如果您正苦于以下问题:Java DelaunayTriangle.clearDelunayEdges方法的具体用法?Java DelaunayTriangle.clearDelunayEdges怎么用?Java DelaunayTriangle.clearDelunayEdges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.poly2tri.triangulation.delaunay.DelaunayTriangle
的用法示例。
在下文中一共展示了DelaunayTriangle.clearDelunayEdges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: nextFlipTriangle
import org.poly2tri.triangulation.delaunay.DelaunayTriangle; //导入方法依赖的package包/类
/**
* After a flip we have two triangles and know that only one will still be
* intersecting the edge. So decide which to contiune with and legalize the other
*
* @param tcx
* @param o - should be the result of an orient2d( eq, op, ep )
* @param t - triangle 1
* @param ot - triangle 2
* @param p - a point shared by both triangles
* @param op - another point shared by both triangles
* @return returns the triangle still intersecting the edge
*/
private static DelaunayTriangle nextFlipTriangle( DTSweepContext tcx,
Orientation o,
DelaunayTriangle t,
DelaunayTriangle ot,
TriangulationPoint p,
TriangulationPoint op)
{
int edgeIndex;
if( o == Orientation.CCW )
{
// ot is not crossing edge after flip
edgeIndex = ot.edgeIndex( p, op );
ot.dEdge[edgeIndex] = true;
legalize( tcx, ot );
ot.clearDelunayEdges();
return t;
}
// t is not crossing edge after flip
edgeIndex = t.edgeIndex( p, op );
t.dEdge[edgeIndex] = true;
legalize( tcx, t );
t.clearDelunayEdges();
return ot;
}
示例2: nextFlipTriangle
import org.poly2tri.triangulation.delaunay.DelaunayTriangle; //导入方法依赖的package包/类
/**
* After a flip we have two triangles and know that only one will still be
* intersecting the edge. So decide which to contiune with and legalize the other
*
* @param tcx
* @param o - should be the result of an orient2d( eq, op, ep )
* @param t - triangle 1
* @param ot - triangle 2
* @param p - a point shared by both triangles
* @param op - another point shared by both triangles
* @return returns the triangle still intersecting the edge
*/
private static DelaunayTriangle nextFlipTriangle( DTSweepContext tcx,
Orientation o,
DelaunayTriangle t,
DelaunayTriangle ot,
TriangulationPoint p,
TriangulationPoint op)
{
int edgeIndex;
if( o == Orientation.CCW )
{
// ot is not crossing edge after flip
edgeIndex = ot.edgeIndex( p, op );
ot.dEdge[edgeIndex] = true;
legalize( tcx, ot );
ot.clearDelunayEdges();
return t;
}
// t is not crossing edge after flip
edgeIndex = t.edgeIndex( p, op );
t.dEdge[edgeIndex] = true;
legalize( tcx, t );
t.clearDelunayEdges();
return ot;
}