C# Класс LibTessDotNet.Geom

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddWinding ( LibTessDotNet.MeshUtils.Edge eDst, LibTessDotNet.MeshUtils.Edge eSrc ) : void
EdgeEval ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real

Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), evaluates the t-coord of the edge uw at the s-coord of the vertex v. Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. If uw is vertical (and thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even when v is very close to u or w. In particular if we set v->t = 0 and let r be the negated result (this evaluates (uw)(v->s)), then r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t).

EdgeGoesLeft ( LibTessDotNet.MeshUtils.Edge e ) : bool
EdgeGoesRight ( LibTessDotNet.MeshUtils.Edge e ) : bool
EdgeIntersect ( LibTessDotNet.MeshUtils.Vertex o1, LibTessDotNet.MeshUtils.Vertex d1, LibTessDotNet.MeshUtils.Vertex o2, LibTessDotNet.MeshUtils.Vertex d2, LibTessDotNet.MeshUtils.Vertex v ) : void

Given edges (o1,d1) and (o2,d2), compute their point of intersection. The computed point is guaranteed to lie in the intersection of the bounding rectangles defined by each edge.

EdgeSign ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real

Returns a number whose sign matches EdgeEval(u,v,w) but which is cheaper to evaluate. Returns > 0, == 0 , or < 0 as v is above, on, or below the edge uw.

Interpolate ( Real a, Real x, Real b, Real y ) : Real
IsWindingInside ( WindingRule rule, int n ) : bool
TransEval ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
TransLeq ( LibTessDotNet.MeshUtils.Vertex lhs, LibTessDotNet.MeshUtils.Vertex rhs ) : bool
TransSign ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
VertCCW ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : bool
VertEq ( LibTessDotNet.MeshUtils.Vertex lhs, LibTessDotNet.MeshUtils.Vertex rhs ) : bool
VertL1dist ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v ) : Real
VertLeq ( LibTessDotNet.MeshUtils.Vertex lhs, LibTessDotNet.MeshUtils.Vertex rhs ) : bool

Приватные методы

Метод Описание
Swap ( LibTessDotNet.MeshUtils.Vertex &a, LibTessDotNet.MeshUtils.Vertex &b ) : void

Описание методов

AddWinding() публичный статический Метод

public static AddWinding ( LibTessDotNet.MeshUtils.Edge eDst, LibTessDotNet.MeshUtils.Edge eSrc ) : void
eDst LibTessDotNet.MeshUtils.Edge
eSrc LibTessDotNet.MeshUtils.Edge
Результат void

EdgeEval() публичный статический Метод

Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), evaluates the t-coord of the edge uw at the s-coord of the vertex v. Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. If uw is vertical (and thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even when v is very close to u or w. In particular if we set v->t = 0 and let r be the negated result (this evaluates (uw)(v->s)), then r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t).
public static EdgeEval ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
w LibTessDotNet.MeshUtils.Vertex
Результат Real

EdgeGoesLeft() публичный статический Метод

public static EdgeGoesLeft ( LibTessDotNet.MeshUtils.Edge e ) : bool
e LibTessDotNet.MeshUtils.Edge
Результат bool

EdgeGoesRight() публичный статический Метод

public static EdgeGoesRight ( LibTessDotNet.MeshUtils.Edge e ) : bool
e LibTessDotNet.MeshUtils.Edge
Результат bool

EdgeIntersect() публичный статический Метод

Given edges (o1,d1) and (o2,d2), compute their point of intersection. The computed point is guaranteed to lie in the intersection of the bounding rectangles defined by each edge.
public static EdgeIntersect ( LibTessDotNet.MeshUtils.Vertex o1, LibTessDotNet.MeshUtils.Vertex d1, LibTessDotNet.MeshUtils.Vertex o2, LibTessDotNet.MeshUtils.Vertex d2, LibTessDotNet.MeshUtils.Vertex v ) : void
o1 LibTessDotNet.MeshUtils.Vertex
d1 LibTessDotNet.MeshUtils.Vertex
o2 LibTessDotNet.MeshUtils.Vertex
d2 LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
Результат void

EdgeSign() публичный статический Метод

Returns a number whose sign matches EdgeEval(u,v,w) but which is cheaper to evaluate. Returns > 0, == 0 , or < 0 as v is above, on, or below the edge uw.
public static EdgeSign ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
w LibTessDotNet.MeshUtils.Vertex
Результат Real

Interpolate() публичный статический Метод

public static Interpolate ( Real a, Real x, Real b, Real y ) : Real
a Real
x Real
b Real
y Real
Результат Real

IsWindingInside() публичный статический Метод

public static IsWindingInside ( WindingRule rule, int n ) : bool
rule WindingRule
n int
Результат bool

TransEval() публичный статический Метод

public static TransEval ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
w LibTessDotNet.MeshUtils.Vertex
Результат Real

TransLeq() публичный статический Метод

public static TransLeq ( LibTessDotNet.MeshUtils.Vertex lhs, LibTessDotNet.MeshUtils.Vertex rhs ) : bool
lhs LibTessDotNet.MeshUtils.Vertex
rhs LibTessDotNet.MeshUtils.Vertex
Результат bool

TransSign() публичный статический Метод

public static TransSign ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
w LibTessDotNet.MeshUtils.Vertex
Результат Real

VertCCW() публичный статический Метод

public static VertCCW ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v, LibTessDotNet.MeshUtils.Vertex w ) : bool
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
w LibTessDotNet.MeshUtils.Vertex
Результат bool

VertEq() публичный статический Метод

public static VertEq ( LibTessDotNet.MeshUtils.Vertex lhs, LibTessDotNet.MeshUtils.Vertex rhs ) : bool
lhs LibTessDotNet.MeshUtils.Vertex
rhs LibTessDotNet.MeshUtils.Vertex
Результат bool

VertL1dist() публичный статический Метод

public static VertL1dist ( LibTessDotNet.MeshUtils.Vertex u, LibTessDotNet.MeshUtils.Vertex v ) : Real
u LibTessDotNet.MeshUtils.Vertex
v LibTessDotNet.MeshUtils.Vertex
Результат Real

VertLeq() публичный статический Метод

public static VertLeq ( LibTessDotNet.MeshUtils.Vertex lhs, LibTessDotNet.MeshUtils.Vertex rhs ) : bool
lhs LibTessDotNet.MeshUtils.Vertex
rhs LibTessDotNet.MeshUtils.Vertex
Результат bool