|
@@ -44,44 +44,44 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/
|
|
|
#pragma once
|
|
|
#ifndef AI_TYPES_H_INC
|
|
|
-#define AI_TYPES_H_INC
|
|
|
+# define AI_TYPES_H_INC
|
|
|
|
|
|
-#ifdef __GNUC__
|
|
|
-# pragma GCC system_header
|
|
|
-#endif
|
|
|
+# ifdef __GNUC__
|
|
|
+# pragma GCC system_header
|
|
|
+# endif
|
|
|
|
|
|
// Some runtime headers
|
|
|
-#include <sys/types.h>
|
|
|
-#include <stddef.h>
|
|
|
-#include <string.h>
|
|
|
-#include <limits.h>
|
|
|
-#include <stdint.h>
|
|
|
+# include <limits.h>
|
|
|
+# include <stddef.h>
|
|
|
+# include <stdint.h>
|
|
|
+# include <string.h>
|
|
|
+# include <sys/types.h>
|
|
|
|
|
|
// Our compile configuration
|
|
|
-#include <assimp/defs.h>
|
|
|
+# include <assimp/defs.h>
|
|
|
|
|
|
// Some types moved to separate header due to size of operators
|
|
|
-#include <assimp/vector3.h>
|
|
|
-#include <assimp/vector2.h>
|
|
|
-#include <assimp/color4.h>
|
|
|
-#include <assimp/matrix3x3.h>
|
|
|
-#include <assimp/matrix4x4.h>
|
|
|
-#include <assimp/quaternion.h>
|
|
|
-
|
|
|
-typedef int32_t ai_int32;
|
|
|
+# include <assimp/color4.h>
|
|
|
+# include <assimp/matrix3x3.h>
|
|
|
+# include <assimp/matrix4x4.h>
|
|
|
+# include <assimp/quaternion.h>
|
|
|
+# include <assimp/vector2.h>
|
|
|
+# include <assimp/vector3.h>
|
|
|
+
|
|
|
+typedef int32_t ai_int32;
|
|
|
typedef uint32_t ai_uint32;
|
|
|
|
|
|
-#ifdef __cplusplus
|
|
|
+# ifdef __cplusplus
|
|
|
|
|
|
-#include <cstring>
|
|
|
-#include <new> // for std::nothrow_t
|
|
|
-#include <string> // for aiString::Set(const std::string&)
|
|
|
+# include <cstring>
|
|
|
+# include <new> // for std::nothrow_t
|
|
|
+# include <string> // for aiString::Set(const std::string&)
|
|
|
|
|
|
-namespace Assimp {
|
|
|
+namespace Assimp {
|
|
|
//! @cond never
|
|
|
-namespace Intern {
|
|
|
- // --------------------------------------------------------------------
|
|
|
- /** @brief Internal helper class to utilize our internal new/delete
|
|
|
+namespace Intern {
|
|
|
+// --------------------------------------------------------------------
|
|
|
+/** @brief Internal helper class to utilize our internal new/delete
|
|
|
* routines for allocating object of this and derived classes.
|
|
|
*
|
|
|
* By doing this you can safely share class objects between Assimp
|
|
@@ -92,66 +92,68 @@ namespace Intern {
|
|
|
* If it lies on a different heap than Assimp is working with,
|
|
|
* the application is determined to crash.
|
|
|
*/
|
|
|
- // --------------------------------------------------------------------
|
|
|
-#ifndef SWIG
|
|
|
- struct ASSIMP_API AllocateFromAssimpHeap {
|
|
|
- // http://www.gotw.ca/publications/mill15.htm
|
|
|
-
|
|
|
- // new/delete overload
|
|
|
- void *operator new ( size_t num_bytes) /* throw( std::bad_alloc ) */;
|
|
|
- void *operator new ( size_t num_bytes, const std::nothrow_t& ) throw();
|
|
|
- void operator delete ( void* data);
|
|
|
-
|
|
|
- // array new/delete overload
|
|
|
- void *operator new[] ( size_t num_bytes) /* throw( std::bad_alloc ) */;
|
|
|
- void *operator new[] ( size_t num_bytes, const std::nothrow_t& ) throw();
|
|
|
- void operator delete[] ( void* data);
|
|
|
-
|
|
|
- }; // struct AllocateFromAssimpHeap
|
|
|
-#endif
|
|
|
+// --------------------------------------------------------------------
|
|
|
+# ifndef SWIG
|
|
|
+struct ASSIMP_API AllocateFromAssimpHeap {
|
|
|
+ // http://www.gotw.ca/publications/mill15.htm
|
|
|
+
|
|
|
+ // new/delete overload
|
|
|
+ void *operator new(size_t num_bytes) /* throw( std::bad_alloc ) */;
|
|
|
+ void *operator new(size_t num_bytes, const std::nothrow_t &) throw();
|
|
|
+ void operator delete(void *data);
|
|
|
+
|
|
|
+ // array new/delete overload
|
|
|
+ void *operator new[](size_t num_bytes) /* throw( std::bad_alloc ) */;
|
|
|
+ void *operator new[](size_t num_bytes, const std::nothrow_t &) throw();
|
|
|
+ void operator delete[](void *data);
|
|
|
+
|
|
|
+}; // struct AllocateFromAssimpHeap
|
|
|
+# endif
|
|
|
} // namespace Intern
|
|
|
- //! @endcond
|
|
|
+//! @endcond
|
|
|
} // namespace Assimp
|
|
|
|
|
|
extern "C" {
|
|
|
-#endif
|
|
|
+# endif
|
|
|
|
|
|
/** Maximum dimension for strings, ASSIMP strings are zero terminated. */
|
|
|
-#ifdef __cplusplus
|
|
|
- static const size_t MAXLEN = 1024;
|
|
|
-#else
|
|
|
-# define MAXLEN 1024
|
|
|
-#endif
|
|
|
+# ifdef __cplusplus
|
|
|
+static const size_t MAXLEN = 1024;
|
|
|
+# else
|
|
|
+# define MAXLEN 1024
|
|
|
+# endif
|
|
|
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Represents a plane in a three-dimensional, euclidean space
|
|
|
*/
|
|
|
struct aiPlane {
|
|
|
-#ifdef __cplusplus
|
|
|
- aiPlane () AI_NO_EXCEPT : a(0.f), b(0.f), c(0.f), d(0.f) {}
|
|
|
- aiPlane (ai_real _a, ai_real _b, ai_real _c, ai_real _d)
|
|
|
- : a(_a), b(_b), c(_c), d(_d) {}
|
|
|
+# ifdef __cplusplus
|
|
|
+ aiPlane() AI_NO_EXCEPT : a(0.f), b(0.f), c(0.f), d(0.f) {}
|
|
|
+ aiPlane(ai_real _a, ai_real _b, ai_real _c, ai_real _d) :
|
|
|
+ a(_a), b(_b), c(_c), d(_d) {}
|
|
|
|
|
|
- aiPlane (const aiPlane& o) : a(o.a), b(o.b), c(o.c), d(o.d) {}
|
|
|
+ aiPlane(const aiPlane &o) :
|
|
|
+ a(o.a), b(o.b), c(o.c), d(o.d) {}
|
|
|
|
|
|
-#endif // !__cplusplus
|
|
|
+# endif // !__cplusplus
|
|
|
|
|
|
//! Plane equation
|
|
|
- ai_real a,b,c,d;
|
|
|
+ ai_real a, b, c, d;
|
|
|
}; // !struct aiPlane
|
|
|
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Represents a ray
|
|
|
*/
|
|
|
struct aiRay {
|
|
|
-#ifdef __cplusplus
|
|
|
- aiRay () AI_NO_EXCEPT {}
|
|
|
- aiRay (const aiVector3D& _pos, const aiVector3D& _dir)
|
|
|
- : pos(_pos), dir(_dir) {}
|
|
|
+# ifdef __cplusplus
|
|
|
+ aiRay() AI_NO_EXCEPT {}
|
|
|
+ aiRay(const aiVector3D &_pos, const aiVector3D &_dir) :
|
|
|
+ pos(_pos), dir(_dir) {}
|
|
|
|
|
|
- aiRay (const aiRay& o) : pos (o.pos), dir (o.dir) {}
|
|
|
+ aiRay(const aiRay &o) :
|
|
|
+ pos(o.pos), dir(o.dir) {}
|
|
|
|
|
|
-#endif // !__cplusplus
|
|
|
+# endif // !__cplusplus
|
|
|
|
|
|
//! Position and direction of the ray
|
|
|
C_STRUCT aiVector3D pos, dir;
|
|
@@ -160,55 +162,55 @@ struct aiRay {
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Represents a color in Red-Green-Blue space.
|
|
|
*/
|
|
|
-struct aiColor3D
|
|
|
-{
|
|
|
-#ifdef __cplusplus
|
|
|
- aiColor3D () AI_NO_EXCEPT : r(0.0f), g(0.0f), b(0.0f) {}
|
|
|
- aiColor3D (ai_real _r, ai_real _g, ai_real _b) : r(_r), g(_g), b(_b) {}
|
|
|
- explicit aiColor3D (ai_real _r) : r(_r), g(_r), b(_r) {}
|
|
|
- aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
|
|
|
-
|
|
|
- aiColor3D &operator=(const aiColor3D &o) {
|
|
|
- r = o.r;
|
|
|
- g = o.g;
|
|
|
- b = o.b;
|
|
|
- return *this;
|
|
|
- }
|
|
|
-
|
|
|
- /** Component-wise comparison */
|
|
|
+struct aiColor3D {
|
|
|
+# ifdef __cplusplus
|
|
|
+ aiColor3D() AI_NO_EXCEPT : r(0.0f), g(0.0f), b(0.0f) {}
|
|
|
+ aiColor3D(ai_real _r, ai_real _g, ai_real _b) :
|
|
|
+ r(_r), g(_g), b(_b) {}
|
|
|
+ explicit aiColor3D(ai_real _r) :
|
|
|
+ r(_r), g(_r), b(_r) {}
|
|
|
+ aiColor3D(const aiColor3D &o) :
|
|
|
+ r(o.r), g(o.g), b(o.b) {}
|
|
|
+
|
|
|
+ aiColor3D &operator=(const aiColor3D &o) {
|
|
|
+ r = o.r;
|
|
|
+ g = o.g;
|
|
|
+ b = o.b;
|
|
|
+ return *this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** Component-wise comparison */
|
|
|
// TODO: add epsilon?
|
|
|
- bool operator == (const aiColor3D& other) const
|
|
|
- {return r == other.r && g == other.g && b == other.b;}
|
|
|
+ bool operator==(const aiColor3D &other) const { return r == other.r && g == other.g && b == other.b; }
|
|
|
|
|
|
/** Component-wise inverse comparison */
|
|
|
// TODO: add epsilon?
|
|
|
- bool operator != (const aiColor3D& other) const
|
|
|
- {return r != other.r || g != other.g || b != other.b;}
|
|
|
+ bool operator!=(const aiColor3D &other) const { return r != other.r || g != other.g || b != other.b; }
|
|
|
|
|
|
/** Component-wise comparison */
|
|
|
// TODO: add epsilon?
|
|
|
- bool operator < (const aiColor3D& other) const {
|
|
|
- return r < other.r || ( r == other.r && (g < other.g || (g == other.g && b < other.b ) ) );
|
|
|
+ bool operator<(const aiColor3D &other) const {
|
|
|
+ return r < other.r || (r == other.r && (g < other.g || (g == other.g && b < other.b)));
|
|
|
}
|
|
|
|
|
|
/** Component-wise addition */
|
|
|
- aiColor3D operator+(const aiColor3D& c) const {
|
|
|
- return aiColor3D(r+c.r,g+c.g,b+c.b);
|
|
|
+ aiColor3D operator+(const aiColor3D &c) const {
|
|
|
+ return aiColor3D(r + c.r, g + c.g, b + c.b);
|
|
|
}
|
|
|
|
|
|
/** Component-wise subtraction */
|
|
|
- aiColor3D operator-(const aiColor3D& c) const {
|
|
|
- return aiColor3D(r-c.r,g-c.g,b-c.b);
|
|
|
+ aiColor3D operator-(const aiColor3D &c) const {
|
|
|
+ return aiColor3D(r - c.r, g - c.g, b - c.b);
|
|
|
}
|
|
|
|
|
|
/** Component-wise multiplication */
|
|
|
- aiColor3D operator*(const aiColor3D& c) const {
|
|
|
- return aiColor3D(r*c.r,g*c.g,b*c.b);
|
|
|
+ aiColor3D operator*(const aiColor3D &c) const {
|
|
|
+ return aiColor3D(r * c.r, g * c.g, b * c.b);
|
|
|
}
|
|
|
|
|
|
/** Multiply with a scalar */
|
|
|
aiColor3D operator*(ai_real f) const {
|
|
|
- return aiColor3D(r*f,g*f,b*f);
|
|
|
+ return aiColor3D(r * f, g * f, b * f);
|
|
|
}
|
|
|
|
|
|
/** Access a specific color component */
|
|
@@ -217,12 +219,12 @@ struct aiColor3D
|
|
|
}
|
|
|
|
|
|
/** Access a specific color component */
|
|
|
- ai_real& operator[](unsigned int i) {
|
|
|
- if ( 0 == i ) {
|
|
|
+ ai_real &operator[](unsigned int i) {
|
|
|
+ if (0 == i) {
|
|
|
return r;
|
|
|
- } else if ( 1 == i ) {
|
|
|
+ } else if (1 == i) {
|
|
|
return g;
|
|
|
- } else if ( 2 == i ) {
|
|
|
+ } else if (2 == i) {
|
|
|
return b;
|
|
|
}
|
|
|
return r;
|
|
@@ -231,14 +233,14 @@ struct aiColor3D
|
|
|
/** Check whether a color is black */
|
|
|
bool IsBlack() const {
|
|
|
static const ai_real epsilon = ai_real(10e-3);
|
|
|
- return std::fabs( r ) < epsilon && std::fabs( g ) < epsilon && std::fabs( b ) < epsilon;
|
|
|
+ return std::fabs(r) < epsilon && std::fabs(g) < epsilon && std::fabs(b) < epsilon;
|
|
|
}
|
|
|
|
|
|
-#endif // !__cplusplus
|
|
|
+# endif // !__cplusplus
|
|
|
|
|
|
//! Red, green and blue color values
|
|
|
ai_real r, g, b;
|
|
|
-}; // !struct aiColor3D
|
|
|
+}; // !struct aiColor3D
|
|
|
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Represents an UTF-8 string, zero byte terminated.
|
|
@@ -261,99 +263,95 @@ struct aiColor3D
|
|
|
* (binary) length of such a string is limited to MAXLEN characters (including the
|
|
|
* the terminating zero).
|
|
|
*/
|
|
|
-struct aiString
|
|
|
-{
|
|
|
-#ifdef __cplusplus
|
|
|
+struct aiString {
|
|
|
+# ifdef __cplusplus
|
|
|
/** Default constructor, the string is set to have zero length */
|
|
|
aiString() AI_NO_EXCEPT
|
|
|
- : length( 0 ) {
|
|
|
+ : length(0) {
|
|
|
data[0] = '\0';
|
|
|
|
|
|
-#ifdef ASSIMP_BUILD_DEBUG
|
|
|
+# ifdef ASSIMP_BUILD_DEBUG
|
|
|
// Debug build: overwrite the string on its full length with ESC (27)
|
|
|
- memset(data+1,27,MAXLEN-1);
|
|
|
-#endif
|
|
|
+ memset(data + 1, 27, MAXLEN - 1);
|
|
|
+# endif
|
|
|
}
|
|
|
|
|
|
/** Copy constructor */
|
|
|
- aiString(const aiString& rOther)
|
|
|
- : length(rOther.length)
|
|
|
- {
|
|
|
+ aiString(const aiString &rOther) :
|
|
|
+ length(rOther.length) {
|
|
|
// Crop the string to the maximum length
|
|
|
- length = length>=MAXLEN?MAXLEN-1:length;
|
|
|
- memcpy( data, rOther.data, length);
|
|
|
+ length = length >= MAXLEN ? MAXLEN - 1 : length;
|
|
|
+ memcpy(data, rOther.data, length);
|
|
|
data[length] = '\0';
|
|
|
}
|
|
|
|
|
|
/** Constructor from std::string */
|
|
|
- explicit aiString(const std::string& pString) :
|
|
|
- length( (ai_uint32) pString.length())
|
|
|
- {
|
|
|
- length = length>=MAXLEN?MAXLEN-1:length;
|
|
|
- memcpy( data, pString.c_str(), length);
|
|
|
+ explicit aiString(const std::string &pString) :
|
|
|
+ length((ai_uint32)pString.length()) {
|
|
|
+ length = length >= MAXLEN ? MAXLEN - 1 : length;
|
|
|
+ memcpy(data, pString.c_str(), length);
|
|
|
data[length] = '\0';
|
|
|
}
|
|
|
|
|
|
/** Copy a std::string to the aiString */
|
|
|
- void Set( const std::string& pString) {
|
|
|
- if( pString.length() > MAXLEN - 1) {
|
|
|
+ void Set(const std::string &pString) {
|
|
|
+ if (pString.length() > MAXLEN - 1) {
|
|
|
return;
|
|
|
}
|
|
|
length = (ai_uint32)pString.length();
|
|
|
- memcpy( data, pString.c_str(), length);
|
|
|
+ memcpy(data, pString.c_str(), length);
|
|
|
data[length] = 0;
|
|
|
}
|
|
|
|
|
|
/** Copy a const char* to the aiString */
|
|
|
- void Set( const char* sz) {
|
|
|
- const ai_int32 len = (ai_uint32) ::strlen(sz);
|
|
|
- if( len > (ai_int32)MAXLEN - 1) {
|
|
|
+ void Set(const char *sz) {
|
|
|
+ const ai_int32 len = (ai_uint32)::strlen(sz);
|
|
|
+ if (len > (ai_int32)MAXLEN - 1) {
|
|
|
return;
|
|
|
}
|
|
|
length = len;
|
|
|
- memcpy( data, sz, len);
|
|
|
+ memcpy(data, sz, len);
|
|
|
data[len] = 0;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/** Assignment operator */
|
|
|
- aiString& operator = (const aiString &rOther) {
|
|
|
+ aiString &operator=(const aiString &rOther) {
|
|
|
if (this == &rOther) {
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- length = rOther.length;;
|
|
|
- memcpy( data, rOther.data, length);
|
|
|
+ length = rOther.length;
|
|
|
+ ;
|
|
|
+ memcpy(data, rOther.data, length);
|
|
|
data[length] = '\0';
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/** Assign a const char* to the string */
|
|
|
- aiString& operator = (const char* sz) {
|
|
|
+ aiString &operator=(const char *sz) {
|
|
|
Set(sz);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
/** Assign a cstd::string to the string */
|
|
|
- aiString& operator = ( const std::string& pString) {
|
|
|
+ aiString &operator=(const std::string &pString) {
|
|
|
Set(pString);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
/** Comparison operator */
|
|
|
- bool operator==(const aiString& other) const {
|
|
|
- return (length == other.length && 0 == memcmp(data,other.data,length));
|
|
|
+ bool operator==(const aiString &other) const {
|
|
|
+ return (length == other.length && 0 == memcmp(data, other.data, length));
|
|
|
}
|
|
|
|
|
|
/** Inverse comparison operator */
|
|
|
- bool operator!=(const aiString& other) const {
|
|
|
- return (length != other.length || 0 != memcmp(data,other.data,length));
|
|
|
+ bool operator!=(const aiString &other) const {
|
|
|
+ return (length != other.length || 0 != memcmp(data, other.data, length));
|
|
|
}
|
|
|
|
|
|
/** Append a string to the string */
|
|
|
- void Append (const char* app) {
|
|
|
- const ai_uint32 len = (ai_uint32) ::strlen(app);
|
|
|
+ void Append(const char *app) {
|
|
|
+ const ai_uint32 len = (ai_uint32)::strlen(app);
|
|
|
if (!len) {
|
|
|
return;
|
|
|
}
|
|
@@ -361,27 +359,27 @@ struct aiString
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- memcpy(&data[length],app,len+1);
|
|
|
+ memcpy(&data[length], app, len + 1);
|
|
|
length += len;
|
|
|
}
|
|
|
|
|
|
/** Clear the string - reset its length to zero */
|
|
|
- void Clear () {
|
|
|
- length = 0;
|
|
|
+ void Clear() {
|
|
|
+ length = 0;
|
|
|
data[0] = '\0';
|
|
|
|
|
|
-#ifdef ASSIMP_BUILD_DEBUG
|
|
|
+# ifdef ASSIMP_BUILD_DEBUG
|
|
|
// Debug build: overwrite the string on its full length with ESC (27)
|
|
|
- memset(data+1,27,MAXLEN-1);
|
|
|
-#endif
|
|
|
+ memset(data + 1, 27, MAXLEN - 1);
|
|
|
+# endif
|
|
|
}
|
|
|
|
|
|
/** Returns a pointer to the underlying zero-terminated array of characters */
|
|
|
- const char* C_Str() const {
|
|
|
+ const char *C_Str() const {
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
-#endif // !__cplusplus
|
|
|
+# endif // !__cplusplus
|
|
|
|
|
|
/** Binary length of the string excluding the terminal 0. This is NOT the
|
|
|
* logical length of strings containing UTF-8 multi-byte sequences! It's
|
|
@@ -390,15 +388,13 @@ struct aiString
|
|
|
|
|
|
/** String buffer. Size limit is MAXLEN */
|
|
|
char data[MAXLEN];
|
|
|
-} ; // !struct aiString
|
|
|
-
|
|
|
+}; // !struct aiString
|
|
|
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Standard return type for some library functions.
|
|
|
* Rarely used, and if, mostly in the C API.
|
|
|
*/
|
|
|
-typedef enum aiReturn
|
|
|
-{
|
|
|
+typedef enum aiReturn {
|
|
|
/** Indicates that a function was successful */
|
|
|
aiReturn_SUCCESS = 0x0,
|
|
|
|
|
@@ -416,19 +412,18 @@ typedef enum aiReturn
|
|
|
_AI_ENFORCE_ENUM_SIZE = 0x7fffffff
|
|
|
|
|
|
/// @endcond
|
|
|
-} aiReturn; // !enum aiReturn
|
|
|
+} aiReturn; // !enum aiReturn
|
|
|
|
|
|
// just for backwards compatibility, don't use these constants anymore
|
|
|
-#define AI_SUCCESS aiReturn_SUCCESS
|
|
|
-#define AI_FAILURE aiReturn_FAILURE
|
|
|
-#define AI_OUTOFMEMORY aiReturn_OUTOFMEMORY
|
|
|
+# define AI_SUCCESS aiReturn_SUCCESS
|
|
|
+# define AI_FAILURE aiReturn_FAILURE
|
|
|
+# define AI_OUTOFMEMORY aiReturn_OUTOFMEMORY
|
|
|
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Seek origins (for the virtual file system API).
|
|
|
* Much cooler than using SEEK_SET, SEEK_CUR or SEEK_END.
|
|
|
*/
|
|
|
-enum aiOrigin
|
|
|
-{
|
|
|
+enum aiOrigin {
|
|
|
/** Beginning of the file */
|
|
|
aiOrigin_SET = 0x0,
|
|
|
|
|
@@ -451,8 +446,7 @@ enum aiOrigin
|
|
|
* Logging to these streams can be enabled with a single call to
|
|
|
* #LogStream::createDefaultStream.
|
|
|
*/
|
|
|
-enum aiDefaultLogStream
|
|
|
-{
|
|
|
+enum aiDefaultLogStream {
|
|
|
/** Stream the log to a file */
|
|
|
aiDefaultLogStream_FILE = 0x1,
|
|
|
|
|
@@ -475,33 +469,31 @@ enum aiDefaultLogStream
|
|
|
}; // !enum aiDefaultLogStream
|
|
|
|
|
|
// just for backwards compatibility, don't use these constants anymore
|
|
|
-#define DLS_FILE aiDefaultLogStream_FILE
|
|
|
-#define DLS_STDOUT aiDefaultLogStream_STDOUT
|
|
|
-#define DLS_STDERR aiDefaultLogStream_STDERR
|
|
|
-#define DLS_DEBUGGER aiDefaultLogStream_DEBUGGER
|
|
|
+# define DLS_FILE aiDefaultLogStream_FILE
|
|
|
+# define DLS_STDOUT aiDefaultLogStream_STDOUT
|
|
|
+# define DLS_STDERR aiDefaultLogStream_STDERR
|
|
|
+# define DLS_DEBUGGER aiDefaultLogStream_DEBUGGER
|
|
|
|
|
|
// ----------------------------------------------------------------------------------
|
|
|
/** Stores the memory requirements for different components (e.g. meshes, materials,
|
|
|
* animations) of an import. All sizes are in bytes.
|
|
|
* @see Importer::GetMemoryRequirements()
|
|
|
*/
|
|
|
-struct aiMemoryInfo
|
|
|
-{
|
|
|
-#ifdef __cplusplus
|
|
|
+struct aiMemoryInfo {
|
|
|
+# ifdef __cplusplus
|
|
|
|
|
|
/** Default constructor */
|
|
|
aiMemoryInfo() AI_NO_EXCEPT
|
|
|
- : textures (0)
|
|
|
- , materials (0)
|
|
|
- , meshes (0)
|
|
|
- , nodes (0)
|
|
|
- , animations (0)
|
|
|
- , cameras (0)
|
|
|
- , lights (0)
|
|
|
- , total (0)
|
|
|
- {}
|
|
|
-
|
|
|
-#endif
|
|
|
+ : textures(0),
|
|
|
+ materials(0),
|
|
|
+ meshes(0),
|
|
|
+ nodes(0),
|
|
|
+ animations(0),
|
|
|
+ cameras(0),
|
|
|
+ lights(0),
|
|
|
+ total(0) {}
|
|
|
+
|
|
|
+# endif
|
|
|
|
|
|
/** Storage allocated for texture data */
|
|
|
unsigned int textures;
|
|
@@ -528,16 +520,16 @@ struct aiMemoryInfo
|
|
|
unsigned int total;
|
|
|
}; // !struct aiMemoryInfo
|
|
|
|
|
|
-#ifdef __cplusplus
|
|
|
+# ifdef __cplusplus
|
|
|
}
|
|
|
-#endif //! __cplusplus
|
|
|
+# endif //! __cplusplus
|
|
|
|
|
|
// Include implementation files
|
|
|
-#include "vector2.inl"
|
|
|
-#include "vector3.inl"
|
|
|
-#include "color4.inl"
|
|
|
-#include "quaternion.inl"
|
|
|
-#include "matrix3x3.inl"
|
|
|
-#include "matrix4x4.inl"
|
|
|
+# include "color4.inl"
|
|
|
+# include "matrix3x3.inl"
|
|
|
+# include "matrix4x4.inl"
|
|
|
+# include "quaternion.inl"
|
|
|
+# include "vector2.inl"
|
|
|
+# include "vector3.inl"
|
|
|
|
|
|
#endif // AI_TYPES_H_INC
|