codac 1.5.6
|
#include <vector>
#include <utility>
#include "codac2_Vector.h"
#include "codac2_BoolInterval.h"
#include "codac2_IntervalVector.h"
Go to the source code of this file.
Classes | |
class | codac2::Segment |
Represents a geometric segment defined by two points enclosed in IntervalVector s. More... | |
Functions | |
IntervalVector | codac2::operator& (const Segment &e1, const Segment &e2) |
Computes the intersection of two segments. | |
IntervalVector | codac2::proj_intersection (const Segment &e1, const Segment &e2) |
Computes the projected intersection of two segments. | |
BoolInterval | codac2::colinear (const Segment &e1, const Segment &e2) |
Checks if two segments are colinear. | |
std::ostream & | codac2::operator<< (std::ostream &str, const Segment &e) |
Stream output operator for Segment . | |
Computes the intersection of two segments.
If the segments do not intersect, an empty IntervalVector
is returned. If the segments are colinear, the set of intersection points is returned as a box.
e1 | The first segment. |
e2 | The second segment. |
IntervalVector
enclosing the intersection point. Computes the projected intersection of two segments.
This corresponds to the intersection of the two lines related to the two segments. Therefore, the intersection point may not belong to the segments.
If the segments are parallel but not colinear, an empty IntervalVector
is returned. If the segments are colinear, the set of intersection points is returned as a box.
e1 | The first segment. |
e2 | The second segment. |
IntervalVector
enclosing the intersection point. Checks if two segments are colinear.
e1 | The first segment. |
e2 | The second segment. |
BoolInterval
indicating possible colinearity. std::ostream & codac2::operator<< | ( | std::ostream & | str, |
const Segment & | e ) |
Stream output operator for Segment
.
str | Output stream. |
e | The segment to print. |