Geometry Structure and Algorithm.#
Geometry Structure#
-
const float visionflow::geometry::kPi = 3.14159265358979F#
Constant PI.
-
class IGeometry#
Common abstract base class for all plane geometry types.
Subclassed by visionflow::geometry::Arc2f, visionflow::geometry::Circle2i, visionflow::geometry::ISurface, visionflow::geometry::Line2f, visionflow::geometry::LineString2f, visionflow::geometry::LineString2i, visionflow::geometry::MultiPoint2f, visionflow::geometry::MultiPoint2i, visionflow::geometry::MultiPolygon2i, visionflow::geometry::MultiSegment2f, visionflow::geometry::Point2f, visionflow::geometry::Point2i, visionflow::geometry::Polygon2i, visionflow::geometry::Radian, visionflow::geometry::Ray2f, visionflow::geometry::Ray2i, visionflow::geometry::Rect2i, visionflow::geometry::Ring2i, visionflow::geometry::RotateRect2i, visionflow::geometry::Segment2f, visionflow::geometry::Segment2i, visionflow::geometry::Size2f, visionflow::geometry::Size2i, visionflow::geometry::Vector2f, visionflow::geometry::Vector2i
Public Types
-
enum GeometryType#
Geometry enum value.
Values:
-
enumerator kRadian = 0#
-
enumerator kSize2f = 2#
-
enumerator kSize2i = 3#
-
enumerator kPoint2f = 4#
-
enumerator kPoint2i = 5#
-
enumerator kVector2f = 6#
-
enumerator kVector2i = 7#
-
enumerator kSegment2f = 8#
-
enumerator kSegment2i = 9#
-
enumerator kLine2f = 10#
-
enumerator kRay2f = 12#
-
enumerator kRay2i = 13#
-
enumerator kRing2f = 14#
-
enumerator kRing2i = 15#
-
enumerator kRect2f = 16#
-
enumerator kRect2i = 17#
-
enumerator kPolygon2f = 18#
-
enumerator kPolygon2i = 19#
-
enumerator kRotateRect2f = 20#
-
enumerator kRotateRect2i = 21#
-
enumerator kArc2f = 22#
-
enumerator kCircle2f = 24#
-
enumerator kCircle2i = 25#
-
enumerator kLineString2f = 26#
-
enumerator kLineString2i = 27#
-
enumerator kMultiPoint2f = 28#
-
enumerator kMultiPoint2i = 29#
-
enumerator kMultiPolygon2f = 30#
-
enumerator kMultiPolygon2i = 31#
-
enumerator kEllipse2f = 32#
-
enumerator kMultiSegment2f = 34#
-
enumerator kRadian = 0#
Public Functions
-
virtual IGeometry::GeometryType type() const = 0#
Enumerate value of geometry types.
- Returns:
GeometryType
-
const char *type_name() const#
Name of geometry types.
- Returns:
const char*
-
inline virtual bool is_surface() const#
Get if the geometry object is a surface.
- Returns:
True if the geometry object is a surface. else false.
-
enum GeometryType#
-
class ISurface : public visionflow::geometry::IGeometry#
The abstract base class for all surface geometry types.
Subclassed by visionflow::geometry::Circle2f, visionflow::geometry::Ellipse2f, visionflow::geometry::MultiPolygon2f, visionflow::geometry::Polygon2f, visionflow::geometry::Rect2f, visionflow::geometry::Ring2f, visionflow::geometry::RotateRect2f
Public Functions
-
inline virtual bool is_surface() const final#
Get if the geometry object is a surface.
- Returns:
NO_DISCARD
-
virtual float area() const = 0#
Get the surface area.
-
virtual float perimeter() const = 0#
Surface perimeter.
-
virtual Point2f centroid() const = 0#
Get the centroid of the surface, the centroid may be different from the center in some surface.
-
virtual RotateRect2f min_area_box() const = 0#
Get the min area bounding box.
-
inline virtual bool is_surface() const final#
-
struct Radian : public visionflow::geometry::IGeometry#
Can easily get the degree of the radian conversion.
The direction from the positive direction of the x-axis to the positive direction of the y-axis is positive direction of the angle definition.
Public Functions
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
inline bool operator!=(const Radian &other) const#
Check if two Radian are not equal to each other.
- Parameters:
other –
- Returns:
true if not equal
-
Radian norm(float mod = visionflow::geometry::kPi * 2) const#
Normalize the radian into [0, mod)
- Parameters:
mod – Divisor.
- Returns:
NO_DISCARD Radian in [0, mod)
-
float degree() const#
Get the degree of the radian conversion.
- Returns:
NO_DISCARD float degree.
-
Radian &from_degree(float degree)#
Set the radian of the degree conversion.
- Parameters:
degree – Degree.
- Returns:
Radian& reference to this object.
-
virtual IGeometry::GeometryType type() const override#
-
struct Vector2f : public visionflow::geometry::IGeometry#
A floating-point vector with size and direction from the origin point (0, 0).
Public Types
-
using Elem = float#
Element type
Public Functions
-
Vector2f() = default#
Default constructor,no initialization.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
Radian azimuth() const#
Azimuth of vectors.
- Returns:
The radian of the rotation of the vector from the positive direction of the x-axis to the positive direction of the y-axis(±π).
-
float length() const#
Modulus of a vector.
- Returns:
float Modulus length.
-
using Elem = float#
-
struct Vector2i : public visionflow::geometry::IGeometry#
Integer vector with size and direction from the origin (0,0).
Public Types
-
using Elem = int32_t#
Element type.
Public Functions
-
Vector2i() = default#
Default constructor.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float length() const#
Modulus of a vector.
- Returns:
float Modulus length
-
using Elem = int32_t#
-
struct Point2f : public visionflow::geometry::IGeometry#
Floating point coordinate points.
Public Types
-
using Elem = float#
Element type.
Public Functions
-
Point2f() = default#
Default constructor,no initialization.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
using Elem = float#
-
struct Point2i : public visionflow::geometry::IGeometry#
整型点
Public Types
-
using Elem = int32_t#
Element type
Public Functions
-
Point2i() = default#
Default constructor,no initialization.
-
bool operator==(const Vector &rhs) const#
Numerical comparison with vectors of the same type.
- Parameters:
rhs – Vector to compare
- Returns:
true if equal
- Returns:
false
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
using Elem = int32_t#
-
struct Segment2f : public std::pair<Point2f, Point2f>, public visionflow::geometry::IGeometry#
Floating point line segments.
Public Types
Public Functions
-
Segment2f() = default#
Default constructor, no initialization.
-
Segment2f(const Point &lhs, const Vector &direction, const float &dis)#
Constructor to set Point,direction Vector and distance.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float length() const#
Length of line segment.
-
bool is_point() const#
Check if the Segment is equal to a Point.
- Returns:
NO_DISCARD true if the ends of Segment are the same.
-
Segment2f() = default#
-
struct Segment2i : public std::pair<Point2i, Point2i>, public visionflow::geometry::IGeometry#
Integral line segments.
Public Types
Public Functions
-
Segment2i() = default#
Default constructor, no initialization.
-
Segment2i(const Point &lhs, const Vector &direction, const float &dis)#
Constructor to set Point,direction Vector and distance.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float length() const#
Length of line segment.
-
bool is_point() const#
Check if the Segment is equal to a Point.
- Returns:
NO_DISCARD true if the ends of Segment are the same.
-
Segment2i() = default#
-
struct Line2f : public visionflow::geometry::IGeometry#
浮点型直线
Public Types
-
using Elem = float#
Element type.
Public Functions
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
Point intersection_by_y(Elem value) const#
Intersection of a line parallel to the x-axis.
If there is no intersection it will throw an exception.
If there is a complete overlap it will return Point(0, value)
- Parameters:
value – The line y = value.
- Throws:
visionflow::excepts::InvalidArgument – If Lines have no intersection.
- Returns:
NO_DISCARD Point the intersection.
-
Point intersection_by_x(Elem value) const#
Intersection of a line parallel to the y-axis.
If there is no intersection it will return an exception.
If there is a complete overlap it will return Point(value, 0)
- Parameters:
value – The line x = value.
- Throws:
visionflow::excepts::InvalidArgument – If Lines have no intersection.
- Returns:
NO_DISCARD Point the intersection.
-
using Elem = float#
-
struct Ray2f : public visionflow::geometry::IGeometry#
浮点型射线
Public Types
Public Functions
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
virtual IGeometry::GeometryType type() const override#
-
struct Ray2i : public visionflow::geometry::IGeometry#
整型射线
Public Functions
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
virtual IGeometry::GeometryType type() const override#
-
struct LineString2f : public std::vector<Point2f>, public visionflow::geometry::IGeometry#
浮点型线
一条线被认为是一些点的集合(std::vector),且按一定顺序连接相邻两点形成折线段.
Note
线可以是自交的,但这对于某些算法会产生错误的影响.可以通过 is_simple() 检测是否自交等问题.
Public Functions
-
LineString2f() = default#
Default constructor,creating an empty LineString.
-
explicit LineString2f(const LineString2i &rhs)#
Construct a new LineString with number type conversion.
-
LineString2f(const std::initializer_list<Point> &rhs)#
Constructor taking std::initializer_list,filling the LineString.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float length() const#
折线段长度和
-
LineString2f() = default#
-
struct LineString2i : public std::vector<Point2i>, public visionflow::geometry::IGeometry#
整型线
一条线被认为是一些点的集合(std::vector),且按一定顺序形成折线段.
Note
线可以是自交的,但这对于某些算法会产生错误的影响.可以通过 is_simple() 检测是否自交等问题.
Public Functions
-
LineString2i() = default#
Default constructor,creating an empty LineString.
-
LineString2i(const std::initializer_list<Point> &rhs)#
Constructor taking std::initializer_list,filling the LineString.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float length() const#
折线段长度和
-
LineString2i() = default#
-
struct Ring2f : public std::vector<Point2f>, public visionflow::geometry::ISurface#
浮点型环
环是一条不应自交的闭合线,即不带孔的多边形. 应遵循从x轴正方向向y轴正方向描述环上的点,开包(第一点与最后一点不同).
Public Types
-
using LineString = LineString2f#
环对应的同类型线 convert()
-
using Rect = Rect2f#
环对应的同类型矩形 envelope()
-
using Ring = Ring2f#
用于统一与polygon的部分算法接口 convex_hull()
Public Functions
-
Ring2f() = default#
Default constructor,creating an empty Ring.
-
Ring2f(const std::initializer_list<Point> &rhs)#
Constructor taking std::initializer_list,filling the Ring.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
virtual float area() const override#
Get the surface area.
-
virtual float perimeter() const override#
Surface perimeter.
-
virtual Point2f centroid() const override#
Get the centroid of the surface, the centroid may be different from the center in some surface.
-
virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
using LineString = LineString2f#
-
struct Ring2i : public std::vector<Point2i>, public visionflow::geometry::IGeometry#
整型环
环是一条不应自交的闭合线,即不带孔的多边形. 应遵循从x轴正方向向y轴正方向描述环上的点,开包(第一点与最后一点不同).
Public Types
-
using LineString = LineString2i#
环对应的同类型线 convert()
-
using Rect = Rect2i#
环对应的同类型矩形 envelope()
-
using Ring = Ring2i#
用于统一与polygon的部分算法接口 convex_hull()
Public Functions
-
Ring2i() = default#
Default constructor,creating an empty Ring.
-
Ring2i(const std::initializer_list<Point> &rhs)#
Constructor taking std::initializer_list,filling the Ring.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float area() const#
环面积
-
float perimeter() const#
环周长
-
using LineString = LineString2i#
-
struct Size2f : public visionflow::geometry::IGeometry#
Specify rect or image size.
Public Types
-
using Elem = float#
Element type.
-
using Elem = float#
-
struct Size2i : public visionflow::geometry::IGeometry#
Specify rect or image size.
Public Types
-
using Elem = uint32_t#
Element type.
-
using Elem = uint32_t#
-
struct Rect2f : public visionflow::geometry::ISurface#
浮点型矩形
有一个角为直角的平行四边形,与坐标轴平行.
Public Functions
-
Rect2f() = default#
Default constructor,no initialization.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
Point xmin_ymin() const#
x最小,y最小顶点,同 min_corner.
-
virtual float area() const override#
Get the surface area.
-
virtual float perimeter() const override#
Surface perimeter.
-
virtual Point2f centroid() const override#
Get the centroid of the surface, the centroid may be different from the center in some surface.
-
virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
float long_side() const#
Convert the long side length of the rectangle.
-
float short_side() const#
Convert the short side length of the rectangle.
-
Rect2f() = default#
-
struct Rect2i : public visionflow::geometry::IGeometry#
整型矩形
有一个角为直角的平行四边形,与坐标轴平行.
Public Functions
-
Rect2i() = default#
Default constructor,no initialization.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
Point xmin_ymin() const#
x最小,y最小顶点,同 min_corner.
-
Rect2i() = default#
-
struct Polygon2f : public visionflow::geometry::ISurface#
浮点型多边形
多边形由一个外环和零个或多个内环组成,内环方向与外环相反,形成带孔或不带孔的多边形. 应遵循从x轴正方向向y轴正方向描述外环上的点,开包(第一点与最后一点不同).
Public Types
-
using Rect = Rect2f#
多边形对应的同类型矩形 envelope()
Public Functions
-
Polygon2f() = default#
Default constructor,creating an empty Polygon.
-
Polygon2f(const std::initializer_list<Ring> &rhs)#
Constructor taking std::initializer_list,filling the Polygon.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
virtual float area() const override#
Get the surface area.
Warning
If the inner ring is described incorrectly, such as being in the same direction as the outer, the area calculation will duplicate the area of the inner ring. You can use
@ref correct()
to correct the geometry and obtain the correct expected result. Even when the inner ring is tangent to each other or tangent to the outer ring, the correct polygon area can still be obtained.
-
virtual float perimeter() const override#
Surface perimeter.
Warning
If the inner rings are tangent to each other or tangent to the outer rings, the tangent side lengths are repeated when calculating the circumference.
-
virtual Point2f centroid() const override#
Get the centroid of the surface, the centroid may be different from the center in some surface.
-
virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
using Rect = Rect2f#
-
struct Polygon2i : public visionflow::geometry::IGeometry#
整型多边形
多边形由一个外环和零个或多个内环组成,内环方向与外环相反,形成带孔或不带孔的多边形. 应遵循从x轴正方向向y轴正方向描述外环上的点,开包(第一点与最后一点不同).
Public Types
-
using Rect = Rect2i#
多边形对应的同类型矩形 envelope()
Public Functions
-
Polygon2i() = default#
Default constructor,creating an empty Polygon.
-
Polygon2i(const std::initializer_list<Ring> &rhs)#
Constructor taking std::initializer_list,filling the Polygon.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float area() const#
Get the surface area.
Warning
If the inner ring is described incorrectly, such as being in the same direction as the outer, the area calculation will duplicate the area of the inner ring. You can use
@ref correct()
to correct the geometry and obtain the correct expected result. Even when the inner ring is tangent to each other or tangent to the outer ring, the correct polygon area can still be obtained.
-
float perimeter() const#
Surface perimeter.
Warning
If the inner rings are tangent to each other or tangent to the outer rings, the tangent side lengths are repeated when calculating the circumference.
-
using Rect = Rect2i#
-
struct RotateRect2f : public visionflow::geometry::ISurface#
浮点型旋转矩形
有一个角为直角的平行四边形,不一定与坐标轴平行. 一个旋转矩形由其中心点center, 大小size 及指向角度radian所定义.
拥有相同的覆盖范围,但指向角度不同的多个旋转矩形本质上是不同。
Public Types
-
using LineString = LineString2f#
旋转矩形边对应类型的线段
-
using Rect = Rect2f#
旋转矩形对应的同类型矩形 envelope()
Public Functions
-
RotateRect2f() = default#
Default constructor,no initialization.
-
bool operator==(const RotateRect2f &rhs) const#
任意对角两点描述平行矩形.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
inline virtual float area() const override#
Get the surface area.
-
inline virtual float perimeter() const override#
Surface perimeter.
-
inline virtual Point2f centroid() const override#
Get the centroid of the surface, the centroid may be different from the center in some surface.
-
inline virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
float long_side() const#
Convert the long side length of the rectangle.
-
float short_side() const#
Convert the short side length of the rectangle.
-
Ring to_ring() const#
convert the rotate rectangle to ring. The order of the points is consistent with the order in which the rays from the center point are rotated in the positive direction and scanned in the positive direction.
-
RotateRect2f norm() const#
Normalize the radian into [0, kPi / 2).
Width and height will be exchanged due to angle change.
- Returns:
RotateRect2f with radian in [0, kPi / 2).
-
RotateRect2f norm_compatible_opencv() const#
Normalize the radian into (0, kPi / 2] like opencv.
Width and height will be exchanged due to angle change.
- Returns:
RotateRect2f with radian in (0, kPi / 2].
-
using LineString = LineString2f#
-
struct RotateRect2i : public visionflow::geometry::IGeometry#
整型旋转矩形
有一个角为直角的平行四边形,不一定与坐标轴平行. 一个旋转矩形由其中心点center, 大小size 及指向角度radian所定义.
拥有相同的覆盖范围,但指向角度不同的多个旋转矩形本质上是不同。
Public Types
-
using LineString = LineString2i#
旋转矩形边对应类型的线段
-
using Rect = Rect2i#
旋转矩形对应的同类型矩形 envelope()
Public Functions
-
RotateRect2i() = default#
Default constructor,no initialization.
-
bool operator==(const RotateRect2i &rhs) const#
任意对角两点描述平行矩形.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
inline uint32_t area() const#
Get the surface area.
-
inline uint32_t perimeter() const#
Surface perimeter.
-
uint32_t long_side() const#
Convert the long side length of the rectangle.
-
uint32_t short_side() const#
Convert the short side length of the rectangle.
-
using LineString = LineString2i#
-
struct Ellipse2f : public visionflow::geometry::ISurface#
Float type ellipse.
An ellipse is a plane curve surrounding two focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant.
An ellipse is defined by its centre point, the axis of the major and minor semi-axes, and the rotation angle radian around the centre point.
Multiple ellipses with the same coverage, but rotation angle at different angles, are essentially different.
Public Types
Public Functions
-
Ellipse2f() = default#
Default constructor,no initialization.
-
Ellipse2f(Point center, float major_semi_axis, float minor_semi_axis, Radian radian = {})#
Constructor to set centre point, major and minor semi-axes and rotation angle.
Require major_semi_axis >= minor_semi_axis, otherwise swap major_semi_axis and minor_semi_axis and add kPi * 0.5 to radian. An exception will be thrown if major_semi_axis or minor_semi_axis is not greater than 0
- Parameters:
center – Centre point.
major_semi_axis – Major semi-axis.
minor_semi_axis – Minor semi-axis.
radian – Rotation angle around the centre point.
- Throws:
visionflow::excepts::InvalidArgument – if major_semi_axis or minor_semi_axis is not greater than 0.
-
Ellipse2f(Point center, Axis _axis, Radian radian = {})#
Constructor to set centre point, major and minor semi-axes and rotation angle.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
center – Centre point.
_axis – axis.w means major semi-axis, axis.h means minor semi-axis.
radian – Rotation angle around the centre point.
-
Ellipse2f(const Point &focus1, const Point &focus2, const Point &point)#
根据两个焦点和椭圆上一点构建椭圆.
- Parameters:
focus1 – 椭圆其中一个焦点.
focus2 – 椭圆另一个焦点.
point – 椭圆上一点.
-
Ellipse2f(float a, float b, float d = 1, Point center = {})#
根据椭圆标准方程构建椭圆.
\[ \frac{(x - center.x)^2}{a^2} + \frac{(y - center.y)^2}{b^2} = d (a \ge b \gt 0) \]- Parameters:
a – Major semi axis.
b – Minor semi axis.
d – Scale.
center – 中心点.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
float ecc() const#
椭圆离心率.
-
inline virtual float area() const override#
The area of the ellipse.
-
virtual float perimeter() const override#
Get Ellipse perimeter(with Ramanujan approximation, See https://arxiv.org/pdf/math/0506384.pdf ).
-
inline virtual Point2f centroid() const override#
Get the centroid of the surface, the centroid may be different from the center in some surface.
-
inline virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
struct Arc2f : public visionflow::geometry::IGeometry#
浮点型弧
Public Functions
-
Arc2f() = default#
Default constructor,no initialization.
-
Arc2f(Point center, float radius, Radian start_angle, Radian end_angle)#
从x轴正方向向y轴正方向描述弧圆心,半径,起始弧度和终止弧度,.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
inline float length() const#
Arc length.
-
Arc2f &norm(float mod = visionflow::geometry::kPi * 2)#
Normalized Arc radian.
-
Arc2f() = default#
-
struct Circle2f : public visionflow::geometry::ISurface#
浮点型圆
Public Functions
-
Circle2f() = default#
Default constructor,no initialization.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
virtual float area() const override#
The area of the circle.
-
virtual float perimeter() const override#
Surface perimeter.
-
inline virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
Circle2f() = default#
-
struct Circle2i : public visionflow::geometry::IGeometry#
整型圆
-
struct MultiPoint2f : public std::vector<Point2f>, public visionflow::geometry::IGeometry#
浮点型点集
Warning
算法实现中不会清空原有数据,导致结果产生错误.
Public Functions
-
MultiPoint2f() = default#
Default constructor,no initialization.
-
MultiPoint2f(const std::initializer_list<Point> &rhs)#
Constructor taking std::initializer_list,filling the MultiPoint.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
MultiPoint2f() = default#
-
struct MultiPoint2i : public std::vector<Point2i>, public visionflow::geometry::IGeometry#
整型点集
Warning
算法实现中不会清空原有数据,导致结果产生错误.
Public Functions
-
MultiPoint2i() = default#
Default constructor,no initialization.
-
MultiPoint2i(const std::initializer_list<Point> &rhs)#
Constructor taking std::initializer_list,filling the MultiPoint.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
MultiPoint2i() = default#
-
struct MultiSegment2f : public std::vector<Segment2f>, public visionflow::geometry::IGeometry#
Multiple line Segment2f.
Public Functions
-
MultiSegment2f() = default#
Default constructor, no initialization.
-
MultiSegment2f(const std::initializer_list<Segment> &rhs)#
Constructor taking std::initializer_list, filling the MultiSegment.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
MultiSegment2f() = default#
-
struct MultiPolygon2f : public std::vector<Polygon2f>, public visionflow::geometry::ISurface#
浮点型多多边形
Warning
算法实现中不会清空原有数据,导致结果产生错误.
Public Functions
-
MultiPolygon2f() = default#
Default constructor,no initialization.
-
explicit MultiPolygon2f(const MultiPolygon2i &rhs)#
Construct a new MultiPolygon with number type conversion.
-
MultiPolygon2f(const std::initializer_list<Polygon> &rhs)#
Constructor taking std::initializer_list,filling the MultiPolygon.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
virtual float area() const override#
The area of the circle.
-
virtual float perimeter() const override#
Surface perimeter.
-
virtual RotateRect2f min_area_box() const override#
Get the min area bounding box.
-
MultiPolygon2f() = default#
-
struct MultiPolygon2i : public std::vector<Polygon2i>, public visionflow::geometry::IGeometry#
整型多多边形
Warning
算法实现中不会清空原有数据,导致结果产生错误.
Public Functions
-
MultiPolygon2i() = default#
Default constructor,no initialization.
-
MultiPolygon2i(const std::initializer_list<Polygon> &rhs)#
Constructor taking std::initializer_list,filling the MultiPolygon.
-
virtual IGeometry::GeometryType type() const override#
Enumerate value of geometry types.
- Returns:
GeometryType
-
MultiPolygon2i() = default#
-
class Matrix3f#
3x3 float matrix.
Transformation matrix.
Public Functions
-
explicit Matrix3f(float diag = 1)#
Construct a 3*3 float matrix.
The value of the principal diagonal is diag, the rest are 0.
- Parameters:
diag – The principal diagonal value. If rhs is 1(As default), it will construct a identity matrix.
-
Matrix3f(const std::array<float, kSide> &line1, const std::array<float, kSide> &line2, const std::array<float, kSide> &line3)#
Construct a new Matrix3f object.
- Parameters:
line1 – The first row of matrix
line2 – The second row of matrix
line3 – The third row of matrix
-
Matrix3f(float mat_0_0, float mat_0_1, float mat_0_2, float mat_1_0, float mat_1_1, float mat_1_2, float mat_2_0, float mat_2_1, float mat_2_2)#
Construct a 3*3 float matrix.
Read parameters in first row the col order.
-
Matrix3f(const Matrix3f &rhs)#
Deep copy constructor.
It will not share the same references as the source object.
- Parameters:
rhs – other Matrix3f.
-
Matrix3f operator*(const Matrix3f &rhs) const#
Matrix multiplication.
A * B = C.
- Parameters:
rhs – B matrix.
- Returns:
Matrix3f C matrix.
-
float &at(size_t row, size_t col)#
Return a reference to the specified array element.
if row or col out of range, an visionflow::excepts::InvalidArgument will be thrown.
- Parameters:
row – Index along the dimension 1.
col – Index along the dimension 2.
- Throws:
visionflow::excepts::InvalidArgument – if row or col out of range.
- Returns:
NO_DISCARD float& array element.
-
float at(size_t row, size_t col) const#
Return the specified array element.
if row or col out of range, an visionflow::excepts::InvalidArgument will be thrown.
- Parameters:
row – Index along the dimension 1.
col – Index along the dimension 2.
- Throws:
visionflow::excepts::InvalidArgument – if row or col out of range.
- Returns:
NO_DISCARD float array element.
Public Static Attributes
-
static constexpr size_t kSide = 3#
The matrix row and col number.
-
explicit Matrix3f(float diag = 1)#
-
enum visionflow::geometry::GeoConvertToIntStrategy#
Enumeration of convert_to_int() implementable strategies.
Values:
-
enumerator kRoundToNearestInt#
Round to the nearest integer number.
-
enumerator kRetainIntPart#
Retain only the integer part.
-
enumerator kRoundToNearestInt#
-
enum visionflow::geometry::GeoIsSampleFailType#
The enumeration GeoIsSampleFailType enumerates the possible reasons for which a geometry may be found as not simple or invalid by the is_simple() and is_valid() algorithms.
Values:
-
enumerator kNoFailure = 0#
The geometry is simple/valid.
-
enumerator kEmpty = 1#
The geometry is empty.
-
enumerator kDuplicatePoints = 2#
The geometry has (consecutive) duplicate points.
-
enumerator kSpikes = 4#
The geometry contains spikes.
-
enumerator kSelfIntersections = 8#
The geometry has self-intersections.
-
enumerator kPolygonOuterFailure = 16#
The exterior ring of geometry is not simple/valid.
-
enumerator kPolygonInnersFailure = 32#
The interior rings of geometry is not simple/valid.
-
enumerator kFewPoints = 64#
The geometry has a very small number of points.
-
enumerator kWrongTopologicalDimension = 128#
The topological dimension of the geometry is smaller than its dimension.
-
enumerator kInvalidCoordinate = 256#
The geometry has at least one point with an invalid coordinate.
-
enumerator kWrongOrientation = 512#
The actual orientation of the geometry is different from the one defined.
-
enumerator kInteriorRingsOutside = 1024#
The geometry contains interior rings that lie outside the exterior ring.
-
enumerator kNestedInteriorRings = 2048#
The geometry has nested interior rings.
-
enumerator kNoFailure = 0#
Geometry algorithms#
- group geo_append
Function to append element(s) into the geometry object, the function format is:
void append(Geometry1 &geometry, const Geometry2 &element);
- param geometry:
[inout] Scalable geometry object
- param element:
[in] Element to append into the geometry object.
geometry
element
LineString
Point, MultiPoint
MultiPoint
Point, MultiPoint
Ring
Point, MultiPoint
Functions
-
void append(visionflow::geometry::LineString2f &geometry, const visionflow::geometry::Point2f &element)#
-
void append(visionflow::geometry::LineString2f &geometry, const visionflow::geometry::MultiPoint2f &element)#
-
void append(visionflow::geometry::Ring2f &geometry, const visionflow::geometry::Point2f &element)#
-
void append(visionflow::geometry::Ring2f &geometry, const visionflow::geometry::MultiPoint2f &element)#
-
void append(visionflow::geometry::MultiPoint2f &geometry, const visionflow::geometry::Point2f &element)#
-
void append(visionflow::geometry::MultiPoint2f &geometry, const visionflow::geometry::MultiPoint2f &element)#
-
void append(visionflow::geometry::LineString2i &geometry, const visionflow::geometry::Point2i &element)#
-
void append(visionflow::geometry::LineString2i &geometry, const visionflow::geometry::MultiPoint2i &element)#
-
void append(visionflow::geometry::Ring2i &geometry, const visionflow::geometry::Point2i &element)#
-
void append(visionflow::geometry::Ring2i &geometry, const visionflow::geometry::MultiPoint2i &element)#
-
void append(visionflow::geometry::MultiPoint2i &geometry, const visionflow::geometry::Point2i &element)#
-
void append(visionflow::geometry::MultiPoint2i &geometry, const visionflow::geometry::MultiPoint2i &element)#
- group area
多边形的面积
整型矩形面积
Warning
多边形的内环方向以及数据是否遵循约定方向等会对结果产生影响.
- param rhs:
多边形,矩形以及圆
Areal
Ring
Polygon
Rect
RotateRect
Ellipse
Circle
MultiPolygon
- param rhs:
- return:
float 浮点型面积
- return:
uint32_t 整型面积
Functions
-
float area(const visionflow::geometry::Ring2f &rhs)#
-
float area(const visionflow::geometry::Polygon2f &rhs)#
-
float area(const visionflow::geometry::Rect2f &rhs)#
-
float area(const visionflow::geometry::RotateRect2f &rhs)#
-
float area(const visionflow::geometry::Ellipse2f &rhs)#
-
float area(const visionflow::geometry::Circle2f &rhs)#
-
float area(const visionflow::geometry::MultiPolygon2f &rhs)#
-
float area(const visionflow::geometry::Ring2i &rhs)#
-
float area(const visionflow::geometry::Polygon2i &rhs)#
-
float area(const visionflow::geometry::RotateRect2i &rhs)#
-
float area(const visionflow::geometry::Circle2i &rhs)#
-
float area(const visionflow::geometry::MultiPolygon2i &rhs)#
-
uint32_t area(const visionflow::geometry::Rect2i &rhs)#
- group equal_operator
向量和点之间的数值比较
- param lhs:
The vector of the same type corresponding to the point
- param rhs:
任意类型的点
- return:
true 点与向量数值上相等.
- return:
false 点与向量数值上不等.
Functions
-
bool operator==(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool operator==(const visionflow::geometry::Vector2i &lhs, const visionflow::geometry::Point2i &rhs)#
- group addition_operator
向量+点=点
整型点+浮点型向量=浮点型点, 浮点型向量+整型点=浮点型点
- param lhs:
The vector of the same type corresponding to the point
- param rhs:
任意类型的点
- param lhs:
整型点/浮点型向量
- param rhs:
浮点型向量/整型点
- return:
Point 结果不改变点的类型
- return:
Point2f 浮点型点
Functions
-
visionflow::geometry::Point2f operator+(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::Point2i operator+(const visionflow::geometry::Vector2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::Point2f operator+(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Vector2f &rhs)#
-
visionflow::geometry::Point2f operator+(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Point2i &rhs)#
- group subtraction_operator
点-点=向量
浮点型-整形点=浮点型向量
整型点-浮点型点=浮点型向量
整型点-浮点型向量=浮点型点
- param lhs:
被减点
- param rhs:
减点
- param lhs:
整型点
- param rhs:
浮点型向量
- param lhs:
整型点
- param rhs:
浮点型点
- param lhs:
浮点型点
- param rhs:
整形点
- return:
Point::Vector The vector of the same type corresponding to the point
- return:
Point2f 浮点型点
- return:
Vector2f 浮点型向量
- return:
Vector2f 浮点型向量
Functions
-
visionflow::geometry::Vector2f operator-(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::Vector2i operator-(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::Point2f operator-(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Vector2f &rhs)#
-
visionflow::geometry::Vector2f operator-(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::Vector2f operator-(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2i &rhs)#
- group multiplication_operator
点和Amplification of vectors
整型向量*浮点数=浮点型向量,浮点数*整型向量=浮点型向量
整型点*浮点数=浮点型点,浮点数*整型点=浮点型点
- param lhs:
点或向量的Elem
- param rhs:
任意类型的点或向量
- param lhs:
整形点/浮点数
- param rhs:
浮点数/整形点
- param lhs:
整型向量/浮点数
- param rhs:
浮点数/整型向量
- return:
结果不改变点或向量的类型
- return:
Point2f 浮点型点
- return:
Vector2f 浮点型向量
Functions
-
visionflow::geometry::Point2f operator*(const float &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::Point2i operator*(const int32_t &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::Vector2f operator*(const float &lhs, const visionflow::geometry::Vector2f &rhs)#
-
visionflow::geometry::Vector2i operator*(const int32_t &lhs, const visionflow::geometry::Vector2i &rhs)#
-
visionflow::geometry::Point2f operator*(const visionflow::geometry::Point2i &lhs, const float &rhs)#
-
visionflow::geometry::Point2f operator*(const float &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::Vector2f operator*(const visionflow::geometry::Vector2i &lhs, const float &rhs)#
-
visionflow::geometry::Vector2f operator*(const float &lhs, const visionflow::geometry::Vector2i &rhs)#
- group add_point
将第一个点的值加上第二个
- param lhs:
被改变的任意类型的第一个点
- param rhs:
同类型的第二个点不发生变化
Functions
-
void add_point(visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
void add_point(visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
- group add_value
将一个点的坐标加上相同值
- param lhs:
被改变的任意类型的点/点对应的同类型值
- param rhs:
点对应的同类型值/被改变的任意类型的点
Functions
-
void add_value(visionflow::geometry::Point2f &lhs, const float &rhs)#
-
void add_value(visionflow::geometry::Point2i &lhs, const int32_t &rhs)#
- group cross_product
向量积,叉积
- param lhs:
任意类型的点
- param rhs:
同类型的点
- return:
点对应的同类型值
Functions
-
float cross_product(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
int32_t cross_product(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
- group divide_point
将第一个点除以第二个点
Note
注意int和float不同产生的结果.
- param lhs:
被改变的任意类型的第一个点
- param rhs:
同类型的第二个点不发生变化
Functions
-
void divide_point(visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
void divide_point(visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
- group divide_value
将一个点的坐标除以点对应的同类型的值
- param lhs:
被改变的任意类型的点
- param rhs:
点对应的同类型值
Functions
-
void divide_value(visionflow::geometry::Point2f &lhs, const float &rhs)#
-
void divide_value(visionflow::geometry::Point2i &lhs, const int32_t &rhs)#
- group dot_product
数量积,点积
- param lhs:
任意类型的点或向量
- param rhs:
同类型的点或向量
- return:
点或向量对应的同类型的值
Functions
-
float dot_product(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
int32_t dot_product(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float dot_product(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Vector2f &rhs)#
-
int32_t dot_product(const visionflow::geometry::Vector2i &lhs, const visionflow::geometry::Vector2i &rhs)#
- group multiply_point
将第一个点乘以第二个点
- param lhs:
被改变的任意类型的第一个点
- param rhs:
同类型的第二个点不发生变化
Functions
-
void multiply_point(visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
void multiply_point(visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
- group multiply_value
将一个点的坐标乘以相同值
- param lhs:
被改变的任意类型的点
- param rhs:
点对应的同类型值
Functions
-
void multiply_value(visionflow::geometry::Point2f &lhs, const float &rhs)#
-
void multiply_value(visionflow::geometry::Point2i &lhs, const int32_t &rhs)#
- group subtract_point
将第一个点减去第二个点
- param lhs:
被改变的任意类型的第一个点
- param rhs:
同类型的第二个点不发生改变
Functions
-
void subtract_point(visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
void subtract_point(visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
- group subtract_value
将一个点的坐标减去相同值
- param lhs:
被改变的任意类型的点
- param rhs:
点对应的同类型值
Functions
-
void subtract_value(visionflow::geometry::Point2f &lhs, const float &rhs)#
-
void subtract_value(visionflow::geometry::Point2i &lhs, const int32_t &rhs)#
- group azimuth
线段的方位角
向量的方位角
- param lhs:
任意类型的点或向量
- param rhs:
同类型的点或向量
- param rhs:
任意类型的向量
- return:
两点形成线段从x轴正方向向y轴正方向旋转的弧度(-𝝅, 𝝅]
- return:
原点(0,0)到向量所形成线段的方位角弧度(±𝝅)
Functions
-
visionflow::geometry::Radian azimuth(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::Radian azimuth(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::Radian azimuth(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Vector2f &rhs)#
-
visionflow::geometry::Radian azimuth(const visionflow::geometry::Vector2i &lhs, const visionflow::geometry::Vector2i &rhs)#
-
visionflow::geometry::Radian azimuth(const visionflow::geometry::Vector2f &rhs)#
-
visionflow::geometry::Radian azimuth(const visionflow::geometry::Vector2i &rhs)#
- group center
多边形中心,即外接平行矩形的中心
整型圆的中心
- param rhs:
多边形,矩形和圆.
Areal
Ring
Polygon
Rect
RotateRect
Ellipse
Circle
- param rhs:
整型圆
- return:
Point2f 浮点型点
- return:
整型点,即圆心.
Functions
-
visionflow::geometry::Point2f center(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Ellipse2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Circle2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::Point2f center(const visionflow::geometry::MultiPolygon2i &rhs)#
-
visionflow::geometry::Point2i center(const visionflow::geometry::Circle2i &rhs)#
- group centroid
多边形质心
整型圆质心
- param rhs:
多边形,矩形和圆
Areal
Ring
Polygon
Rect
RotateRect
Ellipse
Circle
- param rhs:
整型圆
- return:
Point2f 浮点型点
- return:
Point2i 整形点,即圆心
Functions
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Ellipse2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Circle2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::Point2f centroid(const visionflow::geometry::MultiPolygon2i &rhs)#
-
visionflow::geometry::Point2i centroid(const visionflow::geometry::Circle2i &rhs)#
- group clear
清空几何图形数据
- param rhs:
线或多边形
LinearOrAreal
LineString
Ring
Polygon
MultiPoint
MultiPolygon
Functions
-
void clear(visionflow::geometry::LineString2f &rhs)#
-
void clear(visionflow::geometry::Ring2f &rhs)#
-
void clear(visionflow::geometry::Polygon2f &rhs)#
-
void clear(visionflow::geometry::MultiPoint2f &rhs)#
-
void clear(visionflow::geometry::MultiPolygon2f &rhs)#
-
void clear(visionflow::geometry::LineString2i &rhs)#
-
void clear(visionflow::geometry::Ring2i &rhs)#
-
void clear(visionflow::geometry::Polygon2i &rhs)#
-
void clear(visionflow::geometry::MultiPoint2i &rhs)#
-
void clear(visionflow::geometry::MultiPolygon2i &rhs)#
- group convert
几何图形之间的转换
- param lhs:
几何图形
- param rhs:
同类型的几何图形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
×
×
×
×
×
×
×
√
LineString
×
√
√
√
×
×
×
×
×
Ring
×
√
√
√
×
×
×
×
×
Polygon
×
×
×
√
×
×
×
×
×
Rect
×
×
√
√
√
×
×
×
×
RotateRect
×
×
√
√
×
×
×
×
×
Arc
×
×
×
×
×
×
×
√
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
Functions
-
void convert(const visionflow::geometry::Point2f &lhs, visionflow::geometry::Point2f &rhs)#
-
void convert(const visionflow::geometry::Point2f &lhs, visionflow::geometry::Vector2f &rhs)#
-
void convert(const visionflow::geometry::Point2i &lhs, visionflow::geometry::Point2f &rhs)#
-
void convert(const visionflow::geometry::Point2i &lhs, visionflow::geometry::Point2i &rhs)#
-
void convert(const visionflow::geometry::Point2i &lhs, visionflow::geometry::Vector2i &rhs)#
-
void convert(const visionflow::geometry::LineString2f &lhs, visionflow::geometry::LineString2f &rhs)#
-
void convert(const visionflow::geometry::LineString2f &lhs, visionflow::geometry::Ring2f &rhs)#
-
void convert(const visionflow::geometry::LineString2f &lhs, visionflow::geometry::Polygon2f &rhs)#
-
void convert(const visionflow::geometry::LineString2i &lhs, visionflow::geometry::LineString2i &rhs)#
-
void convert(const visionflow::geometry::LineString2i &lhs, visionflow::geometry::Ring2i &rhs)#
-
void convert(const visionflow::geometry::LineString2i &lhs, visionflow::geometry::Polygon2i &rhs)#
-
void convert(const visionflow::geometry::Ring2f &lhs, visionflow::geometry::LineString2f &rhs)#
-
void convert(const visionflow::geometry::Ring2f &lhs, visionflow::geometry::Ring2f &rhs)#
-
void convert(const visionflow::geometry::Ring2f &lhs, visionflow::geometry::Polygon2f &rhs)#
-
void convert(const visionflow::geometry::Ring2i &lhs, visionflow::geometry::LineString2i &rhs)#
-
void convert(const visionflow::geometry::Ring2i &lhs, visionflow::geometry::Ring2i &rhs)#
-
void convert(const visionflow::geometry::Ring2i &lhs, visionflow::geometry::Polygon2i &rhs)#
-
void convert(const visionflow::geometry::Polygon2f &lhs, visionflow::geometry::Polygon2f &rhs)#
-
void convert(const visionflow::geometry::Polygon2i &lhs, visionflow::geometry::Polygon2i &rhs)#
-
void convert(const visionflow::geometry::Rect2f &lhs, visionflow::geometry::Ring2f &rhs)#
-
void convert(const visionflow::geometry::Rect2f &lhs, visionflow::geometry::Polygon2f &rhs)#
-
void convert(const visionflow::geometry::Rect2f &lhs, visionflow::geometry::Rect2f &rhs)#
-
void convert(const visionflow::geometry::Rect2i &lhs, visionflow::geometry::Ring2i &rhs)#
-
void convert(const visionflow::geometry::Rect2i &lhs, visionflow::geometry::Polygon2i &rhs)#
-
void convert(const visionflow::geometry::Rect2i &lhs, visionflow::geometry::Rect2i &rhs)#
-
void convert(const visionflow::geometry::RotateRect2f &lhs, visionflow::geometry::Ring2f &rhs)#
-
void convert(const visionflow::geometry::RotateRect2f &lhs, visionflow::geometry::Polygon2f &rhs)#
-
void convert(const visionflow::geometry::RotateRect2i &lhs, visionflow::geometry::Ring2i &rhs)#
-
void convert(const visionflow::geometry::RotateRect2i &lhs, visionflow::geometry::Polygon2i &rhs)#
-
void convert(const visionflow::geometry::Arc2f &lhs, visionflow::geometry::Circle2f &rhs)#
-
void convert(const visionflow::geometry::Vector2f &lhs, visionflow::geometry::Vector2f &rhs)#
-
void convert(const visionflow::geometry::Vector2i &lhs, visionflow::geometry::Vector2i &rhs)#
-
void convert(const visionflow::geometry::Vector2i &lhs, visionflow::geometry::Vector2f &rhs)#
-
void convert(const visionflow::geometry::Segment2f &lhs, visionflow::geometry::Segment2f &rhs)#
-
void convert(const visionflow::geometry::Segment2i &lhs, visionflow::geometry::Segment2i &rhs)#
-
void convert(const visionflow::geometry::Segment2i &lhs, visionflow::geometry::Segment2f &rhs)#
-
void convert(const visionflow::geometry::LineString2i &lhs, visionflow::geometry::LineString2f &rhs)#
-
void convert(const visionflow::geometry::Ring2i &lhs, visionflow::geometry::Ring2f &rhs)#
-
void convert(const visionflow::geometry::Polygon2i &lhs, visionflow::geometry::Polygon2f &rhs)#
-
void convert(const visionflow::geometry::Rect2i &lhs, visionflow::geometry::Rect2f &rhs)#
-
void convert(const visionflow::geometry::MultiPolygon2i &lhs, visionflow::geometry::MultiPolygon2f &rhs)#
- group convert_to_int
Convert to the corresponding integer number type.
type.
- param geometry:
Input geometry.
- param strategy:
Implementation strategy.
- return:
The corresponding integer number type.
Functions
-
visionflow::geometry::Vector2i convert_to_int(const visionflow::geometry::Vector2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::Point2i convert_to_int(const visionflow::geometry::Point2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::Segment2i convert_to_int(const visionflow::geometry::Segment2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::LineString2i convert_to_int(const visionflow::geometry::LineString2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::Ring2i convert_to_int(const visionflow::geometry::Ring2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::Polygon2i convert_to_int(const visionflow::geometry::Polygon2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::Rect2i convert_to_int(const visionflow::geometry::Rect2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
-
visionflow::geometry::MultiPolygon2i convert_to_int(const visionflow::geometry::MultiPolygon2f &geometry, visionflow::geometry::GeoConvertToIntStrategy strategy = visionflow::geometry::kRoundToNearestInt)#
- group convex_hull
Get the convex hull of the geometry.
Note
新的凸包将以x最小的点为起点,从x轴正方向向y轴正方向顺序排列.
Warning
对于点数不足3的图形会补全成3个点,这同时也会导致结果非法.
- param geo_obj:
The geometry to get the convex hull.
Areal
Ring
Polygon
Functions
-
visionflow::geometry::Ring2f convex_hull(const visionflow::geometry::Ring2f &geo_obj)#
-
visionflow::geometry::Ring2i convex_hull(const visionflow::geometry::Ring2i &geo_obj)#
-
visionflow::geometry::Ring2f convex_hull(const visionflow::geometry::Polygon2f &geo_obj)#
-
visionflow::geometry::Ring2i convex_hull(const visionflow::geometry::Polygon2i &geo_obj)#
-
visionflow::geometry::Ring2f convex_hull(const visionflow::geometry::MultiPolygon2f &geo_obj)#
-
visionflow::geometry::Ring2i convex_hull(const visionflow::geometry::MultiPolygon2i &geo_obj)#
- group correct
修正多边形的约定顺序和约定开闭包形式
conventionally open and closed packet forms
- param rhs:
polygon object.
Areal
Ring
Polygon
MultiPolygon
Functions
-
void correct(visionflow::geometry::Ring2f &rhs)#
-
void correct(visionflow::geometry::Ring2i &rhs)#
-
void correct(visionflow::geometry::Polygon2f &rhs)#
-
void correct(visionflow::geometry::Polygon2i &rhs)#
-
void correct(visionflow::geometry::MultiPolygon2f &rhs)#
-
void correct(visionflow::geometry::MultiPolygon2i &rhs)#
- group return_correct
修正多边形的约定顺序和约定开闭包形式
See also
Functions
-
visionflow::geometry::Ring2f return_correct(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::Ring2i return_correct(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::Polygon2f return_correct(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::Polygon2i return_correct(const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2f return_correct(const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2i return_correct(const visionflow::geometry::MultiPolygon2i &rhs)#
-
visionflow::geometry::Ring2f return_correct(const visionflow::geometry::Ring2f &rhs)#
- group covered_by
whether the first geometry is covered by the second geometry
second geometry
The difference with the within algorithm is that this algorithm checks the border by default.
See also
Note
Boundaries with intersections are also considered to be covered.
- param lhs:
The first geometry object
- param rhs:
The second geometry object
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
√
√
√
√
√
×
√
×
LineString
×
√
√
√
√
√
×
×
×
Ring
×
×
√
√
√
√
×
×
×
Polygon
×
×
√
√
√
√
×
×
×
Rect
×
×
√
√
√
√
×
×
×
RotateRect
×
×
√
√
√
√
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
√
×
Vector
×
×
×
×
×
×
×
×
×
- return:
bool
Functions
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool covered_by(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool covered_by(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool covered_by(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool covered_by(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool covered_by(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
- group crosses
Whether the first line crosses the second geometric figure.
See also
Note
If the first geometry does not cross the boundary of the second geometry, it will be considered as covered.
- param lhs:
line or other geometry object.
- param rhs:
The second geometry
Geometry
Point
LineString
Ring
Polygon
Rect
RotateRect
Circle
- return:
bool
Functions
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool crosses(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool crosses(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
- group difference
Difference sets between two polygons.
Note
The algorithm does not clear the MultiPolygon of existing data, but adds the result to the MultiPolygon.
Warning
Imperfect support for integer geometry types.
- param lhs:
Geometry object
- param rhs:
Geometry object
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
×
×
×
×
×
×
×
×
×
LineString
×
×
×
×
×
×
×
×
×
Ring
×
×
√
√
√
√
×
×
×
Polygon
×
×
√
√
√
√
×
×
×
Rect
×
×
√
√
√
√
×
×
×
RotateRect
×
×
√
√
√
√
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
- param result:
MultiPolygons (or other type), difference sets between two polygons.
Functions
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::MultiPolygon2i difference(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f difference(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
- group discrete_frechet_distance
线之间的frechet距离
几何图形之间最大的最短距离,用于描述相似度.
- param lhs:
线
- param rhs:
同类型的线
- return:
float
Functions
-
float discrete_frechet_distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float discrete_frechet_distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
- group disjoint
几何图形是否相离
- param lhs:
几何图形
- param rhs:
同类型的几何图形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
√
√
√
√
√
×
√
×
LineString
√
√
√
√
√
√
×
√
×
Ring
√
√
√
√
√
√
×
√
×
Polygon
√
√
√
√
√
√
×
√
×
Rect
√
√
√
√
√
√
×
√
×
RotateRect
√
√
√
√
√
√
×
√
×
Arc
×
×
×
×
×
×
×
×
×
Circle
√
√
√
√
√
√
×
√
×
Vector
×
×
×
×
×
×
×
×
×
- return:
bool
Functions
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool disjoint(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool disjoint(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
bool disjoint(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool disjoint(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool disjoint(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool disjoint(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool disjoint(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Ellipse2f &rhs)#
-
bool disjoint(const visionflow::geometry::Ellipse2f &lhs, const visionflow::geometry::Line2f &rhs)#
- group distance
几何图形之间的距离
- param lhs:
几何图形
- param rhs:
同类型的几何图形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
√
√
√
√
√
×
√
×
LineString
√
√
√
√
√
√
×
√
×
Ring
√
√
√
√
√
√
×
√
×
Polygon
√
√
√
√
√
√
×
√
×
Rect
√
√
√
√
√
√
×
√
×
RotateRect
√
√
√
√
√
√
×
√
×
Arc
×
×
×
×
×
×
×
×
×
Circle
√
√
√
√
√
√
×
√
×
Vector
×
×
×
×
×
×
×
×
×
- return:
float
Functions
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::Segment2i &lhs, const visionflow::geometry::MultiPolygon2i &rhs)#
-
float distance(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2i &lhs, const visionflow::geometry::Segment2i &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Segment2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
float distance(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::Segment2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
float distance(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Line2f &rhs)#
- group envelope
最小外接矩形
- param lhs:
线或多边形
- param rhs:
线或多边形的最小外接矩形
LinearOrAreal
LineString
Ring
Polygon
RotateRect
Ellipse
Functions
-
visionflow::geometry::Rect2f envelope(const visionflow::geometry::LineString2f &lhs)#
-
visionflow::geometry::Rect2f envelope(const visionflow::geometry::Ring2f &lhs)#
-
visionflow::geometry::Rect2f envelope(const visionflow::geometry::Polygon2f &lhs)#
-
visionflow::geometry::Rect2f envelope(const visionflow::geometry::RotateRect2f &lhs)#
-
visionflow::geometry::Rect2f envelope(const visionflow::geometry::Ellipse2f &lhs)#
-
visionflow::geometry::Rect2i envelope(const visionflow::geometry::LineString2i &lhs)#
-
visionflow::geometry::Rect2i envelope(const visionflow::geometry::Ring2i &lhs)#
-
visionflow::geometry::Rect2i envelope(const visionflow::geometry::Polygon2i &lhs)#
-
visionflow::geometry::Rect2i envelope(const visionflow::geometry::RotateRect2i &lhs)#
-
visionflow::geometry::Rect2f envelope(const visionflow::geometry::MultiPolygon2f &lhs)#
-
visionflow::geometry::Rect2i envelope(const visionflow::geometry::MultiPolygon2i &lhs)#
- group equals
几何图形是否相等
- param lhs:
几何图形
- param rhs:
同类型的几何图形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
×
×
×
×
×
×
×
√
LineString
×
√
×
×
×
×
×
×
×
Ring
×
×
√
√
√
√
×
×
×
Polygon
×
×
√
√
√
√
×
×
×
Rect
×
×
√
√
√
√
×
×
×
RotateRect
×
×
√
√
√
√
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
√
×
Vector
√
×
×
×
×
×
×
×
√
- return:
bool
Functions
-
bool equals(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool equals(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Vector2f &rhs)#
-
bool equals(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool equals(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Vector2i &rhs)#
-
bool equals(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool equals(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool equals(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool equals(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool equals(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool equals(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool equals(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool equals(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool equals(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool equals(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool equals(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool equals(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool equals(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool equals(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool equals(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool equals(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool equals(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool equals(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool equals(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool equals(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool equals(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool equals(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool equals(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool equals(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool equals(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool equals(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool equals(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool equals(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool equals(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool equals(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool equals(const visionflow::geometry::Vector2f &lhs, const visionflow::geometry::Vector2f &rhs)#
-
bool equals(const visionflow::geometry::Vector2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool equals(const visionflow::geometry::Vector2i &lhs, const visionflow::geometry::Vector2i &rhs)#
-
bool equals(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
bool equals(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool equals(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool equals(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
- group segment_sampling
Integer points within a geometry.
Sampling from small to large along the y-axis and compressing from small to large along the x-axis.
For a line segment whose ends are exactly on the integer point, only the smaller y-axis coordinate is retained.
This also means that for line segments parallel to the x-axis in a geometry, only those located on the smaller of the y-axis will be retained.
- param rhs:
Input geometry.
- return:
MultiSegment2f The result of compressing consecutive points.
Functions
-
visionflow::geometry::MultiSegment2f segment_sampling(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiSegment2f segment_sampling(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiSegment2f segment_sampling(const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiSegment2f segment_sampling(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiSegment2f segment_sampling(const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiSegment2f segment_sampling(const visionflow::geometry::MultiPolygon2i &rhs)#
- group intersection
几何图形之间的交集
Warning
对于整型几何图形的交集结果存在交点为浮点型时,会产生一定的问题.
- param lhs:
[in] 几何图形
- param rhs:
[in] 同类型的几何图形
- param result:
[out] The intersection of geo1 and geo2
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
√
√
√
√
√
×
×
×
LineString
√
√
√
√
×
√
×
×
×
Ring
√
√
√
√
×
√
×
×
×
Polygon
√
√
√
√
×
√
×
×
×
Rect
×
×
×
×
×
×
×
×
×
RotateRect
×
×
×
×
×
×
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
Functions
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
visionflow::geometry::MultiPoint2i intersection(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i intersection(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
visionflow::geometry::Point2f intersection(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f intersection(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Ellipse2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
visionflow::geometry::MultiPoint2f intersection(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Ellipse2f &rhs)#
- group intersects
几何图形是否相交(存在至少一个交点)
- param lhs:
几何图形
- param rhs:
同类型的几何图形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
√
√
√
√
√
×
√
×
LineString
√
√
√
√
√
√
×
√
×
Ring
√
√
√
√
√
√
×
√
×
Polygon
√
√
√
√
√
√
×
√
×
Rect
√
√
√
√
√
√
×
√
×
RotateRect
√
√
√
√
√
√
×
√
×
Arc
×
×
×
×
×
×
×
×
×
Circle
√
√
√
√
√
√
×
√
×
Vector
×
×
×
×
×
×
×
×
×
Functions
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool intersects(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool intersects(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Line2f &rhs)#
-
bool intersects(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool intersects(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool intersects(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool intersects(const visionflow::geometry::Line2f &lhs, const visionflow::geometry::Ellipse2f &rhs)#
-
bool intersects(const visionflow::geometry::Ellipse2f &lhs, const visionflow::geometry::Line2f &rhs)#
- group is_empty
判断几何图形是否为空
- param rhs:
线或多边形
LinearOrAreal
LineString
Ring
Polygon
MultiPoint
MultiPolygon
Functions
-
bool is_empty(const visionflow::geometry::LineString2f &rhs)#
-
bool is_empty(const visionflow::geometry::Ring2f &rhs)#
-
bool is_empty(const visionflow::geometry::Polygon2f &rhs)#
-
bool is_empty(const visionflow::geometry::MultiPoint2f &rhs)#
-
bool is_empty(const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool is_empty(const visionflow::geometry::LineString2i &rhs)#
-
bool is_empty(const visionflow::geometry::Ring2i &rhs)#
-
bool is_empty(const visionflow::geometry::Polygon2i &rhs)#
-
bool is_empty(const visionflow::geometry::MultiPoint2i &rhs)#
-
bool is_empty(const visionflow::geometry::MultiPolygon2i &rhs)#
- group is_rect
判断几何图像能否转换成矩形.
- param ring:
Ring.
- return:
true if Ring can be converted to Rect.
Functions
-
bool is_rect(const visionflow::geometry::Ring2f &ring)#
-
bool is_rect(const visionflow::geometry::Ring2i &ring)#
- group is_axial_rect
判断几何图像能否转成平行坐标轴的矩形.
- param ring:
Ring.
- return:
true if Ring can be converted to Rect and Rect is parallel coordinate axis.
Functions
-
bool is_axial_rect(const visionflow::geometry::Ring2f &ring)#
-
bool is_axial_rect(const visionflow::geometry::Ring2i &ring)#
- group is_rotate_rect
判断几何图像能否转成不平行坐标轴的矩形.
- param ring:
Ring.
- return:
true if Ring can be converted to Rect and Rect is not parallel coordinate axis.
Functions
-
bool is_rotate_rect(const visionflow::geometry::Ring2f &ring)#
-
bool is_rotate_rect(const visionflow::geometry::Ring2i &ring)#
- group is_simple
判断几何图形是否是简单几何图形
- param rhs:
线或多边形
LinearOrAreal
LineString
Ring
Polygon
- return:
Linear:非空,没有重复点,不自交,没有尖峰.
- return:
Areal:非空,没有重复点.
Functions
-
bool is_simple(const visionflow::geometry::LineString2f &rhs)#
-
bool is_simple(const visionflow::geometry::Ring2f &rhs)#
-
bool is_simple(const visionflow::geometry::Polygon2f &rhs)#
-
bool is_simple(const visionflow::geometry::LineString2i &rhs)#
-
bool is_simple(const visionflow::geometry::Ring2i &rhs)#
-
bool is_simple(const visionflow::geometry::Polygon2i &rhs)#
- group return_is_simple
判断几何图形是否是简单几何图形
See also
See also
- param rhs:
线或多边形
- return:
GeoIsSampleFailType 几何图形不为简单几何图形的错误信息
Functions
-
visionflow::geometry::GeoIsSampleFailType return_is_simple(const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_simple(const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_simple(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_simple(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_simple(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_simple(const visionflow::geometry::Polygon2i &rhs)#
- group is_valid
判断几何图形数据是否有效
- param rhs:
线或多边形
LinearOrAreal
LineString
Ring
Polygon
MultiPolygon
- return:
Linear:没有无效点,至少有两个点,满足拓扑维数(存在至少两个不相同点),可以有尖峰.
- return:
Ring:没有无效点,至少有三个点(闭包四个点),满足拓扑维数(存在至少三个不相同点), 可以有重复点,没有尖峰,没有自交,满足数据顺序定义.
- return:
Polygon:外环内环都是有效的,多边形不自交,内环在外环内,内环不存在嵌套.
Functions
-
bool is_valid(const visionflow::geometry::LineString2f &rhs)#
-
bool is_valid(const visionflow::geometry::Ring2f &rhs)#
-
bool is_valid(const visionflow::geometry::Polygon2f &rhs)#
-
bool is_valid(const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool is_valid(const visionflow::geometry::LineString2i &rhs)#
-
bool is_valid(const visionflow::geometry::Ring2i &rhs)#
-
bool is_valid(const visionflow::geometry::Polygon2i &rhs)#
- group return_is_valid
判断几何图形数据是否有效
See also
See also
- param rhs:
线或多边形
- return:
GeoIsSampleFailType 几何图形数据失效的错误信息
Functions
-
visionflow::geometry::GeoIsSampleFailType return_is_valid(const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_valid(const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_valid(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_valid(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_valid(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::GeoIsSampleFailType return_is_valid(const visionflow::geometry::Polygon2i &rhs)#
- group length
几何图形的长度
- param rhs:
线或向量
LinearOrVector
LineString
Vector
- return:
float
Functions
-
float length(const visionflow::geometry::LineString2f &rhs)#
-
float length(const visionflow::geometry::LineString2i &rhs)#
-
float length(const visionflow::geometry::Vector2f &rhs)#
-
float length(const visionflow::geometry::Vector2i &rhs)#
- group line_interpolate
线上的线性插值
Warning
对于整型线的插值结果存在浮点型时,会产生一定的问题.
- param lhs:
线
- param rhs:
点集或单点
- param result:
单点则为起点起插值的第一个点,点集则是全部点.
Functions
-
void line_interpolate(const visionflow::geometry::LineString2f &lhs, const float &rhs, visionflow::geometry::Point2f &result)#
-
void line_interpolate(const visionflow::geometry::LineString2i &lhs, const float &rhs, visionflow::geometry::Point2i &result)#
-
void line_interpolate(const visionflow::geometry::LineString2f &lhs, const float &rhs, visionflow::geometry::MultiPoint2f &result)#
-
void line_interpolate(const visionflow::geometry::LineString2i &lhs, const float &rhs, visionflow::geometry::MultiPoint2i &result)#
- group min_area_rect
最小面积外接矩形
- param lhs:
多边形
- throws visionflow::excepts::InvalidArgument:
if the geometry is not valid.
- return:
多边形的最小外包围矩形
Areal
Ring
Polygon
Ellipse
Functions
-
visionflow::geometry::RotateRect2f min_area_rect(const visionflow::geometry::Ring2f &lhs)#
-
visionflow::geometry::RotateRect2f min_area_rect(const visionflow::geometry::Polygon2f &lhs)#
-
visionflow::geometry::RotateRect2f min_area_rect(const visionflow::geometry::Ellipse2f &lhs)#
-
visionflow::geometry::RotateRect2f min_area_rect(const visionflow::geometry::MultiPolygon2f &lhs)#
- group overlaps
多边形是否有重叠部分
对于其中一个多边形完全覆盖另一个多边形的情况,被认为是false.
- param lhs:
多边形
- param rhs:
同类型的多边形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
×
×
×
×
×
×
×
×
×
LineString
×
×
×
×
×
×
×
×
×
Ring
×
×
√
√
×
×
×
×
×
Polygon
×
×
√
√
×
×
×
×
×
Rect
×
×
×
×
√
×
×
×
×
RotateRect
×
×
×
×
×
×
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
- return:
bool
Functions
-
bool overlaps(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool overlaps(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool overlaps(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool overlaps(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool overlaps(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool overlaps(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool overlaps(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool overlaps(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool overlaps(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool overlaps(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool overlaps(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool overlaps(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool overlaps(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
- group perimeter
几何图形的周长
整型矩形的周长
- param rhs:
多边形的周长
Areal
Ring
Polygon
Rect
RotateRect
Circle
- param rhs:
整型矩形
- return:
uint32_t 整型周长
Functions
-
float perimeter(const visionflow::geometry::Ring2f &rhs)#
-
float perimeter(const visionflow::geometry::Polygon2f &rhs)#
-
float perimeter(const visionflow::geometry::Rect2f &rhs)#
-
float perimeter(const visionflow::geometry::RotateRect2f &rhs)#
-
float perimeter(const visionflow::geometry::Circle2f &rhs)#
-
float perimeter(const visionflow::geometry::Ring2i &rhs)#
-
float perimeter(const visionflow::geometry::Polygon2i &rhs)#
-
float perimeter(const visionflow::geometry::RotateRect2i &rhs)#
-
float perimeter(const visionflow::geometry::Circle2i &rhs)#
-
float perimeter(const visionflow::geometry::MultiPolygon2f &rhs)#
-
uint32_t perimeter(const visionflow::geometry::Rect2i &rhs)#
- group reverse
翻转几何图形数据顺序
Note
The reverse of a (multi)polygon or ring might make a valid geometry invalid because the (counter)clockwise orientation reverses.
- param rhs:
线或多边形
LinearOrAreal
LineString
Ring
Polygon
Functions
-
void reverse(visionflow::geometry::LineString2f &rhs)#
-
void reverse(visionflow::geometry::Ring2f &rhs)#
-
void reverse(visionflow::geometry::Polygon2f &rhs)#
-
void reverse(visionflow::geometry::LineString2i &rhs)#
-
void reverse(visionflow::geometry::Ring2i &rhs)#
-
void reverse(visionflow::geometry::Polygon2i &rhs)#
-
void reverse(visionflow::geometry::MultiPolygon2f &rhs)#
- group return_reverse
翻转几何图形数据顺序
See also
Functions
-
visionflow::geometry::LineString2f return_reverse(const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::Ring2f return_reverse(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::Polygon2f return_reverse(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::LineString2i return_reverse(const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::Ring2i return_reverse(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::Polygon2i return_reverse(const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2f return_reverse(const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::LineString2f return_reverse(const visionflow::geometry::LineString2f &rhs)#
- group simplify
Simplify the geometry with Douglas-Peucker polygon approximation algorithm, and points smaller than a given threshold are removed.
Warning
The result will be forced to be modified as a closure if it’s line.
- param lhs:
line of polygon.
- param rhs:
threshold.
Functions
-
void simplify(visionflow::geometry::LineString2f &lhs, const float &rhs)#
-
void simplify(visionflow::geometry::Ring2f &lhs, const float &rhs)#
-
void simplify(visionflow::geometry::Polygon2f &lhs, const float &rhs)#
-
void simplify(visionflow::geometry::LineString2i &lhs, const float &rhs)#
-
void simplify(visionflow::geometry::Ring2i &lhs, const float &rhs)#
-
void simplify(visionflow::geometry::Polygon2i &lhs, const float &rhs)#
- group return_simplify
简化几何图形
See also
Functions
-
visionflow::geometry::LineString2f return_simplify(const visionflow::geometry::LineString2f &lhs, const float &rhs)#
-
visionflow::geometry::Ring2f return_simplify(const visionflow::geometry::Ring2f &lhs, const float &rhs)#
-
visionflow::geometry::Polygon2f return_simplify(const visionflow::geometry::Polygon2f &lhs, const float &rhs)#
-
visionflow::geometry::LineString2i return_simplify(const visionflow::geometry::LineString2i &lhs, const float &rhs)#
-
visionflow::geometry::Ring2i return_simplify(const visionflow::geometry::Ring2i &lhs, const float &rhs)#
-
visionflow::geometry::Polygon2i return_simplify(const visionflow::geometry::Polygon2i &lhs, const float &rhs)#
-
visionflow::geometry::LineString2f return_simplify(const visionflow::geometry::LineString2f &lhs, const float &rhs)#
- group sym_difference
几何图形之间的对称差
Warning
对于整型几何图形的对称差结果存在交点为浮点型时,会产生一定的问题.
Warning
几何结构不遵守约定顺序可能会产生一定的问题.
- param lhs:
多边形
- param rhs:
同数据类型的多边形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
×
×
×
×
×
×
×
×
×
LineString
×
×
×
×
×
×
×
×
×
Ring
×
×
√
√
×
×
×
×
×
Polygon
×
×
√
√
×
×
×
×
×
Rect
×
×
×
×
×
×
×
×
×
RotateRect
×
×
×
×
×
×
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
- return:
同数据类型的多多边形
Functions
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2i sym_difference(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i sym_difference(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i sym_difference(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i sym_difference(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f sym_difference(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
- group touches
几何图形之间是否触及(相切,不重叠)
- param lhs:
多边形
- param rhs:
同类型的多边形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
×
×
×
×
×
×
×
×
×
LineString
×
×
×
×
×
×
×
×
×
Ring
×
×
√
√
×
×
×
×
×
Polygon
×
×
√
√
×
×
×
×
×
Rect
×
×
×
×
×
×
×
×
×
RotateRect
×
×
×
×
×
×
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
- return:
bool
Functions
-
bool touches(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool touches(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool touches(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool touches(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool touches(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool touches(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool touches(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool touches(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool touches(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool touches(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool touches(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
- group union_areal
多边形之间的并集
Warning
对于整型几何图形的并集结果存在交点为浮点型时,会产生一定的问题.
- param lhs:
多边形
- param rhs:
同类型的多边形
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
×
×
×
×
×
×
×
×
×
LineString
×
×
×
×
×
×
×
×
×
Ring
×
×
√
√
×
×
×
×
×
Polygon
×
×
√
√
×
×
×
×
×
Rect
×
×
×
×
×
×
×
×
×
RotateRect
×
×
×
×
×
×
×
×
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
×
×
×
×
×
×
×
Vector
×
×
×
×
×
×
×
×
×
- param result:
同类型的多多边形
Functions
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2i union_areal(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i union_areal(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2i union_areal(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::MultiPolygon2i union_areal(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::MultiPolygon2f union_areal(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
- group unique
去除几何图形中重复节点
- param rhs:
线或多边形
LinearOrAreal
LineString
Ring
Polygon
Functions
-
void unique(visionflow::geometry::LineString2f &rhs)#
-
void unique(visionflow::geometry::Ring2f &rhs)#
-
void unique(visionflow::geometry::Polygon2f &rhs)#
-
void unique(visionflow::geometry::LineString2i &rhs)#
-
void unique(visionflow::geometry::Ring2i &rhs)#
-
void unique(visionflow::geometry::Polygon2i &rhs)#
-
void unique(visionflow::geometry::MultiPolygon2f &rhs)#
- group return_unique
去除几何图形中重复节点
See also
Functions
-
visionflow::geometry::LineString2f return_unique(const visionflow::geometry::LineString2f &rhs)#
-
visionflow::geometry::Ring2f return_unique(const visionflow::geometry::Ring2f &rhs)#
-
visionflow::geometry::Polygon2f return_unique(const visionflow::geometry::Polygon2f &rhs)#
-
visionflow::geometry::LineString2i return_unique(const visionflow::geometry::LineString2i &rhs)#
-
visionflow::geometry::Ring2i return_unique(const visionflow::geometry::Ring2i &rhs)#
-
visionflow::geometry::Polygon2i return_unique(const visionflow::geometry::Polygon2i &rhs)#
-
visionflow::geometry::MultiPolygon2f return_unique(const visionflow::geometry::MultiPolygon2f &rhs)#
-
visionflow::geometry::LineString2f return_unique(const visionflow::geometry::LineString2f &rhs)#
- group vertical
Point to the vertical foot of the line.
Functions
-
visionflow::geometry::Point2f vertical(const visionflow::geometry::Point2f &point, const visionflow::geometry::Line2f &line)#
-
visionflow::geometry::Point2f vertical(const visionflow::geometry::Line2f &line, const visionflow::geometry::Point2f &point)#
-
visionflow::geometry::Point2f vertical(const visionflow::geometry::Point2f &point, const visionflow::geometry::Line2f &line)#
- group within
第一个几何图形是否在第二个几何图形内部
区别于 covered_by() 当第一个几何图形的顶点落在第二个几何图形边上时,返回false.
当第二个几何图形的顶点落在第一个几何图像边上时(例如第二个几何图形是凹多边形),返回true.
See also
- param lhs:
几何图形
- param rhs:
lhs/rhs
Point
LineString
Ring
Polygon
Rect
RotateRect
Arc
Circle
Vector
Point
√
√
√
√
√
√
×
√
×
LineString
×
√
√
√
√
√
×
√
×
Ring
×
×
√
√
√
√
×
√
×
Polygon
×
×
√
√
√
√
×
√
×
Rect
×
×
√
√
√
√
×
√
×
RotateRect
×
×
√
√
√
√
×
√
×
Arc
×
×
×
×
×
×
×
×
×
Circle
×
×
√
√
√
√
×
√
×
Vector
×
×
×
×
×
×
×
×
×
- return:
bool
Functions
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Point2f &rhs)#
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::Point2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Point2i &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::Point2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::LineString2f &rhs)#
-
bool within(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::LineString2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::LineString2i &rhs)#
-
bool within(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::LineString2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::Ring2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::Polygon2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::Rect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::Rect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::RotateRect2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::RotateRect2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Rect2f &rhs)#
-
bool within(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::RotateRect2f &rhs)#
-
bool within(const visionflow::geometry::Circle2f &lhs, const visionflow::geometry::Circle2f &rhs)#
-
bool within(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Ring2i &rhs)#
-
bool within(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Polygon2i &rhs)#
-
bool within(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Rect2i &rhs)#
-
bool within(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::RotateRect2i &rhs)#
-
bool within(const visionflow::geometry::Circle2i &lhs, const visionflow::geometry::Circle2i &rhs)#
-
bool within(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool within(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Ring2f &rhs)#
-
bool within(const visionflow::geometry::MultiPolygon2f &lhs, const visionflow::geometry::Polygon2f &rhs)#
-
bool within(const visionflow::geometry::Ring2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
-
bool within(const visionflow::geometry::Polygon2f &lhs, const visionflow::geometry::MultiPolygon2f &rhs)#
- group sampling
Sampling ideal geometry types to point set geometry types. Ideal geometry types is geometry types like Rectangle, Circle, Ellipse, etc. Point set geometry types is geometry types described by vertices, like ring, polygon, etc.
It Only support Equiangular sampling currently. The sampling center is the center of the geometry.
- param geometry:
Geometry object to be sampling, support:
- param point_num:
The number of sampling points, should be greater than or equal to 3.
Functions
-
visionflow::geometry::Ring2f sampling(const visionflow::geometry::Circle2f &geometry, size_t point_num)#
-
visionflow::geometry::Ring2f sampling(const visionflow::geometry::Ellipse2f &geometry, size_t point_num)#
- group transform_rotate
Geometry rotate transform.
Cartesian coordinate system(the origin of the first quadrant is in
the lower left corner), follow
Radiandefinition direction.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- param geometry:
Geometry.
Geometry
Point
LineString
Ring
Polygon
RotateRect
Ellipse
Vector
Segment
MultiPoint
MultiPolygon
- param radian:
Rotation radian.
- return:
The result is consistent with the input geometry.
- param rect:
Rect.
- param radian:
Rotation radian.
- return:
the result is RotateRect.
Functions
-
visionflow::geometry::Point2f transform_rotate(const visionflow::geometry::Point2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::LineString2f transform_rotate(const visionflow::geometry::LineString2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::Ring2f transform_rotate(const visionflow::geometry::Ring2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::Polygon2f transform_rotate(const visionflow::geometry::Polygon2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::RotateRect2f transform_rotate(const visionflow::geometry::RotateRect2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::Ellipse2f transform_rotate(const visionflow::geometry::Ellipse2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::Vector2f transform_rotate(const visionflow::geometry::Vector2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::Segment2f transform_rotate(const visionflow::geometry::Segment2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::MultiPoint2f transform_rotate(const visionflow::geometry::MultiPoint2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::MultiPolygon2f transform_rotate(const visionflow::geometry::MultiPolygon2f &geometry, const visionflow::geometry::Radian &radian)#
-
visionflow::geometry::RotateRect2f transform_rotate(const visionflow::geometry::Rect2f &rect, const visionflow::geometry::Radian &radian)#
- group transform_scale
Geometry scale transform.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- param geometry:
Geometry.
Geometry
Point
LineString
Ring
Polygon
Rect
Ellipse
Vector
Segment
MultiPoint
MultiPolygon
- param ratio_x:
Scaling ratio direction-x.
- param ratio_y:
Scaling ratio direction-y.
- return:
The result is consistent with the input geometry.
- param rotate_rect:
RotateRect.
- param ratio_x:
Scaling ratio direction-x.
- param ratio_y:
Scaling ratio direction-y.
- return:
the result is Ring.
Functions
-
visionflow::geometry::Point2f transform_scale(const visionflow::geometry::Point2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::LineString2f transform_scale(const visionflow::geometry::LineString2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::Ring2f transform_scale(const visionflow::geometry::Ring2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::Polygon2f transform_scale(const visionflow::geometry::Polygon2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::Rect2f transform_scale(const visionflow::geometry::Rect2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::Vector2f transform_scale(const visionflow::geometry::Vector2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::Segment2f transform_scale(const visionflow::geometry::Segment2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::MultiPoint2f transform_scale(const visionflow::geometry::MultiPoint2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::MultiPolygon2f transform_scale(const visionflow::geometry::MultiPolygon2f &geometry, float ratio_x, float ratio_y)#
-
visionflow::geometry::Ring2f transform_scale(const visionflow::geometry::RotateRect2f &rotate_rect, float ratio_x, float ratio_y)#
- group transform_translate
Geometry translate transform.
- param geometry:
Geometry.
Geometry
Point
LineString
Ring
Polygon
Rect
RotateRect
Ellipse
Vector
Segment
MultiPoint
MultiPolygon
- param offset_x:
Translation transform direction-x.
- param offset_y:
Translation transform direction-y.
- return:
The result is consistent with the input geometry.
Functions
-
visionflow::geometry::Point2f transform_translate(const visionflow::geometry::Point2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::LineString2f transform_translate(const visionflow::geometry::LineString2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::Ring2f transform_translate(const visionflow::geometry::Ring2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::Polygon2f transform_translate(const visionflow::geometry::Polygon2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::Rect2f transform_translate(const visionflow::geometry::Rect2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::RotateRect2f transform_translate(const visionflow::geometry::RotateRect2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::Ellipse2f transform_translate(const visionflow::geometry::Ellipse2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::Vector2f transform_translate(const visionflow::geometry::Vector2f &vector, float offset_x, float offset_y)#
-
visionflow::geometry::Segment2f transform_translate(const visionflow::geometry::Segment2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::MultiPoint2f transform_translate(const visionflow::geometry::MultiPoint2f &geometry, float offset_x, float offset_y)#
-
visionflow::geometry::MultiPolygon2f transform_translate(const visionflow::geometry::MultiPolygon2f &geometry, float offset_x, float offset_y)#
- group transform
Geometry transform.
transform(geometry, step1), transform(geometry, step2) -> transform(geometry, step2 * step1).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- param geometry:
Geometry.
Geometry
Point
LineString
Ring
Polygon
Vector
Segment
MultiPoint
MultiPolygon
- param mat:
Transformation matrix.
- return:
the result is consistent with the input geometry.
- param rect:
Rect.
- param mat:
Transformation matrix.
- return:
the result is Ring.
- param rotate_rect:
RotateRect.
- param mat:
Transformation matrix.
- return:
the result is Ring.
Functions
-
visionflow::geometry::Point2f transform(const visionflow::geometry::Point2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::LineString2f transform(const visionflow::geometry::LineString2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::Ring2f transform(const visionflow::geometry::Ring2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::Polygon2f transform(const visionflow::geometry::Polygon2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::Vector2f transform(const visionflow::geometry::Vector2f &vector, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::Segment2f transform(const visionflow::geometry::Segment2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::MultiPoint2f transform(const visionflow::geometry::MultiPoint2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::MultiPolygon2f transform(const visionflow::geometry::MultiPolygon2f &geometry, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::Ring2f transform(const visionflow::geometry::Rect2f &rect, const visionflow::geometry::Matrix3f &mat)#
-
visionflow::geometry::Ring2f transform(const visionflow::geometry::RotateRect2f &rotate_rect, const visionflow::geometry::Matrix3f &mat)#
-
Matrix3f visionflow::geometry::get_affine_transform(const std::vector<Point2f> &src, const std::vector<Point2f> &dst)#
Calculate an affine transform from three pairs of the corresponding points.
If the number of point pairs is less than 3, an visionflow::excepts::InvalidArgument will be thrown.
- Parameters:
src – Coordinate of triangle vertices in the source image.
dst – Coordinate of the corresponding triangle vertices in the destination image.
- Throws:
visionflow::excepts::InvalidArgument – if the number of point pairs is less than requirement.
- Returns:
transformation matrix.
-
Matrix3f visionflow::geometry::get_perspective_transform(const std::vector<Point2f> &src, const std::vector<Point2f> &dst)#
Calculate a perspective transform from four pairs of the corresponding points.
If the number of point pairs is less than 4, an visionflow::excepts::InvalidArgument will be thrown.
- Parameters:
src – Coordinate of quadrangle vertices in the source image.
dst – Coordinate of the corresponding quadrangle vertices in the destination image.
- Throws:
visionflow::excepts::InvalidArgument – if the number of point pairs is less than requirement.
- Returns:
transformation matrix.
-
Matrix3f visionflow::geometry::get_inverse_transform(const Matrix3f &mat)#
Get inverse transform matrix.
- Parameters:
mat – Source matrix.
- Returns:
inverse transform matrix.
-
Matrix3f visionflow::geometry::get_rotate_transform(const Radian &theta)#
Get rotate transform matrix.
Follow Radian definition direction, and the matrix is:
\[\begin{split} \begin{bmatrix} cos\theta & -sin\theta & 0 \\ sin\theta & cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix} \end{split}\]- Parameters:
theta – Rotation radian.
- Returns:
Matrix3f rotate transform matrix.
-
Matrix3f visionflow::geometry::get_rotate_transform(const Point2f ¢er, const Radian &theta)#
Get the transformation matrix rotated around a given center.
Let the center pos be \( (x_c, y_c) \), then the transform matrix is:
\[\begin{split} \begin{bmatrix} cos\theta & -sin\theta & (1 - cos\theta) x_c + sin\theta * y_c \\ sin\theta & cos\theta & -sin\theta * x_c + (1 - cos\theta) y_c \\ 0 & 0 & 1 \end{bmatrix} \end{split}\]- Parameters:
center – The rotate center.
theta – Rotation radian.
- Returns:
Matrix3f the rotate transform matrix.
-
Matrix3f visionflow::geometry::get_scale_transform(float s_x, float s_y)#
Get scale transform matrix.
The matrix is:
\[\begin{split} \begin{bmatrix} s_x & 0 & 0 \\ 0 & s_y & 0 \\ 0 & 0 & 1 \end{bmatrix} \end{split}\]- Parameters:
s_x – Scaling ratio direction-x.
s_y – Scaling ratio direction-y.
- Returns:
scale transform matrix.
-
Matrix3f visionflow::geometry::get_scale_transform(const Point2f ¢er, float s_x, float s_y)#
Get the transformation matrix scaled to the given point.
Let the center pos be \( (x_c, y_c) \), then the transform matrix is:
\[\begin{split} \begin{bmatrix} s_x & 0 & (1 - s_x) x_c \\ 1 & s_y & (1 - s_y) y_c \\ 0 & 0 & 1 \end{bmatrix} \end{split}\]- Parameters:
center – The scale center.
s_x – Scaling ratio direction-x.
s_y – Scaling ratio direction-y.
- Returns:
Matrix3f scale transform matrix.
-
Matrix3f visionflow::geometry::get_translate_transform(float offset_x, float offset_y)#
Get translate transform matrix.
- Parameters:
offset_x – Translation transform direction-x.
offset_y – Translation transform direction-y.
- Returns:
translate transform matrix
-
Matrix3f visionflow::geometry::get_flip_transform(const Line2f &flip_axis)#
Get the mirror flip transform matrix.
Let the symmetrical axis for mirror flip be \( ax + by + c = 0 \), then the transform matrix is:
\[\begin{split} \begin{bmatrix} (b^2 - a^2)/(a^2+b^2) & -2ab/(a^2+b^2) & -2ac/(a^2+b^2) \\ -2ab/(a^2+b^2) & (a^2 - b^2)/(a^2+b^2) & -2bc/(a^2+b^2) \\ 0 & 0 & 1 \end{bmatrix} \end{split}\]- Parameters:
flip_axis – The symmetrical axis for mirror flip.
- Returns:
Matrix3f flip transform matrix
-
using visionflow::geometry::Rect2f::Size = Size2f#
-
using visionflow::geometry::Rect2i::Size = Size2i#
-
using visionflow::geometry::MultiPoint2f::Point = Point2f#
-
using visionflow::geometry::MultiPoint2i::Point = Point2i#
-
using visionflow::geometry::MultiPolygon2f::Polygon = Polygon2f#
-
using visionflow::geometry::MultiPolygon2i::Polygon = Polygon2i#