last update 20 Sep 2009 |
Modules | |
Geometry Data Structures | |
Functions | |
template<class T > | |
bool | cvr::intersection (const point< T > &p1, const point< T > &p2, const point< T > &p3, const point< T > &p4, point< T > &p) |
template<class T > | |
bool | cvr::intersection (const point< T > &p1, const point< T > &p2, const point< T > &p3, const point< T > &p4) |
template<class T > | |
T | cvr::minDistanceSqr (const point< T > &p1, const point< T > &p2, const point< T > &p3, point< T > &p) |
template<class T > | |
T | cvr::minDistanceSqr (const point< T > &p1, const point< T > &p2, const point< T > &p3) |
template<class T > | |
T | cvr::minDistanceSqr (const point< T > &p1, const point< T > &p2, const point< T > &p3, const point< T > &p4, point< T > &pa, point< T > &pb) |
template<class T > | |
int | cvr::clockwiseTurn (const point< T > &p0, const point< T > &p1, const point< T > &p2) |
int cvr::clockwiseTurn | ( | const point< T > & | p0, | |
const point< T > & | p1, | |||
const point< T > & | p2 | |||
) | [inline] |
Turn orientation in a three-point path.
Compute if the path that follows the points p0, p1 and p2 makes a clock-wise turn (+1) a counter-clock-wise turn (-1) or stays in a straight line (0).
bool cvr::intersection | ( | const point< T > & | p1, | |
const point< T > & | p2, | |||
const point< T > & | p3, | |||
const point< T > & | p4 | |||
) | [inline] |
Line intersection.
Compute if the line between p1 and p2 intersects with the line between p3 and p4. If they intersect in exactly one point (normal case) the function returns true. If the lines are parallel or any of the lines have length 0 this function returns false.
References cvr::intersection().
bool cvr::intersection | ( | const point< T > & | p1, | |
const point< T > & | p2, | |||
const point< T > & | p3, | |||
const point< T > & | p4, | |||
point< T > & | p | |||
) | [inline] |
Line intersection.
Compute if the line between p1 and p2 intersects with the line between p3 and p4. If they intersect in exactly one point (normal case) the function returns true. If the lines are parallel or any of the lines have length 0 this function returns false.
p1 | begin of first line | |
p2 | end of first line | |
p3 | begin of first line | |
p4 | end of first line | |
p | intersection point will be written here, in case there is one. if there is no intersection point (or infinity) the value will not change. |
Referenced by cvr::intersection().
T cvr::minDistanceSqr | ( | const point< T > & | p1, | |
const point< T > & | p2, | |||
const point< T > & | p3, | |||
const point< T > & | p4, | |||
point< T > & | pa, | |||
point< T > & | pb | |||
) | [inline] |
Distance between two line segments.
Compute the square of the minimal distance between the line segment defined by the points p1 and p2 and the line segment defined by the points p3 and p4. The corresponding points with the minimal distance will be stored in pa (in p1-p2) and pb (in p3-p4).
p1 | start point of the first line segment | |
p2 | end point of the first line segment | |
p3 | start point of the second line segment | |
p4 | end point of the second line segment | |
pa | point in the line p1-p2 with the minimal distance to the line segment p3-p4. | |
pb | point in the line p3-p4 with the minimal distance to the line segment p1-p2. |
T cvr::minDistanceSqr | ( | const point< T > & | p1, | |
const point< T > & | p2, | |||
const point< T > & | p3 | |||
) | [inline] |
Distance between line segment and point.
Compute the square of the minimal distance between the line segment defined by the points p1 and p2 and the point p3. The point within the line with the minimal distance will be stored in p.
p1 | start point of the line segment | |
p2 | end point of the line segment | |
p3 | point, for which the distance to the line segment will be computed. |
References cvr::minDistanceSqr().
T cvr::minDistanceSqr | ( | const point< T > & | p1, | |
const point< T > & | p2, | |||
const point< T > & | p3, | |||
point< T > & | p | |||
) | [inline] |
Distance between line segment and point.
Compute the square of the minimal distance between the line segment defined by the points p1 and p2 and the point p3. The point within the line with the minimal distance will be stored in p.
p1 | start point of the line segment | |
p2 | end point of the line segment | |
p3 | point, for which the distance to the line segment will be computed. | |
p | the point in the line between p1 and p2 with the shortest distance will be stored here. |
Referenced by cvr::minDistanceSqr().