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 |
Returns the size of this SRange (i.e., |s1() - s0()|). More... | |
bool | WithS () const |
Returns 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... | |
std::optional< SRange > | GetIntersection (const SRange &s_range, double tolerance) const |
Returns 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].
common::assertion_error | When 's0' is negative. |
common::assertion_error | When 's1' is negative. |
Returns 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 tolerance and reducing the minimum each range. When tolerance
is negative, it shrinks both ranges.
Determines whether this SRange intersects with s_range
.
tolerance
will modify this range and s_range
by increasing the maximum tolerance and reducing the minimum each range. When tolerance
is negative, it shrinks both ranges.
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.
common::assertion_error | When 's0' is negative. |
void set_s1 | ( | double | s1 | ) |
Sets s1 value.
common::assertion_error | When 's1' is negative. |