Represents a geometric segment defined by two points enclosed in IntervalVector
s.
More...
#include <codac2_Segment.h>
Represents a geometric segment defined by two points enclosed in IntervalVector
s.
Inherits from std::array<IntervalVector, 2>
.
◆ Segment() [1/2]
◆ Segment() [2/2]
Constructs a Segment
from two IntervalVector
s.
- Parameters
-
x1 | The first endpoint \(\mathbf{x}_1\) of the segment. |
x2 | The second endpoint \(\mathbf{x}_2\) of the segment. |
◆ box()
Computes the bounding box of the segment.
- Returns
- The
IntervalVector
hull box.
◆ intersects()
Checks whether the segment intersects with another segment.
- Parameters
-
- Returns
- A
BoolInterval
indicating possible intersection.
◆ contains()
Checks whether the segment contains a given point.
- Parameters
-
- Returns
- A
BoolInterval
indicating possible containment.
◆ operator==()
bool codac2::Segment::operator== |
( |
const Segment & | p | ) |
const |
Comparison operator.
Equality means that boxes enclosing the endpoints are strictly equal.
- Parameters
-
- Returns
- True if both segments are equal.
The documentation for this class was generated from the following file: