Represents a geometric segment defined by two points enclosed in IntervalVector
s.
More...
#include <codac2_Segment.h>
|
| Segment (const std::array< IntervalVector, 2 > &x) |
| Constructs a Segment from an array of two IntervalVector s.
|
|
| Segment (const IntervalVector &x1, const IntervalVector &x2) |
| Constructs a Segment from two IntervalVector s.
|
|
IntervalVector | box () const |
| Computes the bounding box of the segment.
|
|
BoolInterval | intersects (const Segment &e) const |
| Checks whether the segment intersects with another segment.
|
|
BoolInterval | contains (const IntervalVector &p) const |
| Checks whether the segment contains a given point.
|
|
bool | operator== (const Segment &p) const |
| Comparison operator.
|
|
Represents a geometric segment defined by two points enclosed in IntervalVector
s.
Inherits from std::array<IntervalVector, 2>
.
◆ Segment() [1/2]
codac2::Segment::Segment |
( |
const std::array< IntervalVector, 2 > & | x | ) |
|
Constructs a Segment
from an array of two IntervalVector
s.
- Parameters
-
x | An array of two IntervalVector s enclosing the segment endpoints. |
◆ Segment() [2/2]
codac2::Segment::Segment |
( |
const IntervalVector & | x1, |
|
|
const IntervalVector & | x2 ) |
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()
IntervalVector codac2::Segment::box |
( |
| ) |
const |
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()
BoolInterval codac2::Segment::contains |
( |
const IntervalVector & | p | ) |
const |
Checks whether the segment contains a given point.
- Parameters
-
p | The point to check, enclosed in a IntervalVector . |
- 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: