本文整理汇总了C#中GeometryTutorLib.ConcreteAST.Point.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Point.Equals方法的具体用法?C# Point.Equals怎么用?C# Point.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeometryTutorLib.ConcreteAST.Point
的用法示例。
在下文中一共展示了Point.Equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OtherPoint
public Point OtherPoint(Point p)
{
if (p.Equals(Point1)) return Point2;
if (p.Equals(Point2)) return Point1;
return null;
}
示例2: InstantiateToDef
//
// Take the angle congruence and bisector and create the AngleBisector relation
// \
// \
// B ---------V---------A
// \
// \
// C
//
private static List<EdgeAggregator> InstantiateToDef(Point intersectionPoint, Intersection inter, CongruentSegments cs)
{
List<EdgeAggregator> newGrounded = new List<EdgeAggregator>();
// Does the given point of intersection apply to this actual intersection object
if (!intersectionPoint.Equals(inter.intersect)) return newGrounded;
// The entire segment AB
Segment overallSegment = new Segment(cs.cs1.OtherPoint(intersectionPoint), cs.cs2.OtherPoint(intersectionPoint));
// The segment must align completely with one of the intersection segments
Segment interCollinearSegment = inter.GetCollinearSegment(overallSegment);
if (interCollinearSegment == null) return newGrounded;
// Does this intersection have the entire segment AB
if (!inter.HasSegment(overallSegment)) return newGrounded;
Segment bisector = inter.OtherSegment(overallSegment);
Segment bisectedSegment = inter.GetCollinearSegment(overallSegment);
// Check if the bisected segment extends is the exact same segment as the overall segment AB
if (!bisectedSegment.StructurallyEquals(overallSegment))
{
if (overallSegment.PointLiesOnAndBetweenEndpoints(bisectedSegment.Point1) &&
overallSegment.PointLiesOnAndBetweenEndpoints(bisectedSegment.Point2)) return newGrounded;
}
SegmentBisector newSB = new SegmentBisector(inter, bisector);
// For hypergraph
List<GroundedClause> antecedent = new List<GroundedClause>();
antecedent.Add(inter);
antecedent.Add(cs);
newGrounded.Add(new EdgeAggregator(antecedent, newSB, annotation));
return newGrounded;
}