16 #ifndef SURGSIM_MATH_LINEARMOTIONARITHMETIC_H 17 #define SURGSIM_MATH_LINEARMOTIONARITHMETIC_H 24 #include "SurgSim/Math/IntervalArithmetic.h" 25 #include "SurgSim/Math/PolynomialValues.h" 132 T
atTime(
const T& t)
const;
155 template <
class T,
int N>
158 static_assert(N > 0,
"LinearMotion must have dimensionality > 0.");
179 LinearMotionND(
const std::array<T, N>& a,
const std::array<T, N>& b);
238 void getStart(std::array<T, N>* start)
const;
241 void getEnd(std::array<T, N>* end)
const;
251 std::array<LinearMotion<T>, N> m_motion;
288 LinearMotionND(
const std::array<T, 3>& start,
const std::array<T, 3>& end);
364 void getStart(std::array<T, 3>* start)
const;
367 void getEnd(std::array<T, 3>* end)
const;
377 Vector3
atTime(
const T& t)
const;
387 std::array<LinearMotion<T>, 3> m_motion;
397 template <
typename T>
398 std::ostream& operator<<(std::ostream& o, const LinearMotion<T>& motion);
408 template <
typename T,
int N>
409 std::ostream& operator<<(std::ostream& o, const LinearMotionND<T, N>& motion);
427 template <
class T,
int A>
497 #include "SurgSim/Math/LinearMotionArithmetic-inl.h" 499 #endif // SURGSIM_MATH_LINEARMOTIONARITHMETIC_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
bool isApprox(const LinearMotion< T > &i, const T &epsilon) const
Definition: LinearMotionArithmetic-inl.h:74
T getEnd() const
Definition: LinearMotionArithmetic-inl.h:138
IntervalND<T,3> defines the concept of a group of mathematical intervals specialized to 3 intervals a...
Definition: IntervalArithmetic.h:307
LinearMotionND<T, 3> specializes the LinearMotionND<T, N> class for 3 dimensions. ...
Definition: LinearMotionArithmetic.h:258
Polynomial<T, 3> specializes the Polynomial class for degree 3 (cubic polynomials) ...
Definition: Polynomial.h:255
IntervalND defines the concept of a group of mathematical intervals and provides operations on them i...
Definition: IntervalArithmetic.h:199
LinearMotion< T > firstHalf() const
Definition: LinearMotionArithmetic-inl.h:150
Polynomial<T, 2> specializes the Polynomial class for degree 2 (quadratic polynomials) ...
Definition: Polynomial.h:183
LinearMotion< T > secondHalf() const
Definition: LinearMotionArithmetic-inl.h:156
T getStart() const
Definition: LinearMotionArithmetic-inl.h:132
bool containsZero() const
Definition: LinearMotionArithmetic-inl.h:68
Definitions of small fixed-size vector types.
Interval< T > operator/(const LinearMotion< T > &m) const
Standard arithmetic operators extended to interval groups.
Definition: LinearMotionArithmetic-inl.h:126
LinearMotion< T > & operator=(const LinearMotion< T > &m)
Assignment operator.
Definition: LinearMotionArithmetic-inl.h:40
Eigen::Matrix< T, 3, 1 > Vector3
Typedef for a vector 3 return.
Definition: LinearMotionArithmetic.h:262
bool operator!=(const LinearMotion< T > &m) const
Definition: LinearMotionArithmetic-inl.h:86
LinearMotion()
Constructor.
Definition: LinearMotionArithmetic-inl.h:25
Interval defines the concept of a mathematical interval and provides operations on it including arith...
Definition: IntervalArithmetic.h:34
Interval< T > operator*(const LinearMotion< T > &m) const
Standard arithmetic operators extended to interval groups.
Definition: LinearMotionArithmetic-inl.h:120
LinearMotion< T > operator+(const LinearMotion< T > &m) const
Definition: LinearMotionArithmetic-inl.h:92
Interval< T > toInterval() const
Convert from LinearMotion to an Interval.
Definition: LinearMotionArithmetic-inl.h:56
LinearMotionND<T, N> defines the concept of a group of linear motions and provides operations on them...
Definition: LinearMotionArithmetic.h:156
Polynomial< T, 1 > toPolynomial() const
Returns a linear expression (degree-1 polynomial) whose value for t=0..1 progresses from `start' to `...
Definition: LinearMotionArithmetic-inl.h:62
Polynomial<T, 1> specializes the Polynomial class for degree 1 (linear polynomials) ...
Definition: Polynomial.h:117
T atTime(const T &t) const
Definition: LinearMotionArithmetic-inl.h:144
bool operator==(const LinearMotion< T > &m) const
Definition: LinearMotionArithmetic-inl.h:80
LinearMotion is (intentionally) a lot like Interval, but it deals with linear motion where all operan...
Definition: LinearMotionArithmetic.h:50