C# 클래스 TriangleNet.Quality

Provides methods for mesh quality enforcement and testing.
파일 보기 프로젝트 열기: RegrowthStudios/VoxelRTS 1 사용 예제들

공개 메소드들

메소드 설명
AddBadSubseg ( TriangleNet.Data.BadSubseg badseg ) : void

Add a bad subsegment to the queue.

CheckDelaunay ( ) : bool

Ensure that the mesh is (constrained) Delaunay.

CheckMesh ( ) : bool

Test the mesh for topological consistency.

CheckSeg4Encroach ( TriangleNet.Data.Osub &testsubseg ) : int

Check a subsegment to see if it is encroached; add it to the list if it is.

A subsegment is encroached if there is a vertex in its diametral lens. For Ruppert's algorithm (-D switch), the "diametral lens" is the diametral circle. For Chew's algorithm (default), the diametral lens is just big enough to enclose two isosceles triangles whose bases are the subsegment. Each of the two isosceles triangles has two angles equal to 'b.minangle'. Chew's algorithm does not require diametral lenses at all--but they save time. Any vertex inside a subsegment's diametral lens implies that the triangle adjoining the subsegment will be too skinny, so it's only a matter of time before the encroaching vertex is deleted by Chew's algorithm. It's faster to simply not insert the doomed vertex in the first place, which is why I use diametral lenses with Chew's algorithm.

EnforceQuality ( ) : void

Remove all the encroached subsegments and bad triangles from the triangulation.

Quality ( Mesh mesh ) : System
TestTriangle ( TriangleNet.Data.Otri &testtri ) : void

Test a triangle for quality and size.

Tests a triangle to see if it satisfies the minimum angle condition and the maximum area condition. Triangles that aren't up to spec are added to the bad triangle queue.

비공개 메소드들

메소드 설명
SplitEncSegs ( bool triflaws ) : void

Split all the encroached subsegments.

Each encroached subsegment is repaired by splitting it - inserting a vertex at or near its midpoint. Newly inserted vertices may encroach upon other subsegments; these are also repaired.

SplitTriangle ( TriangleNet.Data.BadTriangle badtri ) : void

Inserts a vertex at the circumcenter of a triangle. Deletes the newly inserted vertex if it encroaches upon a segment.

TallyEncs ( ) : void

Traverse the entire list of subsegments, and check each to see if it is encroached. If so, add it to the list.

TallyFaces ( ) : void

Test every triangle in the mesh for quality measures.

메소드 상세

AddBadSubseg() 공개 메소드

Add a bad subsegment to the queue.
public AddBadSubseg ( TriangleNet.Data.BadSubseg badseg ) : void
badseg TriangleNet.Data.BadSubseg Bad subsegment.
리턴 void

CheckDelaunay() 공개 메소드

Ensure that the mesh is (constrained) Delaunay.
public CheckDelaunay ( ) : bool
리턴 bool

CheckMesh() 공개 메소드

Test the mesh for topological consistency.
public CheckMesh ( ) : bool
리턴 bool

CheckSeg4Encroach() 공개 메소드

Check a subsegment to see if it is encroached; add it to the list if it is.
A subsegment is encroached if there is a vertex in its diametral lens. For Ruppert's algorithm (-D switch), the "diametral lens" is the diametral circle. For Chew's algorithm (default), the diametral lens is just big enough to enclose two isosceles triangles whose bases are the subsegment. Each of the two isosceles triangles has two angles equal to 'b.minangle'. Chew's algorithm does not require diametral lenses at all--but they save time. Any vertex inside a subsegment's diametral lens implies that the triangle adjoining the subsegment will be too skinny, so it's only a matter of time before the encroaching vertex is deleted by Chew's algorithm. It's faster to simply not insert the doomed vertex in the first place, which is why I use diametral lenses with Chew's algorithm.
public CheckSeg4Encroach ( TriangleNet.Data.Osub &testsubseg ) : int
testsubseg TriangleNet.Data.Osub The subsegment to check.
리턴 int

EnforceQuality() 공개 메소드

Remove all the encroached subsegments and bad triangles from the triangulation.
public EnforceQuality ( ) : void
리턴 void

Quality() 공개 메소드

public Quality ( Mesh mesh ) : System
mesh Mesh
리턴 System

TestTriangle() 공개 메소드

Test a triangle for quality and size.
Tests a triangle to see if it satisfies the minimum angle condition and the maximum area condition. Triangles that aren't up to spec are added to the bad triangle queue.
public TestTriangle ( TriangleNet.Data.Otri &testtri ) : void
testtri TriangleNet.Data.Otri Triangle to check.
리턴 void