Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

BezierCurve.h

Go to the documentation of this file.
00001 
00002 //
00003 //       Title           : BezierCurve.h
00004 //       Project         : OSCAR 2.0
00005 //       Created         : 5/25/04
00006 //       Author          : Peter S. March
00007 //       Platforms       : All
00026 //       Access          : Company Confidential
00027 //       Purpose         :
00028 //
00029 //----------------------------------------------------------------------------
00030 //
00031 //       Classes:
00032 //               <none>
00033 //
00034 //       Global Functions:
00035 //               <none>
00036 //
00037 //       Global Variables:
00038 //               <none>
00039 //
00040 //----------------------------------------------------------------------------
00041 //
00042 //       $Revisions$
00043 //
00044 //
00045 //
00047 #ifndef BezierCurve_hpp
00048 #define BezierCurve_hpp
00049 
00050 #if _MSC_VER >= 1000
00051 #pragma once
00052 #endif // _MSC_VER >= 1000
00053 
00054 
00055 #include <vector>
00056 #include "Math/Vector3.h"
00057 #include "MotionPlanning/MotionPlanErrors.h"
00058 #include "MotionPlanning/Spline.h"
00059 
00060 
00062 namespace OSCAR {
00063 
00073     class BezierCurve : public virtual Spline
00074     {
00075     public:
00084             BezierCurve(double stepsize, OSCARError& err = DUMMY_ERROR(noError));
00085 
00086       BezierCurve(OSCARError& err = DUMMY_ERROR(noError));
00087 
00095             BezierCurve(const BezierCurve& rhs);
00096 
00105             BezierCurve& operator=(const BezierCurve& rhs);
00106 
00111       virtual bool GenerateTrajectory();
00112 
00121       virtual bool GetParameterRange(double& tInitial, double& tFinal);
00122 
00132       virtual bool GetCurvePoint(double t, Vector3& curvePoint);
00133 
00134 
00135       virtual ~BezierCurve(){}
00136 
00137     protected:
00138 
00139       double factorial(unsigned int i);
00140       double binomial(unsigned int n, unsigned int i);
00141       double bezierFunc(int n, int i, double t);
00142     };
00143 
00144 }
00145 #endif
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations