#include <GeometryFunctions.h>
Static Public Member Functions | |
static te::gm::GeometryVector | AddProjectedCoordinates (const te::gm::GeometryVectorConst &geometryVector, double distance, bool &wasChanged) |
Detects and adds all the coordinates from given geometryVector which projected coordinates lies within any segment of the geometries and is within the given 'distance'. | |
static double | CalculateDistance (const te::gm::Coord2D &c1, const te::gm::Coord2D &c2) |
Calculates the distance between c1 and c2. | |
static double | CalculateSquaredDistance (const te::gm::Coord2D &c1, const te::gm::Coord2D &c2) |
Calculates the squared distance between c1 and c2, that is, the distance calculation without the final square root step. This is particularly useful when we just need to compare distance values, and not know the distance itself. | |
static double | CalculateSquaredDistance (const te::gm::Point &p1, const te::gm::Point &p2) |
Calculates the squared distance between p1 and p2, that is, the distance calculation without the final square root step. This is particularly useful when we just need to compare distance values, and not know the distance itself. | |
static bool | IsEqual (const te::gm::Coord2D &c1, const te::gm::Coord2D &c2) |
Checks if a coordinate c1 is exactly equal to the coordinate c2. | |
static bool | IsEqual (const te::gm::Point &p1, const te::gm::Point &p2) |
Checks if a point p1 is exactly equal to the point p2. | |
static bool | IsEqual (double x1, double y1, double x2, double y2) |
Checks if a coordinate (x1, x2) is exactly equal to the coordinate (x2, y2) | |
static bool | IsOnLine (const te::gm::Coord2D &coordToCheck, const te::gm::Coord2D &c1, const te::gm::Coord2D &c2) |
Checks if the given coordToCheck lies within the line. | |
static bool | IsWithinDistance (const te::gm::Coord2D &c1, const te::gm::Coord2D &c2, double distance) |
Checks in an optimized way if the given coordinates are within the given distance. The optimization is achieved by avoiding the calculation of the square root. | |
static bool | IsWithinDistance (const te::gm::Point &p1, const te::gm::Point &p2, double distance) |
Checks in an optimized way if the given coordinates are within the given distance. The optimization is achieved by avoiding the calculation of the square root. | |
static double | PerpendicularDistance (const te::gm::Coord2D &first, const te::gm::Coord2D &last, const te::gm::Coord2D &pin, te::gm::Coord2D &projectedCoordinate, bool &isOnSegment) |
Calculate the perpendicular distance of a point in a segment. | |
static double | PerpendicularDistance (const te::gm::Point &first, const te::gm::Point &last, const te::gm::Point &pin, te::gm::Point &projectedPoint, bool &isOnSegment) |
Calculate the perpendicular distance of a point in a segment. | |
static double | PerpendicularSquaredDistance (const te::gm::Coord2D &first, const te::gm::Coord2D &last, const te::gm::Coord2D &pin, te::gm::Coord2D &projectedCoordinate, bool &isOnSegment) |
Calculate the perpendicular squared distance of a point in a segment. | |
static double | PerpendicularSquaredDistance (const te::gm::Point &first, const te::gm::Point &last, const te::gm::Point &pin, Point &projectedPoint, bool &isOnSegment) |
Calculate the perpendicular squared distance of a point in a segment. | |
Definition at line 47 of file GeometryFunctions.h.
|
static |
Detects and adds all the coordinates from given geometryVector which projected coordinates lies within any segment of the geometries and is within the given 'distance'.
geometryVector | The geometryVector to be processed. |
distance | The distance to be considered for the projected coordinates |
|
static |
Calculates the distance between c1 and c2.
c1 | The first coordinate |
c2 | The second coordinate |
|
static |
Calculates the squared distance between c1 and c2, that is, the distance calculation without the final square root step. This is particularly useful when we just need to compare distance values, and not know the distance itself.
c1 | The first coordinate |
c2 | The second coordinate |
Referenced by te::gm::CoordDistanceOrderFunctor::operator()(), and te::gm::PointDistanceOrderFunctor::operator()().
|
static |
Calculates the squared distance between p1 and p2, that is, the distance calculation without the final square root step. This is particularly useful when we just need to compare distance values, and not know the distance itself.
c1 | The first point |
c2 | The second point |
|
static |
Checks if a coordinate c1 is exactly equal to the coordinate c2.
c1 | The first coordinate |
c2 | The second coordinate |
|
static |
Checks if a point p1 is exactly equal to the point p2.
p1 | The first point |
p2 | The second point |
|
static |
Checks if a coordinate (x1, x2) is exactly equal to the coordinate (x2, y2)
x1 | The X of the first coordinate |
y1 | The Y of the first coordinate |
x2 | The X of the second coordinate |
y2 | The Y of the second coordinate |
|
static |
Checks if the given coordToCheck lies within the line.
coordToCheck | The coordinate to be checked |
c1 | First coordinate of the line segment |
c2 | Last coordinate of the line segment |
|
static |
Checks in an optimized way if the given coordinates are within the given distance. The optimization is achieved by avoiding the calculation of the square root.
c1 | The first coordinate |
c2 | The second coordinate |
distance | The distance to be considered |
|
static |
Checks in an optimized way if the given coordinates are within the given distance. The optimization is achieved by avoiding the calculation of the square root.
p1 | The first point |
p2 | The second point |
distance | The distance to be considered |
|
static |
Calculate the perpendicular distance of a point in a segment.
first | The first segment coordinate. |
last | The last segment coordinate. |
pin | The coordinate to be calculated. |
pinter | A intern coordinate calculated based on pin projected intersection with the segment. |
|
static |
Calculate the perpendicular distance of a point in a segment.
first | The first segment point. |
last | The last segment point. |
pin | The point to be calculated. |
pinter | A intern point calculated based on pin projected intersection with the segment. |
|
static |
Calculate the perpendicular squared distance of a point in a segment.
first | The first segment coordinate. |
last | The last segment coordinate. |
pin | The coordinate to be calculated. |
pinter | A intern coordinate calculated based on pin projected intersection with the segment. |
|
static |
Calculate the perpendicular squared distance of a point in a segment.
first | The first segment point. |
last | The last segment point. |
pin | The point to be calculated. |
pinter | A intern point calculated based on pin projected intersection with the segment. |