00001 //###################################################################### 00002 // 00003 // GraspIt! 00004 // Copyright (C) 2002-2009 Columbia University in the City of New York. 00005 // All rights reserved. 00006 // 00007 // GraspIt! is free software: you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation, either version 3 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // GraspIt! is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with GraspIt!. If not, see <http://www.gnu.org/licenses/>. 00019 // 00020 // Author(s): Matei T. Ciocarlie 00021 // 00022 // $Id: listPlanner.h,v 1.7 2009/07/02 21:06:22 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #ifndef _listplanner_h_ 00027 #define _listplanner_h_ 00028 00029 #include "egPlanner.h" 00030 00031 #include <list> 00032 00033 class GraspPlanningState; 00034 00045 class ListPlanner : public EGPlanner 00046 { 00047 protected: 00050 std::list<GraspPlanningState*> mInputList; 00051 00053 std::list<GraspPlanningState*>::iterator mPlanningIterator; 00054 00056 virtual void resetParameters(); 00057 00059 virtual void mainLoop(); 00060 00062 GraspPlanningState *getState(int index); 00063 public: 00064 ListPlanner(Hand *h); 00065 ~ListPlanner(); 00066 virtual PlannerType getType(){return PLANNER_LIST;} 00067 00069 virtual bool initialized(){return !mInputList.empty();} 00070 00073 void setInput(std::list<GraspPlanningState*> input); 00074 00076 void showVisualMarkers(bool show); 00077 00079 void testState(int index); 00080 00082 void showState(int index); 00083 00085 void prepareState(int index); 00086 }; 00087 00088 #endif