Added support for cones and cylinders to NFF (the code to generate these primitives is hosted in StandardShapes.cpp).

Fixed some minor material bugs in NFF.
Added some more test NFF files, refactored and commented the old ones.
Added FromToMatrix function to aiMatrix4x4
Temporarily disabled animation support in SMD and fixed some minor bugs. Static models should load correctly in every case.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@254 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2008-11-28 23:02:27 +00:00
parent 5639220859
commit be864ce4a0
22 changed files with 601 additions and 305 deletions

View File

@@ -54,7 +54,6 @@ namespace Assimp
// @param max Maximum number of characters to be written, including '\0'
// @param number Number to be written
// @return Number of bytes written. Including '\0'.
// ---------------------------------------------------------------------------
inline unsigned int itoa10( char* out, unsigned int max, int32_t number)
{
ai_assert(NULL != out);
@@ -96,7 +95,6 @@ inline unsigned int itoa10( char* out, unsigned int max, int32_t number)
// Secure template overload
// The compiler should choose this function if he is able to determine the
// size of the array automatically.
// ---------------------------------------------------------------------------
template <unsigned int length>
inline unsigned int itoa10( char(& out)[length], int32_t number)
{
@@ -113,13 +111,16 @@ inline unsigned int itoa10( char(& out)[length], int32_t number)
* \param s1 First input string
* \param s2 Second input string
*/
// ---------------------------------------------------------------------------
inline int ASSIMP_stricmp(const char *s1, const char *s2)
{
#if (defined _MSC_VER)
return ::_stricmp(s1,s2);
#elif defined( __GNUC__ )
return ::strcasecmp(s1,s2);
#else
register char c1, c2;
do
@@ -136,7 +137,6 @@ inline int ASSIMP_stricmp(const char *s1, const char *s2)
// ---------------------------------------------------------------------------
/** \brief Case independent comparison of two std::strings
*/
// ---------------------------------------------------------------------------
inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
{
register int i = (int)b.length()-(int)a.length();
@@ -154,13 +154,16 @@ inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
* \param s2 Second input string
* \param n Macimum number of characters to compare
*/
// ---------------------------------------------------------------------------
inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
{
#if (defined _MSC_VER)
return ::_strnicmp(s1,s2,n);
#elif defined( __GNUC__ )
return ::strncasecmp(s1,s2, n);
#else
register char c1, c2;
unsigned int p = 0;
@@ -175,6 +178,18 @@ inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
return c1 - c2;
#endif
}
// ---------------------------------------------------------------------------
// Evaluates an integer power.
inline unsigned int integer_pow (unsigned int base, unsigned int power)
{
unsigned int res = 1;
for (unsigned int i = 0; i < power;++i)
res *= base;
return res;
}
} // end of namespace
#endif // ! AI_STRINGCOMPARISON_H_INC