yy1717
2020-04-17 148a951e0d44577997fd2790f889dcdd7dbd6889
lib/src/main/cpp/test_common/Geometry.cpp
@@ -442,6 +442,18 @@
    }
}
int IntersectionOfLine(PointF p, Line line)
{
    PointF p1, p2;
    p1.X = line.X1;
    p1.Y = line.Y1;
    p2.X = line.X2;
    p2.Y = line.Y2;
    IntersectionOfLine(p1, p2, p);
}
/***************************************************************
 * 得到p3于p1,p2组成的直线上的垂点
 * @param p1
@@ -568,3 +580,20 @@
    return p3;
}
/*******************************************************
 * ori点在yaw方向上延长的距离
 * @param ori
 * @param length
 * @param yaw
 * @return
 */
PointF PointExtend(PointF ori, double length, double yaw)
{
    PointF ext;
    ext.X = ori.X + length * sin(toRadians(yaw));
    ext.Y = ori.Y + length * cos(toRadians(yaw));
    return ext;
}