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 #ifndef _BASE_WAYPOINTTRAJECTORYREP_
00026 #define _BASE_WAYPOINTTRAJECTORYREP_
00027
00028 #include <base/TrajectoryTimeRep>
00029 #include <base/WaypointPathRep>
00030 #include <base/Math>
00031
00032
00033 namespace base {
00034
00035
00036
00037 class WaypointTrajectoryRep : public WaypointPathRep, public TrajectoryTimeRep
00038 {
00039 public:
00040 WaypointTrajectoryRep(const array<Point3>& points, const array<Orient>& orients, const array<Time>& times)
00041 : WaypointPathRep(), times(times)
00042 {
00043 this->points = points;
00044 this->orients = orients;
00045 flags = None;
00046
00047 computeSis();
00048 }
00049
00050 virtual Object& clone() const
00051 { return *NewObj WaypointTrajectoryRep(points, orients, times, si, flags); }
00052
00053 virtual String className() const { return String("WaypointTrajectoryRep"); }
00054
00055
00056 virtual Time time(Real s) const;
00057
00058
00059 virtual void shiftTime(const Time& dt);
00060
00061
00062 virtual void scaleTime(Real s);
00063
00064
00065 virtual Real gets(const Time& t) const;
00066
00067 virtual void serialize(Serializer& s);
00068
00069 protected:
00070 WaypointTrajectoryRep() {}
00071 WaypointTrajectoryRep(const array<Point3>& points, const array<Orient>& orients,
00072 const array<Time>& times, array<Real> si, Int flags)
00073 : WaypointPathRep(points,orients,si,flags), times(times) {}
00074
00075 array<Time> times;
00076
00077
00078 virtual void computeSis();
00079
00080 friend class Serializable::SerializableDerivedInstantiator<WaypointTrajectoryRep>;
00081 };
00082
00083
00084 }
00085
00086 #endif