00001 //---------------------------------------------------------------------- 00002 // The Motion Strategy Library (MSL) 00003 //---------------------------------------------------------------------- 00004 // 00005 // Copyright (c) University of Illinois and Steven M. LaValle. 00006 // All Rights Reserved. 00007 // 00008 // Permission to use, copy, and distribute this software and its 00009 // documentation is hereby granted free of charge, provided that 00010 // (1) it is not a component of a commercial product, and 00011 // (2) this notice appears in all copies of the software and 00012 // related documentation. 00013 // 00014 // The University of Illinois and the author make no representations 00015 // about the suitability or fitness of this software for any purpose. 00016 // It is provided "as is" without express or implied warranty. 00017 //---------------------------------------------------------------------- 00018 00019 #include <fstream.h> 00020 #include <math.h> 00021 #include <vector.h> 00022 00023 #include <MSL/vector.h> 00024 #include <MSL/tree.h> 00025 #include <MSL/rrt.h> 00026 #include <MSL/defs.h> 00027 00029 class RRTSlide: public RRTCon { 00030 public: 00031 RRTSlide(Problem *p); 00032 virtual ~RRTSlide() {}; 00033 00034 int RandomTrials; 00035 int NumDirections; 00036 vector<MSLVector> RandomDirections; 00037 00039 virtual MSLVector SelectInput(const MSLVector &x1, const MSLVector &x2, 00040 MSLVector &nx_best, 00041 bool &success, bool forward); 00042 00044 virtual bool Connect(const MSLVector &x, MSLTree *t, MSLNode *&nn, 00045 bool forward); 00046 00047 MSLVector RandomDirection(); 00048 }; 00049 00050 00051 00052 00053 00054