|
maliput
|
Directed, inclusive longitudinal (s value) range from s0 to s1.
#include <include/maliput/api/regions.h>
Public Member Functions | |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (SRange) | |
| SRange ()=default | |
| Default constructor: initializes s0 and s1 to zero. More... | |
| SRange (double s0, double s1) | |
| Constructs range [s0 --> s1]. More... | |
| double | s0 () const |
| Gets s0 value. More... | |
| double | s1 () const |
| Gets s1 value. More... | |
| void | set_s0 (double s0) |
| Sets s0 value. More... | |
| void | set_s1 (double s1) |
| Sets s1 value. More... | |
| double | size () const |
| Computes the size of this SRange (i.e., |s1() - s0()|). More... | |
| bool | WithS () const |
| Defines whether this SRange is in the direction of +s (i.e., s1() > s0()). More... | |
| bool | Intersects (const SRange &s_range, double tolerance) const |
Determines whether this SRange intersects with s_range. More... | |
| bool | Contains (const SRange &s_range, double tolerance) const |
Determines whether this SRange contains s_range. More... | |
| std::optional< SRange > | GetIntersection (const SRange &s_range, double tolerance) const |
Computes a std::optional<SRange> bearing the intersected SRange that results overlapping this SRange with s_range. More... | |
|
default |
Default constructor: initializes s0 and s1 to zero.
Constructs range [s0 --> s1].
| s0 | The start value of the range. It must not be negative. |
| s1 | The end value of the range. It must not be negative. |
| common::assertion_error | When 's0' is negative. |
| common::assertion_error | When 's1' is negative. |
Determines whether this SRange contains s_range.
tolerance will modify this range and s_range by increasing the maximum and reducing the minimum of each range. When tolerance is negative, it shrinks both ranges.
| s_range | The SRange with which to compute the intersection. |
| tolerance | The tolerance to use when computing the inclusion relationship. |
s_range is contained within this SRange. Computes a std::optional<SRange> bearing the intersected SRange that results overlapping this SRange with s_range.
When there is no common area, std::nullopt is returned.
tolerance will modify this range and s_range by increasing the maximum and reducing the minimum of each range. When tolerance is negative, it shrinks both ranges.
| s_range | The SRange to evaluate whether it is included into this SRange. |
| tolerance | The tolerance to use to evaluate the intersection. |
Determines whether this SRange intersects with s_range.
tolerance will modify this range and s_range by increasing the maximum and reducing the minimum of each range. When tolerance is negative, it shrinks both ranges.
| s_range | A SRange to evaluate the intersection with. |
| tolerance | The tolerance to use when computing the intersection. |
s_range intersects this SRange. | MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN | ( | SRange | ) |
| double s0 | ( | ) | const |
Gets s0 value.
| double s1 | ( | ) | const |
Gets s1 value.
| void set_s0 | ( | double | s0 | ) |
Sets s0 value.
| s0 | The start value of the range. It must not be negative. |
| common::assertion_error | When 's0' is negative. |
| void set_s1 | ( | double | s1 | ) |
Sets s1 value.
| s1 | The end value of the range. It must not be negative. |
| common::assertion_error | When 's1' is negative. |
| double size | ( | ) | const |
| bool WithS | ( | ) | const |