public UnitPoint GetPointFromVertexId(eVertexId vId) { UnitPoint pt = UnitPoint.Empty; float halfWidth, halfHeight; GetHalfWidthAndHeight(out halfWidth, out halfHeight); switch (vId) { case eVertexId.LeftTopCorner: pt = m_p1; break; case eVertexId.RightBottomCorner: pt = m_p3; break; case eVertexId.BottomEdgeMidPoint: pt = new UnitPoint(Center.X, Center.Y - halfHeight); break; case eVertexId.TopEdgeMidPoint: pt = new UnitPoint(Center.X, Center.Y + halfHeight); break; case eVertexId.LeftEdgeMidPoint: pt = new UnitPoint(Center.X - halfWidth, Center.Y); break; case eVertexId.RigthEdgeMidPoint: pt = new UnitPoint(Center.X + halfWidth, Center.Y); break; default: throw new Exception("not match"); } return(pt); }
public ConnectionCrvNodeToRectBaseNodePair(INodePoint node, eVertexId rectNodeId) { this.connectionCrvNode = node; this.rectNodeId = rectNodeId; }