45 #ifndef AI_TYPES_H_INC 46 #define AI_TYPES_H_INC 49 #include <sys/types.h> 89 struct ASSIMP_API AllocateFromAssimpHeap {
93 void *
operator new (
size_t num_bytes) ;
94 void *
operator new (
size_t num_bytes,
const std::nothrow_t& )
throw();
95 void operator delete (
void* data);
98 void *
operator new[] (
size_t num_bytes) ;
99 void *
operator new[] (
size_t num_bytes,
const std::nothrow_t& )
throw();
100 void operator delete[] (
void* data);
113 const size_t MAXLEN = 1024;
118 #include "./Compiler/pushpack1.h" 126 aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {}
127 aiPlane (
float _a,
float _b,
float _c,
float _d)
128 : a(_a), b(_b), c(_c), d(_d) {}
132 #endif // !__cplusplus 146 : pos(_pos), dir(_dir) {}
150 #endif // !__cplusplus 162 aiColor3D () : r(0.0f), g(0.0f), b(0.0f) {}
163 aiColor3D (
float _r,
float _g,
float _b) : r(_r), g(_g), b(_b) {}
164 aiColor3D (
float _r) : r(_r), g(_r), b(_r) {}
169 bool operator == (
const aiColor3D& other)
const 170 {
return r == other.
r && g == other.g && b == other.b;}
174 bool operator != (
const aiColor3D& other)
const 175 {
return r != other.
r || g != other.g || b != other.b;}
179 bool operator < (
const aiColor3D& other)
const {
180 return r < other.
r || (
181 r == other.
r && (g < other.g ||
182 (g == other.g && b < other.b)
208 float operator[](
unsigned int i)
const {
213 float& operator[](
unsigned int i) {
218 bool IsBlack()
const {
219 static const float epsilon = 10e-3f;
220 return fabs( r ) < epsilon && fabs( g ) < epsilon && fabs( b ) < epsilon;
223 #endif // !__cplusplus 228 #include "./Compiler/poppack1.h" 260 #ifdef ASSIMP_BUILD_DEBUG 262 memset(data+1,27,MAXLEN-1);
271 length = length>=MAXLEN?MAXLEN-1:length;
272 memcpy( data, rOther.
data, length);
277 explicit aiString(
const std::string& pString) :
278 length(pString.length())
280 length = length>=MAXLEN?MAXLEN-1:length;
281 memcpy( data, pString.c_str(), length);
286 void Set(
const std::string& pString) {
287 if( pString.length() > MAXLEN - 1) {
290 length = pString.length();
291 memcpy( data, pString.c_str(), length);
296 void Set(
const char* sz) {
297 const size_t len = ::strlen(sz);
298 if( len > MAXLEN - 1) {
302 memcpy( data, sz, len);
307 aiString& operator = (
const char* sz) {
313 aiString& operator = (
const std::string& pString) {
319 bool operator==(
const aiString& other)
const {
320 return (length == other.
length && 0 == memcmp(data,other.
data,length));
324 bool operator!=(
const aiString& other)
const {
325 return (length != other.
length || 0 != memcmp(data,other.
data,length));
329 void Append (
const char* app) {
330 const size_t len = ::strlen(app);
334 if (length + len >= MAXLEN) {
338 memcpy(&data[length],app,len+1);
347 #ifdef ASSIMP_BUILD_DEBUG 349 memset(data+1,27,MAXLEN-1);
354 const char* C_Str()
const {
358 #endif // !__cplusplus 374 typedef enum aiReturn
377 aiReturn_SUCCESS = 0x0,
380 aiReturn_FAILURE = -0x1,
385 aiReturn_OUTOFMEMORY = -0x3,
390 _AI_ENFORCE_ENUM_SIZE = 0x7fffffff
394 #define AI_SUCCESS aiReturn_SUCCESS 395 #define AI_FAILURE aiReturn_FAILURE 396 #define AI_OUTOFMEMORY aiReturn_OUTOFMEMORY 416 _AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff
425 enum aiDefaultLogStream
428 aiDefaultLogStream_FILE = 0x1,
431 aiDefaultLogStream_STDOUT = 0x2,
434 aiDefaultLogStream_STDERR = 0x4,
439 aiDefaultLogStream_DEBUGGER = 0x8,
444 _AI_DLS_ENFORCE_ENUM_SIZE = 0x7fffffff
448 #define DLS_FILE aiDefaultLogStream_FILE 449 #define DLS_STDOUT aiDefaultLogStream_STDOUT 450 #define DLS_STDERR aiDefaultLogStream_STDERR 451 #define DLS_DEBUGGER aiDefaultLogStream_DEBUGGER 477 unsigned int textures;
480 unsigned int materials;
489 unsigned int animations;
492 unsigned int cameras;
506 #include "vector2.inl" 507 #include "vector3.inl" 508 #include "color4.inl" 509 #include "quaternion.inl" 510 #include "matrix3x3.inl" 511 #include "matrix4x4.inl" float a
Plane equation.
Definition: types.h:135
Assimp's CPP-API and all internal APIs.
Definition: DefaultLogger.hpp:51
Represents a plane in a three-dimensional, euclidean space.
Definition: types.h:123
Definition of a 3x3 matrix, including operators when compiling in C++.
Represents a ray.
Definition: types.h:141
C_STRUCT aiVector3D pos
Position and direction of the ray.
Definition: types.h:153
Represents an UTF-8 string, zero byte terminated.
Definition: types.h:251
#define MAXLEN
Maximum dimension for strings, ASSIMP strings are zero terminated.
Definition: types.h:115
4x4 matrix structure, including operators when compiling in C++
size_t length
Binary length of the string excluding the terminal 0.
Definition: types.h:363
Definition: vector3.h:134
Represents a color in Red-Green-Blue space.
Definition: types.h:159
Quaternion structure, including operators when compiling in C++.
char data[MAXLEN]
String buffer.
Definition: types.h:366
float r
Red, green and blue color values.
Definition: types.h:226