示例#1
0
        public static long GetInterSectPointofTwoLinesect(GPoint ptFirstLnBeg, GPoint ptFirstLnEnd, GPoint ptSecondLnBeg,
                                                          GPoint ptSecondLnEnd, ref GPoint ptInsect)
        {
            double angleToPt  = ptFirstLnBeg.GetAngleToPt(ptFirstLnEnd);
            double angleToPt2 = ptSecondLnBeg.GetAngleToPt(ptSecondLnEnd);

            return(ApplyMath.GetInterSectPointofTwoLinesect(ptFirstLnBeg, angleToPt, ptSecondLnBeg, angleToPt2,
                                                            ref ptInsect));
        }
示例#2
0
        public long GetInterSectPointofTwoLinesectWithHeightForTranSect(CLinesect lnObj, ref GPoint ptInsect)
        {
            long interSectPointofTwoLinesect = ApplyMath.GetInterSectPointofTwoLinesect(this.gpoint_0, this.gpoint_1,
                                                                                        lnObj.GetFirstPt(), lnObj.GetSecondPt(), ref ptInsect);
            long result;

            if (interSectPointofTwoLinesect == 0L)
            {
                result = interSectPointofTwoLinesect;
            }
            else
            {
                double num;
                ApplyMath.GetPointOnLineZ(lnObj.gpoint_0.X, lnObj.gpoint_0.Y, lnObj.gpoint_0.Z, lnObj.gpoint_1.X,
                                          lnObj.gpoint_1.Y, lnObj.gpoint_1.Z, ptInsect.X, ptInsect.Y, out num);
                ptInsect.Z = num;
                ApplyMath.GetPointOnLineZ(lnObj.gpoint_0.X, lnObj.gpoint_0.Y, lnObj.gpoint_0.M, lnObj.gpoint_1.X,
                                          lnObj.gpoint_1.Y, lnObj.gpoint_1.M, ptInsect.X, ptInsect.Y, out num);
                ptInsect.M = num;
                result     = 1L;
            }
            return(result);
        }
示例#3
0
 public long GetInterSectPointofTwoLinesect(CLinesect lnObj, ref GPoint ptInsect)
 {
     return(ApplyMath.GetInterSectPointofTwoLinesect(this.gpoint_0, this.gpoint_1, lnObj.GetFirstPt(),
                                                     lnObj.GetSecondPt(), ref ptInsect));
 }