Biorbd Release_1.13.0
Loading...
Searching...
No Matches
Range.h
1#ifndef BIORBD_UTILS_RANGE_H
2#define BIORBD_UTILS_RANGE_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7
8namespace BIORBD_NAMESPACE {
9namespace utils {
10
14class BIORBD_API Range {
15 public:
21 Range(double min = -M_PI, double max = M_PI);
22
27 Range DeepCopy() const;
28
33 void DeepCopy(const Range& other);
34
39 void setMin(double min);
40
45 double min() const;
46
51 void setMax(double max);
52
57 double max() const;
58
59 protected:
60 std::shared_ptr<double> m_min;
61 std::shared_ptr<double> m_max;
62};
63
64} // namespace utils
65} // namespace BIORBD_NAMESPACE
66
67#endif // BIORBD_UTILS_RANGE_H
double max() const
Return the maximum value.
Definition Range.cpp:27
void setMin(double min)
Set a new value for the minimum.
Definition Range.cpp:21
std::shared_ptr< double > m_min
The minimal value allowed by the range.
Definition Range.h:60
Range(double min=-M_PI, double max=M_PI)
Construct generalized coordinates range.
Definition Range.cpp:6
std::shared_ptr< double > m_max
The maximal value allowed by the range.
Definition Range.h:61
Range DeepCopy() const
Deep copy of the Range.
Definition Range.cpp:10
double min() const
Return the minimum value.
Definition Range.cpp:23
void setMax(double max)
Set a new value for the maximal.
Definition Range.cpp:25