MRPT
2.0.1
|
Range specification type, with several uses.
Definition at line 50 of file CAngularObservationMesh.h.
#include <mrpt/opengl/CAngularObservationMesh.h>
Classes | |
union | rd |
Union type with the actual data. More... | |
Public Member Functions | |
TDoubleRange (double a, double b, double c) | |
Constructor from initial value, final value and range. More... | |
TDoubleRange (double a, double b, size_t c) | |
Constructor from initial value, final value and amount of samples. More... | |
TDoubleRange (double a, size_t b, bool c) | |
Constructor from aperture, amount of samples and scan direction. More... | |
double | aperture () const |
Returns the total aperture of the range. More... | |
double | initialValue () const |
Returns the first value of the range. More... | |
double | finalValue () const |
Returns the last value of the range. More... | |
double | increment () const |
Returns the increment between two consecutive values of the range. More... | |
size_t | amount () const |
Returns the total amount of values in this range. More... | |
void | values (std::vector< double > &vals) const |
Gets a vector with every value in the range. More... | |
bool | negToPos () const |
Returns the direction of the scan. More... | |
Static Public Member Functions | |
static TDoubleRange | CreateFromIncrement (double initial, double final, double increment) |
Creates a range of values from the initial value, the final value and the increment. More... | |
static TDoubleRange | CreateFromAmount (double initial, double final, size_t amount) |
Creates a range of values from the initial value, the final value and a desired amount of samples. More... | |
static TDoubleRange | CreateFromAperture (double aperture, size_t amount, bool negToPos=true) |
Creates a zero-centered range of values from an aperture, an amount of samples and a direction. More... | |
Private Attributes | |
char | rangeType |
Range type. More... | |
union mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd | rangeData |
|
inline |
Constructor from initial value, final value and range.
Definition at line 93 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::increment, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, and rangeData.
Referenced by CreateFromAmount(), CreateFromAperture(), and CreateFromIncrement().
|
inline |
Constructor from initial value, final value and amount of samples.
Definition at line 102 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::amount, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode1, and rangeData.
|
inline |
Constructor from aperture, amount of samples and scan direction.
Definition at line 111 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::amount, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::aperture, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::negToPos, and rangeData.
|
inline |
Returns the total amount of values in this range.
std::logic_error | on invalid range type. |
Definition at line 245 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::amount, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::increment, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode1, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, rangeData, rangeType, and mrpt::sign().
Referenced by CreateFromAmount(), CreateFromAperture(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().
|
inline |
Returns the total aperture of the range.
std::logic_error | on invalid range type. |
Definition at line 151 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::aperture, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::increment, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode1, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, rangeData, rangeType, and mrpt::sign().
Referenced by CreateFromAperture(), mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().
|
inlinestatic |
Creates a range of values from the initial value, the final value and a desired amount of samples.
Definition at line 133 of file CAngularObservationMesh.h.
References amount(), and TDoubleRange().
|
inlinestatic |
Creates a zero-centered range of values from an aperture, an amount of samples and a direction.
Definition at line 142 of file CAngularObservationMesh.h.
References amount(), aperture(), negToPos(), and TDoubleRange().
|
inlinestatic |
Creates a range of values from the initial value, the final value and the increment.
std::logic_error | if the increment is zero. |
Definition at line 122 of file CAngularObservationMesh.h.
References increment(), and TDoubleRange().
|
inline |
Returns the last value of the range.
std::logic_error | on invalid range type. |
Definition at line 195 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::aperture, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::increment, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode1, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::negToPos, rangeData, rangeType, and mrpt::sign().
|
inline |
Returns the increment between two consecutive values of the range.
std::logic_error | on invalid range type. |
Definition at line 220 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::amount, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::aperture, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::increment, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode1, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::negToPos, rangeData, and rangeType.
Referenced by CreateFromIncrement().
|
inline |
Returns the first value of the range.
std::logic_error | on invalid range type. |
Definition at line 176 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::aperture, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::negToPos, rangeData, and rangeType.
|
inline |
Returns the direction of the scan.
True if the increment is positive, false otherwise.
std::logic_error | on invalid range type. |
Definition at line 277 of file CAngularObservationMesh.h.
References mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::final, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::increment, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::initial, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode0, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode1, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::mode2, mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd::negToPos, rangeData, rangeType, and mrpt::sign().
Referenced by CreateFromAperture(), mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().
void CAngularObservationMesh::TDoubleRange::values | ( | std::vector< double > & | vals | ) | const |
Gets a vector with every value in the range.
std::logic_error | on invalid range type. |
Definition at line 338 of file CAngularObservationMesh.cpp.
Referenced by mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays(), and mrpt::opengl::CAngularObservationMesh::trace2DSetOfRays().
|
private |
Referenced by amount(), aperture(), finalValue(), increment(), initialValue(), negToPos(), and TDoubleRange().
|
private |
Range type.
If 0, it's specified by an initial and a final value, and an increment. If 1, it's specified by an initial and a final value, and a fixed size of samples. If 2, it's specified by an aperture, a fixed size of samples and a boolean variable controlling direction. This type is always zero-centered.
Definition at line 63 of file CAngularObservationMesh.h.
Referenced by amount(), aperture(), finalValue(), increment(), initialValue(), and negToPos().
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |