00001 #ifndef Pv_Spline_Included 00002 #define Pv_Spline_Included 00003 00004 #include "pv_point_vector.h" 00005 00006 /*declarations*/ 00007 00008 class Pv_Spline{ 00009 Pv_Point_Vector *my_path; 00010 Pv_Point_Vector *my_control_points; 00011 Pv_Point_Vector *my_spline; 00012 int subdivision_number; 00013 int point_number; 00014 00015 double linear_integral_step; 00016 double distance_look_ahead; 00017 double target_point_look_ahead; 00018 00019 public: 00020 /*constructors*/ 00021 Pv_Spline(); 00022 Pv_Spline(Pv_Point_Vector *the_points); 00023 00024 /*destructor*/ 00025 00026 /*reset*/ 00027 00028 /*equals*/ 00029 00030 /*set*/ 00031 void set_my_path(Pv_Point_Vector *the_points); 00032 void set_my_control_points(Pv_Point_Vector *the_points); 00033 void set_subdivision_number(int nb); 00034 void set_point_number(int nb); 00035 00036 /*get*/ 00037 double get_current_spline_position(double old_spline_position, 00038 Pv_Point current_position); 00039 double get_future_spline_position(double current_spline_position); 00040 int get_subdivision_number(); 00041 00042 /*display*/ 00043 void display(); 00044 00045 /*operators*/; 00046 00047 /*friends*/ 00048 00049 /*miscellaneous*/ 00050 void compute_from_subdivisions(); 00051 void compute_from_equation(); 00052 void subdivise(); 00053 Pv_Point spline(double t); 00054 double max_abscissa(); 00055 00056 }; 00057 00058 /*string operator*/ 00059 00060 /*other operators*/ 00061 00062 #endif
1.2.18