Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00037 #ifndef FCL_CCD_TAYLOR_MODEL_H
00038 #define FCL_CCD_TAYLOR_MODEL_H
00039
00040 #include "fcl/ccd/interval.h"
00041 #include <boost/shared_ptr.hpp>
00042
00043 namespace fcl
00044 {
00045
00046 struct TimeInterval
00047 {
00049 Interval t_;
00050 Interval t2_;
00051 Interval t3_;
00052 Interval t4_;
00053 Interval t5_;
00054 Interval t6_;
00055 };
00056
00060 struct TaylorModel
00061 {
00063 boost::shared_ptr<TimeInterval> time_interval_;
00064
00066 FCL_REAL coeffs_[4];
00067
00069 Interval r_;
00070
00071 void setTimeInterval(FCL_REAL l, FCL_REAL r);
00072 void setTimeInterval(const boost::shared_ptr<TimeInterval> time_interval)
00073 {
00074 time_interval_ = time_interval;
00075 }
00076
00077 TaylorModel();
00078 TaylorModel(const boost::shared_ptr<TimeInterval>& time_interval);
00079 TaylorModel(FCL_REAL coeff, const boost::shared_ptr<TimeInterval>& time_interval);
00080 TaylorModel(FCL_REAL coeffs[3], const Interval& r, const boost::shared_ptr<TimeInterval>& time_interval);
00081 TaylorModel(FCL_REAL c0, FCL_REAL c1, FCL_REAL c2, FCL_REAL c3, const Interval& r, const boost::shared_ptr<TimeInterval>& time_interval);
00082
00083 TaylorModel operator + (const TaylorModel& other) const;
00084 TaylorModel& operator += (const TaylorModel& other);
00085
00086 TaylorModel operator - (const TaylorModel& other) const;
00087 TaylorModel& operator -= (const TaylorModel& other);
00088
00089 TaylorModel operator + (FCL_REAL d) const;
00090 TaylorModel& operator += (FCL_REAL d);
00091
00092 TaylorModel operator * (const TaylorModel& other) const;
00093 TaylorModel operator * (FCL_REAL d) const;
00094 TaylorModel& operator *= (const TaylorModel& other);
00095 TaylorModel& operator *= (FCL_REAL d);
00096
00097 TaylorModel operator - () const;
00098
00099 void print() const;
00100
00101 Interval getBound() const;
00102 Interval getBound(FCL_REAL l, FCL_REAL r) const;
00103
00104 Interval getTightBound() const;
00105 Interval getTightBound(FCL_REAL l, FCL_REAL r) const;
00106
00107 Interval getBound(FCL_REAL t) const;
00108
00109 void setZero();
00110 };
00111
00112 void generateTaylorModelForCosFunc(TaylorModel& tm, FCL_REAL w, FCL_REAL q0);
00113 void generateTaylorModelForSinFunc(TaylorModel& tm, FCL_REAL w, FCL_REAL q0);
00114 void generateTaylorModelForLinearFunc(TaylorModel& tm, FCL_REAL p, FCL_REAL v);
00115
00116 }
00117
00118 #endif