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:
erwin coumans
2014-10-29 13:18:34 -07:00
parent aaaf8dc4e2
commit 4b665fa82b
139 changed files with 17704 additions and 46 deletions

View File

@@ -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);