move collada check into urdf model
This commit is contained in:
parent
8a357ce772
commit
9ca784cf95
|
@ -2518,31 +2518,6 @@ namespace urdf{
|
|||
|
||||
};
|
||||
|
||||
bool urdfFromColladaFile(std::string const& daefilename, boost::shared_ptr<ModelInterface> model)
|
||||
{
|
||||
ColladaModelReader reader(model);
|
||||
return reader.InitFromFile(daefilename);
|
||||
}
|
||||
|
||||
bool urdfFromColladaData(std::string const& data, boost::shared_ptr<ModelInterface> model)
|
||||
{
|
||||
ColladaModelReader reader(model);
|
||||
return reader.InitFromData(data);
|
||||
}
|
||||
|
||||
bool IsColladaFile(const std::string& filename)
|
||||
{
|
||||
size_t len = filename.size();
|
||||
if( len < 4 )
|
||||
return false;
|
||||
return filename[len-4] == '.' && ::tolower(filename[len-3]) == 'd' && ::tolower(filename[len-2]) == 'a' && ::tolower(filename[len-1]) == 'e';
|
||||
}
|
||||
|
||||
bool IsColladaData(const std::string& data)
|
||||
{
|
||||
return data.find("<COLLADA") != std::string::npos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,10 @@
|
|||
|
||||
namespace urdf{
|
||||
|
||||
bool IsColladaData(const std::string& data);
|
||||
bool IsColladaData(const std::string& data)
|
||||
{
|
||||
return data.find("<COLLADA") != std::string::npos;
|
||||
}
|
||||
|
||||
|
||||
bool Model::initFile(const std::string& filename)
|
||||
|
|
Loading…
Reference in New Issue