Go to the documentation of this file.00001 
00019 #ifndef URDF2GRASPIT_OUTPUTSTRUCTURE_H
00020 #define URDF2GRASPIT_OUTPUTSTRUCTURE_H
00021 
00022 
00023 #include <string>
00024 #include <vector>
00025 
00026 namespace urdf2graspit
00027 {
00028 
00029 
00035 class OutputStructure
00036 {
00037 public:
00038     
00039     
00040     OutputStructure(const std::string& _meshSubdirName = "iv",
00041                     const std::string& _texSubdirName = "iv/textures",
00042                     const std::string& _contactsFile = "contacts.xml",
00043                     const std::string& _eigengraspFile = "eigen.xml"):
00044         robotName("default_robot_name"),
00045         meshSubdirName(_meshSubdirName),
00046         texSubdirName(_texSubdirName),
00047         contactsFile(_contactsFile),
00048         eigengraspFile(_eigengraspFile) {}
00049 
00050     OutputStructure(const OutputStructure& o):
00051         robotName(o.robotName),
00052         meshSubdirName(o.meshSubdirName),
00053         texSubdirName(o.texSubdirName),
00054         contactsFile(o.contactsFile),
00055         eigengraspFile(o.eigengraspFile) {}
00056 
00057 
00058 
00059     
00060     void getRobotDirPath(std::vector<std::string>& structure) const;
00061 
00062     
00063     void getWorldDirPath(std::vector<std::string>& structure) const;
00064 
00065     
00066     void getEigenGraspDirPath(std::vector<std::string>& structure) const;
00067 
00068     
00069     void getContactsDirPath(std::vector<std::string>& structure) const;
00070 
00071     
00072     void getMeshDirPath(std::vector<std::string>& structure) const;
00073     void getTexDirPath(std::vector<std::string>& structure) const;
00074 
00075     
00076     std::string getRobotDirPath() const;
00077 
00078     
00079     std::string getRobotFilePath() const;
00080 
00081     
00082     std::string getWorldDirPath() const;
00083 
00084     
00085     std::string getWorldFilePath() const;
00086 
00087     
00088     std::string getWorldFileName() const;
00089 
00090     
00091     std::string getEigenGraspDirPath() const;
00092 
00098     std::string getEigenGraspFilePath(const std::string& useName) const;
00099 
00100     
00101     std::string getContactsDirPath() const;
00102 
00108     std::string getContactsFilePath(const std::string& useName) const;
00109 
00110     
00111     
00112     std::string getMeshDirPath() const;
00113 
00114     
00115     
00116     std::string getTexDirPath() const;
00117 
00118     void setRobotName(const std::string& _robotName)
00119     {
00120         robotName = _robotName;
00121     }
00122 
00123     std::string getRobotName() const
00124     {
00125         return robotName;
00126     }
00127 
00128     
00129     std::string getContactsFileRel() const;
00130 
00131     
00132     std::string getEigenGraspFileRel() const;
00133 
00134     
00135     std::string getMeshDirRel() const;
00136 
00137     
00138     std::string getTexDirRel() const;
00139 
00140 private:
00141     
00142     
00143     std::string toStringPath(const std::vector<std::string>& path) const;
00144 
00145     std::string robotName;
00146     std::string meshSubdirName;
00147     std::string texSubdirName;
00148     std::string contactsFile;
00149     std::string eigengraspFile;
00150 };
00151 
00152 
00153 }  
00154 
00155 #endif  // URDF2GRASPIT_OUTPUTSTRUCTURE_H