Range specification type, with several uses.
Definition at line 62 of file CAngularObservationMesh.h.
#include <mrpt/opengl/CAngularObservationMesh.h>
Classes | |
| union | rd |
| Union type with the actual data. More... | |
Public Member Functions | |
| double | aperture () const |
| Returns the total aperture of the range. | |
| double | initialValue () const |
| Returns the first value of the range. | |
| double | finalValue () const |
| Returns the last value of the range. | |
| double | increment () const |
| Returns the increment between two consecutive values of the range. | |
| size_t | amount () const |
| Returns the total amount of values in this range. | |
| void | values (std::vector< double > &vals) const |
| Gets a vector with every value in the range. | |
| bool | negToPos () const |
| Returns the direction of the scan. | |
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. | |
| 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. | |
| 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. | |
Private Member Functions | |
| TDoubleRange (double a, double b, double c) | |
| Constructor from initial value, final value and range. | |
| TDoubleRange (double a, double b, size_t c) | |
| Constructor from initial value, final value and amount of samples. | |
| TDoubleRange (double a, size_t b, bool c) | |
| Constructor from aperture, amount of samples and scan direction. | |
Private Attributes | |
| char | rangeType |
| Range type. | |
| union mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd | rangeData |
| mrpt::opengl::CAngularObservationMesh::TDoubleRange::TDoubleRange | ( | double | a, |
| double | b, | ||
| double | c | ||
| ) | [inline, private] |
Constructor from initial value, final value and range.
Definition at line 95 of file CAngularObservationMesh.h.
| mrpt::opengl::CAngularObservationMesh::TDoubleRange::TDoubleRange | ( | double | a, |
| double | b, | ||
| size_t | c | ||
| ) | [inline, private] |
Constructor from initial value, final value and amount of samples.
Definition at line 103 of file CAngularObservationMesh.h.
| mrpt::opengl::CAngularObservationMesh::TDoubleRange::TDoubleRange | ( | double | a, |
| size_t | b, | ||
| bool | c | ||
| ) | [inline, private] |
Constructor from aperture, amount of samples and scan direction.
Definition at line 111 of file CAngularObservationMesh.h.
| size_t mrpt::opengl::CAngularObservationMesh::TDoubleRange::amount | ( | ) | const [inline] |
Returns the total amount of values in this range.
| std::logic_error | on invalid range type. |
Definition at line 189 of file CAngularObservationMesh.h.
References mrpt::utils::sign().
Referenced by mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().
| double mrpt::opengl::CAngularObservationMesh::TDoubleRange::aperture | ( | ) | const [inline] |
Returns the total aperture of the range.
| std::logic_error | on invalid range type. |
Definition at line 141 of file CAngularObservationMesh.h.
References mrpt::utils::sign().
Referenced by mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().
| static TDoubleRange mrpt::opengl::CAngularObservationMesh::TDoubleRange::CreateFromAmount | ( | double | initial, |
| double | final, | ||
| size_t | amount | ||
| ) | [inline, static] |
Creates a range of values from the initial value, the final value and a desired amount of samples.
Definition at line 128 of file CAngularObservationMesh.h.
| static TDoubleRange mrpt::opengl::CAngularObservationMesh::TDoubleRange::CreateFromAperture | ( | double | aperture, |
| size_t | amount, | ||
| bool | negToPos = true |
||
| ) | [inline, static] |
Creates a zero-centered range of values from an aperture, an amount of samples and a direction.
Definition at line 134 of file CAngularObservationMesh.h.
| static TDoubleRange mrpt::opengl::CAngularObservationMesh::TDoubleRange::CreateFromIncrement | ( | double | initial, |
| double | final, | ||
| double | increment | ||
| ) | [inline, static] |
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 121 of file CAngularObservationMesh.h.
| double mrpt::opengl::CAngularObservationMesh::TDoubleRange::finalValue | ( | ) | const [inline] |
Returns the last value of the range.
| std::logic_error | on invalid range type. |
Definition at line 165 of file CAngularObservationMesh.h.
References mrpt::utils::sign().
| double mrpt::opengl::CAngularObservationMesh::TDoubleRange::increment | ( | void | ) | const [inline] |
Returns the increment between two consecutive values of the range.
| std::logic_error | on invalid range type. |
Definition at line 177 of file CAngularObservationMesh.h.
| double mrpt::opengl::CAngularObservationMesh::TDoubleRange::initialValue | ( | ) | const [inline] |
Returns the first value of the range.
| std::logic_error | on invalid range type. |
Definition at line 153 of file CAngularObservationMesh.h.
| bool mrpt::opengl::CAngularObservationMesh::TDoubleRange::negToPos | ( | ) | const [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 206 of file CAngularObservationMesh.h.
References mrpt::utils::sign().
Referenced by mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().
| void mrpt::opengl::CAngularObservationMesh::TDoubleRange::values | ( | std::vector< double > & | vals ) | const |
Gets a vector with every value in the range.
| std::logic_error | on invalid range type. |
Referenced by mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays(), and mrpt::opengl::CAngularObservationMesh::trace2DSetOfRays().
union mrpt::opengl::CAngularObservationMesh::TDoubleRange::rd mrpt::opengl::CAngularObservationMesh::TDoubleRange::rangeData [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 70 of file CAngularObservationMesh.h.
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |