示例#1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Edge" /> class.
 /// </summary>
 /// <param name="fromVertex">From vertex.</param>
 /// <param name="toVertex">To vertex.</param>
 /// <param name="ownedFace">The face.</param>
 /// <param name="otherFace">The other face.</param>
 /// <param name="doublyLinkedVertices">if set to <c>true</c> [doubly linked vertices].</param>
 /// <param name="edgeReference">The edge reference.</param>
 /// <exception cref="Exception"></exception>
 public Edge(Vertex fromVertex, Vertex toVertex, PolygonalFace ownedFace, PolygonalFace otherFace,
             bool doublyLinkedVertices, long edgeReference = 0) : this(fromVertex, toVertex, doublyLinkedVertices)
 {
     if (edgeReference > 0)
     {
         EdgeReference = edgeReference;
     }
     else
     {
         TessellatedSolid.SetAndGetEdgeChecksum(this);
     }
     _ownedFace = ownedFace;
     _otherFace = otherFace;
     ownedFace?.AddEdge(this);
     otherFace?.AddEdge(this);
 }
示例#2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Edge" /> class.
 /// </summary>
 /// <param name="fromVertex">From vertex.</param>
 /// <param name="toVertex">To vertex.</param>
 /// <param name="ownedFace">The face.</param>
 /// <param name="otherFace">The other face.</param>
 /// <param name="doublyLinkedVertices">if set to <c>true</c> [doubly linked vertices].</param>
 /// <param name="edgeReference">The edge reference.</param>
 /// <exception cref="Exception"></exception>
 public Edge(Vertex fromVertex, Vertex toVertex, PolygonalFace ownedFace, PolygonalFace otherFace,
             bool doublyLinkedVertices, long edgeReference = 0) : this(fromVertex, toVertex, doublyLinkedVertices)
 {
     if (edgeReference > 0)
     {
         EdgeReference = edgeReference;
     }
     else
     {
         TessellatedSolid.SetAndGetEdgeChecksum(this);
     }
     _ownedFace = ownedFace;
     _otherFace = otherFace;
     if (ownedFace != null)
     {
         ownedFace.AddEdge(this);
     }
     if (otherFace != null)
     {
         otherFace.AddEdge(this);
     }
     DefineInternalEdgeAngle();
 }