 |
NAVTOR SDK
v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
|
|
Go to the documentation of this file. 1 #ifndef SDK_2D_GEOMETRY_PATH_UTILS_INTERFACE_H_
12 #define SDK_2D_GEOMETRY_PATH_UTILS_INTERFACE_H_
22 #include "2d_geometry_objects.h"
49 bool& is_infinite)
const throw() = 0;
54 const SDKMatrix3X2& transformation_matrix,
61 const SDKMatrix3X2& transformation_matrix,
67 float& perimeter)
const throw() = 0;
77 const SDKMatrix3X2& transformation_matrix,
SDKPointF2D& point,
83 const GeometryPathSP& input_path,
84 const SDKMatrix3X2& input_path_transformation_matrix,
90 const SDKMatrix3X2& transformation_matrix,
91 bool& is_inside)
const throw() = 0;
96 const SDKMatrix3X2& transformation_matrix,
const float& edge_width,
97 bool& is_on_edge)
const throw() = 0;
108 GeometryPathSP& clipped_path,
114 GeometryPathSP& clipped_path,
118 const typename Box::point_type& p1 = box.min_corner();
119 const typename Box::point_type& p2 = box.max_corner();
122 static_cast<float>(p1.template get<0>()),
123 static_cast<float>(p1.template get<1>()),
124 static_cast<float>(p2.template get<0>() - p1.template get<0>()),
125 static_cast<float>(p2.template get<1>() - p1.template get<1>()),
127 return this->
ClipByRect(rect, clipped_path, clip_mode, clip_result);
146 const typename Box::point_type& p1 = box.min_corner();
147 const typename Box::point_type& p2 = box.max_corner();
150 static_cast<float>(p1.template get<0>()),
151 static_cast<float>(p1.template get<1>()),
152 static_cast<float>(p2.template get<0>() - p1.template get<0>()),
153 static_cast<float>(p2.template get<1>() - p1.template get<1>()),
155 return this->
IsIntersect(rect, clip_mode, clip_result);
166 #endif // SDK_2D_GEOMETRY_PATH_UTILS_INTERFACE_H_
virtual SDKResult SDK_CALLTYPE FastCalcBounds(const SDKMatrix3X2 &transformation_matrix, SDKRectF2D &bounds) const =0
Calculates the geometry path bounding rectangle Inaccurate, but fast algorithm, for exact bounds use ...
virtual SDKResult SDK_CALLTYPE IsInfinite(bool &is_infinite) const =0
Indicates whether this geometry is a plane with infinite borders.
Describes interfaces that manages a geometry objects.
Describes interface for 2D geometry path, which allows to get some different properties and use sever...
Definition: 2d_geometry_path_utils_interface.h:41
@ GeometryPathCompareResult_InputPathInside
Passed input geometry path is fully inside given geometry path.
Definition: 2d_geometry_path_utils_interface.h:33
virtual SDKResult SDK_CALLTYPE CalcBounds(const SDKMatrix3X2 &transformation_matrix, SDKRectF2D &bounds) const =0
Calculates the geometry path bounding rectangle For infinite geometry the bounding rect has infinite ...
virtual SDKResult SDK_CALLTYPE CalcPerimeter(float &perimeter) const =0
Calculates the perimeter of geometry path For infinite geometry the SDK_MAX_FLOAT value will be retur...
2D Rectangle
Definition: geometry_base_types.h:1295
@ GeometryPathCompareResult_Unknown
Can't compare two geometry paths.
Definition: 2d_geometry_path_utils_interface.h:31
Wrappers and helper functions for SDKString.
virtual SDKResult SDK_CALLTYPE CompareWithPath(const GeometryPathSP &input_path, const SDKMatrix3X2 &input_path_transformation_matrix, GeometryPathCompareResult &compare_result) const =0
Compares the given geometry path with passed one Note, in case one of paths is infinite,...
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
virtual SDKResult SDK_CALLTYPE IsIntersect(const SDKRectF2D &rect, GeometryType clip_mode=kGMT_Surface, GeometryPathCompareResult *clip_result=NULL) const =0
Quickly check is the geometry intersect the rectangle.
@ GeometryPathCompareResult_GivenPathInside
Given geometry path is fully inside passed input geometry path.
Definition: 2d_geometry_path_utils_interface.h:34
GeometryPathCompareResult
Possible results of geometry path compare methods.
Definition: 2d_geometry_path_utils_interface.h:29
Common base SDK interfaces.
virtual SDKResult SDK_CALLTYPE ClipByRect(const SDKRectF2D &rect, GeometryPathSP &clipped_path, GeometryType clip_mode=kGMT_Surface, GeometryPathCompareResult *clip_result=NULL) const =0
Quickly clip the geometry by the rectangle.
Single 2D point.
Definition: geometry_base_types.h:33
virtual SDKResult SDK_CALLTYPE CalcPointByDistance(const float &distance, const SDKMatrix3X2 &transformation_matrix, SDKPointF2D &point, SDKPointF2D &tangent) const =0
Calculates the appropriate point position on path by using distance value from start No point positio...
virtual SDKResult SDK_CALLTYPE IsPointInsideArea(const SDKPointF2D &point, const SDKMatrix3X2 &transformation_matrix, bool &is_inside) const =0
Checks, if point lays inside given path Point is always lays inside infinite path.
@ GeometryPathCompareResult_NoIntersection
Both of paths does not intersects at all.
Definition: 2d_geometry_path_utils_interface.h:32
@ kGMT_Surface
A Surface is a collection of rings.
Definition: geometry.h:83
GeometryType
Available types of geometry objects.
Definition: geometry.h:73
virtual SDKResult SDK_CALLTYPE IsEmpty(bool &is_empty) const =0
Indicates whether this geometry contains any points.
virtual SDKResult SDK_CALLTYPE CalcArea(float &area) const =0
Calculates the area of geometry path For infinite geometry the SDK_MAX_FLOAT value will be returned a...
@ GeometryPathCompareResult_Intersection
Geometry paths intersects, but neither completely contains the other.
Definition: 2d_geometry_path_utils_interface.h:35
virtual SDKResult SDK_CALLTYPE IsPointOnEdge(const SDKPointF2D &point, const SDKMatrix3X2 &transformation_matrix, const float &edge_width, bool &is_on_edge) const =0
Checks, if point lays on the edge on given path Point is always does not lays on infinite path edge.