add btFileUtils::toLower to convert a string (char*) to lower case
URDF import demo: add COLLADA .dae file support add FiniteElementMethod demo, extracted from the OpenTissue library (under the zlib license) don't crash if loading an invalid STL file add comparison with Assimp for COLLADA file loading (disabled by default, to avoid library dependency) Gwen: disable some flags that make the build incompatible
This commit is contained in:
@@ -70,8 +70,9 @@ struct b3FileUtils
|
||||
return oriptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void extractPath(const char* fileName, char* path, int maxPathLength)
|
||||
static void extractPath(const char* fileName, char* path, int maxPathLength)
|
||||
{
|
||||
const char* stripped = strip2(fileName, "/");
|
||||
stripped = strip2(stripped, "\\");
|
||||
@@ -97,6 +98,25 @@ struct b3FileUtils
|
||||
}
|
||||
}
|
||||
|
||||
static char toLowerChar(const char t)
|
||||
{
|
||||
if (t>=(char)'A' && t<=(char)'Z')
|
||||
return t + ((char)'a' - (char)'A');
|
||||
else
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
static void toLower(char* str)
|
||||
{
|
||||
int len=strlen(str);
|
||||
for (int i=0;i<len;i++)
|
||||
{
|
||||
str[i] = toLowerChar(str[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*static const char* strip2(const char* name, const char* pattern)
|
||||
{
|
||||
size_t const patlen = strlen(pattern);
|
||||
|
||||
Reference in New Issue
Block a user