private MasterGeoObj[] checkStraightedgeStraightedge(straightEdgeBehave straightEdgeBehave1, straightEdgeBehave straightEdgeBehave2) { intersectionFigData data = IntersectionMath.LineLineIntersection(straightEdgeBehave1, straightEdgeBehave2); MasterGeoObj[] mgoResult = null; if (data.figtype == GeoObjType.point) { mgoResult = new MasterGeoObj[] { GeoObjConstruction.dPoint(data.vectordata[0]).setIntersectionFigure(0) }; } return(mgoResult); }
private void updateLineLine(MasterGeoObj mgo, MasterGeoObj masterGeoObj1, MasterGeoObj masterGeoObj2) { intersectionFigData data = IntersectionMath.LineLineIntersection(masterGeoObj1.GetComponent <straightEdgeBehave>(), masterGeoObj2.GetComponent <straightEdgeBehave>()); if (data.figtype == mgo.figType) { //point only option. mgo.Position3 = data.vectordata[0]; mgo.AddToRManager(); } else if (data.figtype == GeoObjType.none) { mgo.DeleteGeoObj(); } else { Debug.LogWarning("TYPE MISMATCH"); } }