本文整理汇总了C#中GraphicResearchHuiZhao.TriMesh.FindHalfedgeTo方法的典型用法代码示例。如果您正苦于以下问题:C# TriMesh.FindHalfedgeTo方法的具体用法?C# TriMesh.FindHalfedgeTo怎么用?C# TriMesh.FindHalfedgeTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicResearchHuiZhao.TriMesh
的用法示例。
在下文中一共展示了TriMesh.FindHalfedgeTo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindGroup
private TriMesh.HalfEdge[] FindGroup(TriMesh.Vertex v, TriMesh.Vertex begin, TriMesh.Vertex end)
{
List<TriMesh.HalfEdge> group = new List<TriMesh.HalfEdge>();
TriMesh.HalfEdge start = v.FindHalfedgeTo(begin);
group.Add(start);
TriMesh.HalfEdge current = start;
while (current.ToVertex != end)
{
current = current.Opposite.Next;
group.Add(current);
}
return group.ToArray();
}
示例2: Validate
TriMesh.HalfEdge Validate(TriMesh.Vertex from, TriMesh.Vertex to)
{
TriMesh mesh = (TriMesh)from.Mesh;
if (from == null)
{
throw new ArgumentNullException("Can't add a null vertex to a face.");
}
if (!from.OnBoundary)
{
throw new BadTopologyException("Can't add an edge to a vertex on the interior of a mesh.");
}
// Find existing halfedges for this face
TriMesh.HalfEdge hf = from.FindHalfedgeTo(to);
if (hf != null && !hf.OnBoundary)
{
throw new BadTopologyException("Can't add more than two faces to an edge.");
}
return hf;
}
示例3: FindEdge
public static TriMesh.Edge FindEdge(TriMesh.Vertex v1, TriMesh.Vertex v2)
{
TriMesh.HalfEdge hf = v1.FindHalfedgeTo(v2);
return hf == null ? null : hf.Edge;
}