1 /* 2 3 Boost Software License - Version 1.0 - August 17th, 2003 4 5 Permission is hereby granted, free of charge, to any person or organization 6 obtaining a copy of the software and accompanying documentation covered by 7 this license (the "Software") to use, reproduce, display, distribute, 8 execute, and transmit the Software, and to prepare derivative works of the 9 Software, and to permit third-parties to whom the Software is furnished to 10 do so, all subject to the following: 11 12 The copyright notices in the Software and this entire statement, including 13 the above license grant, this restriction and the following disclaimer, 14 must be included in all copies of the Software, in whole or in part, and 15 all derivative works of the Software, unless such copies or derivative 16 works are solely in the form of machine-executable object code generated by 17 a source language processor. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 DEALINGS IN THE SOFTWARE. 26 27 */ 28 module derelict.assimp3.types; 29 30 // anim.h 31 struct aiVectorKey { 32 double mTime; 33 aiVector3D mValue; 34 } 35 36 struct aiQuatKey { 37 double mTime; 38 aiQuaternion mValue; 39 } 40 41 struct aiMeshKey { 42 double mTime; 43 uint mValue; 44 } 45 46 alias aiAnimBehaviour = uint; 47 enum : uint { 48 aiAnimBehaviour_DEFAULT = 0x0, 49 aiAnimBehaviour_CONSTANT = 0x1, 50 aiAnimBehaviour_LINEAR = 0x2, 51 aiAnimBehaviour_REPEAT = 0x3, 52 } 53 54 struct aiNodeAnim { 55 aiString mNodeName; 56 uint mNumPositionKeys; 57 aiVectorKey* mPositionKeys; 58 uint mNumRotationKeys; 59 aiQuatKey* mRotationKeys; 60 uint mNumScalingKeys; 61 aiVectorKey* mScalingKeys; 62 aiAnimBehaviour mPreState; 63 aiAnimBehaviour mPostState; 64 } 65 66 struct aiMeshAnim { 67 aiString mName; 68 uint mNumKeys; 69 aiMeshKey* mKeys; 70 } 71 72 struct aiAnimation { 73 aiString mName; 74 double mDuration; 75 double mTicksPerSecond; 76 uint mNumChannels; 77 aiNodeAnim** mChannels; 78 uint mNumMeshChannels; 79 aiMeshAnim** mMeshChannels; 80 } 81 82 // camera.h 83 struct aiCamera { 84 aiString mName; 85 aiVector3D mPosition; 86 aiVector3D mUp; 87 aiVector3D mLookAt; 88 float mHorizontalFOV; 89 float mClipPlaneNear; 90 float mClipPlaneFar; 91 float mAspect; 92 } 93 94 // cexport.h 95 struct aiExportFormatDesc { 96 const(char)* id; 97 const(char)* description; 98 const(char)* fileExtension; 99 } 100 101 struct aiExportDataBlob { 102 size_t size; 103 void* data; 104 aiString name; 105 aiExportDataBlob* next; 106 } 107 108 // cfileio.h 109 extern(C) nothrow { 110 alias aiFileWriteProc = size_t function(aiFile*, const(char)*, size_t, size_t); 111 alias aiFileReadProc = size_t function(aiFile*, char*, size_t, size_t); 112 alias aiFileTellProc = size_t function(aiFile*); 113 alias aiFileFlushProc = void function(aiFile*); 114 alias aiFileSeek = aiReturn function(aiFile*, size_t, aiOrigin); 115 alias aiFileOpenProc = aiFile* function( aiFileIO*, const(char)*, const(char)*); 116 alias aiFileCloseProc = void function(aiFileIO*, aiFile*); 117 } 118 alias aiUserData = void*; 119 120 struct aiFileIO { 121 aiFileOpenProc OpenProc; 122 aiFileCloseProc CloseProc; 123 aiUserData UserData; 124 } 125 126 struct aiFile { 127 aiFileReadProc ReadProc; 128 aiFileWriteProc WriteProc; 129 aiFileTellProc TellProc; 130 aiFileTellProc FileSizeProc; 131 aiFileSeek SeekProc; 132 aiFileFlushProc FlushProc; 133 aiUserData UserData; 134 } 135 136 // cimport.h 137 extern(C) nothrow alias aiLogStreamCallback = void function(const(char)*, char*); 138 139 struct aiLogStream { 140 aiLogStreamCallback callback; 141 char* user; 142 } 143 144 struct aiPropertyStore { 145 char sentinel; 146 } 147 148 alias aiBool = int; 149 150 enum AI_FALSE = 0, 151 AI_TRUE = 1; 152 153 // color4.h 154 align(1) struct aiColor4D { 155 float r, g, b, a; 156 } 157 158 // config.h 159 alias aiComponent = uint; 160 enum : uint { 161 aiComponent_NORMALS = 0x2, 162 aiComponent_TANGENTS_AND_BITANGENTS = 0x4, 163 aiComponent_COLORS = 0x8, 164 aiComponent_TEXCOORDS = 0x10, 165 aiComponent_BONEWEIGHTS = 0x20, 166 aiComponent_ANIMATIONS = 0x40, 167 aiComponent_TEXTURES = 0x80, 168 aiComponent_LIGHTS = 0x100, 169 aiComponent_CAMERAS = 0x200, 170 aiComponent_MESHES = 0x400, 171 aiComponent_MATERIALS = 0x800, 172 } 173 174 uint aiComponent_COLORSn(uint n) { 175 return (1u << (n+20u)); 176 } 177 178 uint aiComponent_TEXCOORDSn(uint n) { 179 return (1u << (n+25u)); 180 } 181 182 enum : string { 183 AI_CONFIG_GLOB_MEASURE_TIME = "GLOB_MEASURE_TIME", 184 AI_CONFIG_IMPORT_NO_SKELETON_MESHES = "IMPORT_NO_SKELETON_MESHES", 185 AI_CONFIG_PP_SBBC_MAX_BONES = "PP_SBBC_MAX_BONES", 186 AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE = "PP_CT_MAX_SMOOTHING_ANGLE", 187 AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX = "PP_CT_TEXTURE_CHANNEL_INDEX", 188 AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE = "PP_GSN_MAX_SMOOTHING_ANGLE", 189 AI_CONFIG_IMPORT_MDL_COLORMAP = "IMPORT_MDL_COLORMAP", 190 AI_CONFIG_PP_RRM_EXCLUDE_LIST = "PP_RRM_EXCLUDE_LIST", 191 AI_CONFIG_PP_PTV_KEEP_HIERARCHY = "PP_PTV_KEEP_HIERARCHY", 192 AI_CONFIG_PP_PTV_NORMALIZE = "PP_PTV_NORMALIZE", 193 AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION = "PP_PTV_ADD_ROOT_TRANSFORMATION", 194 AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION = "PP_PTV_ROOT_TRANSFORMATION", 195 AI_CONFIG_PP_FD_REMOVE = "PP_FD_REMOVE", 196 AI_CONFIG_PP_OG_EXCLUDE_LIST = "PP_OG_EXCLUDE_LIST", 197 AI_CONFIG_PP_SLM_TRIANGLE_LIMIT = "PP_SLM_TRIANGLE_LIMIT", 198 AI_CONFIG_PP_SLM_VERTEX_LIMIT = "PP_SLM_VERTEX_LIMIT", 199 AI_CONFIG_PP_LBW_MAX_WEIGHTS = "PP_LBW_MAX_WEIGHTS", 200 AI_CONFIG_PP_DB_THRESHOLD = "PP_DB_THRESHOLD", 201 AI_CONFIG_PP_DB_ALL_OR_NONE = "PP_DB_ALL_OR_NONE", 202 AI_CONFIG_PP_ICL_PTCACHE_SIZE = "PP_ICL_PTCACHE_SIZE", 203 AI_CONFIG_PP_RVC_FLAGS = "PP_RVC_FLAGS", 204 AI_CONFIG_PP_SBP_REMOVE = "PP_SBP_REMOVE", 205 AI_CONFIG_PP_FID_ANIM_ACCURACY = "PP_FID_ANIM_ACCURACY", 206 AI_CONFIG_PP_TUV_EVALUATE = "PP_TUV_EVALUATE", 207 AI_CONFIG_FAVOUR_SPEED = "FAVOUR_SPEED", 208 AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS = "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS", 209 AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS = "IMPORT_FBX_READ_ALL_MATERIALS", 210 AI_CONFIG_IMPORT_FBX_READ_MATERIALS = "IMPORT_FBX_READ_MATERIALS", 211 AI_CONFIG_IMPORT_FBX_READ_TEXTURES = "AI_CONFIG_IMPORT_FBX_READ_TEXTURES", 212 AI_CONFIG_IMPORT_FBX_READ_CAMERAS = "IMPORT_FBX_READ_CAMERAS", 213 AI_CONFIG_IMPORT_FBX_READ_LIGHTS = "IMPORT_FBX_READ_LIGHTS", 214 AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS = "IMPORT_FBX_READ_ANIMATIONS", 215 AI_CONFIG_IMPORT_FBX_STRICT_MODE = "IMPORT_FBX_STRICT_MODE", 216 AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS = "IMPORT_FBX_PRESERVE_PIVOTS", 217 AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES = "AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES", 218 AI_CONFIG_IMPORT_GLOBAL_KEYFRAME = "IMPORT_GLOBAL_KEYFRAME", 219 AI_CONFIG_IMPORT_MD3_KEYFRAME = "IMPORT_MD3_KEYFRAME", 220 AI_CONFIG_IMPORT_MD2_KEYFRAME = "IMPORT_MD2_KEYFRAME", 221 AI_CONFIG_IMPORT_MDL_KEYFRAME = "IMPORT_MDL_KEYFRAME", 222 AI_CONFIG_IMPORT_MDC_KEYFRAME = "IMPORT_MDC_KEYFRAME", 223 AI_CONFIG_IMPORT_SMD_KEYFRAME = "IMPORT_SMD_KEYFRAME", 224 AI_CONFIG_IMPORT_UNREAL_KEYFRAME = "AI_CONFIG_IMPORT_UNREAL_KEYFRAME", 225 AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL = "IMPORT_AC_SEPARATE_BFCULL", 226 AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION = "IMPORT_AC_EVAL_SUBDIVISION", 227 AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS = "UNREAL_HANDLE_FLAGS", 228 AI_CONFIG_IMPORT_TER_MAKE_UVS = "IMPORT_TER_MAKE_UVS", 229 AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS = "IMPORT_ASE_RECONSTRUCT_NORMALS", 230 AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART = "IMPORT_MD3_HANDLE_MULTIPART", 231 AI_CONFIG_IMPORT_MD3_SKIN_NAME = "IMPORT_MD3_SKIN_NAME", 232 AI_CONFIG_IMPORT_MD3_SHADER_SRC = "IMPORT_MD3_SHADER_SRC", 233 AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY = "IMPORT_LWO_ONE_LAYER_ONLY", 234 AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD = "IMPORT_MD5_NO_ANIM_AUTOLOAD", 235 AI_CONFIG_IMPORT_LWS_ANIM_START = "IMPORT_LWS_ANIM_START", 236 AI_CONFIG_IMPORT_LWS_ANIM_END = "IMPORT_LWS_ANIM_END", 237 AI_CONFIG_IMPORT_IRR_ANIM_FPS = "IMPORT_IRR_ANIM_FPS", 238 AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE = "IMPORT_OGRE_MATERIAL_FILE", 239 AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME = "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME", 240 AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS = "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS", 241 AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT = "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT", 242 AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS = "IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS", 243 AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION = "IMPORT_IFC_CUSTOM_TRIANGULATION", 244 AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION = "IMPORT_COLLADA_IGNORE_UP_DIRECTION", 245 AI_CONFIG_EXPORT_XFILE_64BIT = "EXPORT_XFILE_64BIT", 246 } 247 248 enum AI_SBBC_DEFAULT_MAX_BONES = 60; 249 enum AI_SLM_DEFAULT_MAX_TRIANGLES = 1_000_000; 250 enum AI_SLM_DEFAULT_MAX_VERTICES = 1_000_000; 251 enum AI_LMW_MAX_WEIGHTS = 0x4; 252 enum AI_DEBONE_THRESHOLD = 1.0f; 253 enum PP_ICL_PTCACHE_SIZE = 12; 254 enum { 255 AI_UVTRAFO_SCALING = 0x1, 256 AI_UVTRAFO_ROTATION = 0x2, 257 AI_UVTRAFO_TRANSLATION = 0x4, 258 AI_UVTRAFO_ALL = AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION, 259 } 260 261 // importerdesc.h 262 alias aiImporterFlags = int; 263 enum { 264 aiImporterFlags_SupportTextFlavour = 0x1, 265 aiImporterFlags_SupportBinaryFlavour = 0x2, 266 aiImporterFlags_SupportCompressedFlavour = 0x4, 267 aiImporterFlags_LimitedSupport = 0x8, 268 aiImporterFlags_Experimental = 0x10, 269 } 270 271 struct aiImporterDesc { 272 const(char)* mName; 273 const(char)* mAuthor; 274 const(char)* mMaintainer; 275 const(char)* mComments; 276 uint mFlags; 277 uint mMinMajor; 278 uint mMinMinor; 279 uint mMaxMajor; 280 uint mMaxMinor; 281 const(char)* mFileExtensions; 282 } 283 284 // light.h 285 alias aiLightSourceType = uint; 286 enum : uint { 287 aiLightSourceType_UNDEFINED = 0x0, 288 aiLightSourceType_DIRECTIONAL = 0x1, 289 aiLightSourceType_POINT = 0x2, 290 aiLightSourceType_SPOT = 0x3, 291 aiLightSourceType_AMBIENT = 0x4, 292 aiLightSource_AREA = 0x5, 293 } 294 295 struct aiLight { 296 aiString mName; 297 aiLightSourceType mType; 298 aiVector3D mPosition; 299 aiVector3D mDirection; 300 aiVector3D mUp; 301 float mAttenuationConstant; 302 float mAttenuationLinear; 303 float mAttenuationQuadratic; 304 aiColor3D mColorDiffuse; 305 aiColor3D mColorSpecular; 306 aiColor3D mColorAmbient; 307 float mAngleInnerCone; 308 float mAngleOuterCone; 309 aiVector2D mSize; 310 } 311 312 // material.h 313 enum AI_DEFAULT_MATERIAL_NAME = "DefaultMaterial"; 314 315 alias aiTextureOp = uint; 316 enum : uint { 317 aiTextureOp_Multiply = 0x0, 318 aiTextureOp_Add = 0x1, 319 aiTextureOp_Subtract = 0x2, 320 aiTextureOp_Divide = 0x3, 321 aiTextureOp_SmoothAdd = 0x4, 322 aiTextureOp_SignedAdd = 0x5, 323 } 324 325 alias aiTextureMapMode = uint; 326 enum : uint { 327 aiTextureMapMode_Wrap = 0x0, 328 aiTextureMapMode_Clamp = 0x1, 329 aiTextureMapMode_Decal = 0x3, 330 aiTextureMapMode_Mirror = 0x2, 331 } 332 333 alias aiTextureMapping = uint; 334 enum : uint { 335 aiTextureMapping_UV = 0x0, 336 aiTextureMapping_SPHERE = 0x1, 337 aiTextureMapping_CYLINDER = 0x2, 338 aiTextureMapping_BOX = 0x3, 339 aiTextureMapping_PLANE = 0x4, 340 aiTextureMapping_OTHER = 0x5, 341 } 342 343 alias aiTextureType = uint; 344 enum : uint { 345 aiTextureType_NONE = 0x0, 346 aiTextureType_DIFFUSE = 0x1, 347 aiTextureType_SPECULAR = 0x2, 348 aiTextureType_AMBIENT = 0x3, 349 aiTextureType_EMISSIVE = 0x4, 350 aiTextureType_HEIGHT = 0x5, 351 aiTextureType_NORMALS = 0x6, 352 aiTextureType_SHININESS = 0x7, 353 aiTextureType_OPACITY = 0x8, 354 aiTextureType_DISPLACEMENT = 0x9, 355 aiTextureType_LIGHTMAP = 0xA, 356 aiTextureType_REFLECTION = 0xB, 357 aiTextureType_UNKNOWN = 0xC, 358 } 359 360 alias aiShadingMode = uint; 361 enum : uint { 362 aiShadingMode_Flat = 0x1, 363 aiShadingMode_Gouraud = 0x2, 364 aiShadingMode_Phong = 0x3, 365 aiShadingMode_Blinn = 0x4, 366 aiShadingMode_Toon = 0x5, 367 aiShadingMode_OrenNayer = 0x6, 368 aiShadingMode_Minnaert =0x7, 369 aiShadingMode_CookTorrance = 0x8, 370 aiShadingMode_NoShading = 0x9, 371 aiShadingMode_Fresnel = 0xA, 372 } 373 374 alias aiTextureFlags = uint; 375 enum : uint { 376 aiTextureFlags_Invert = 0x1, 377 aiTextureFlags_UseAlpha = 0x2, 378 aiTextureFlags_IgnoreAlpha = 0x4, 379 } 380 381 alias aiBlendMode = uint; 382 enum : uint { 383 aiBlendMode_Default = 0x0, 384 aiBlendMode_Additive = 0x1, 385 } 386 387 align(1) struct aiUVTransform { 388 aiVector2D mTranslation; 389 aiVector2D mScaling; 390 float mRotation; 391 } 392 393 alias aiPropertyTypeInfo = uint; 394 enum : uint { 395 aiPTI_Float = 0x1, 396 aiPTI_String = 0x3, 397 aiPTI_Integer = 0x4, 398 aiPTI_Buffer = 0x5, 399 } 400 401 struct aiMaterialProperty { 402 aiString mKey; 403 uint mSemantic; 404 uint mIndex; 405 uint mDataLength; 406 aiPropertyTypeInfo mType; 407 byte* mData; 408 } 409 410 struct aiMaterial { 411 aiMaterialProperty** mProperties; 412 uint mNumProperties; 413 uint mNumAllocated; 414 } 415 416 enum { 417 AI_MATKEY_NAME = "?mat.name", 418 AI_MATKEY_TWOSIDED = "$mat.twosided", 419 AI_MATKEY_SHADING_MODEL = "$mat.shadingm", 420 AI_MATKEY_ENABLE_WIREFRAM = "$mat.wireframe", 421 AI_MATKEY_BLEND_FUNC = "$mat.blend", 422 AI_MATKEY_OPACITY = "$mat.opacity", 423 AI_MATKEY_BUMPSCALING = "$mat.bumpscaling", 424 AI_MATKEY_SHININESS = "$mat.shininess", 425 AI_MATKEY_REFLECTIVITY = "$mat.reflectivity", 426 AI_MATKEY_SHININESS_STRENGTH = "$mat.shinpercent", 427 AI_MATKEY_REFRACTI = "$mat.refracti", 428 AI_MATKEY_COLOR_DIFFUSE = "$clr.diffuse", 429 AI_MATKEY_COLOR_AMBIENT = "$clr.ambient", 430 AI_MATKEY_COLOR_SPECULAR = "$clr.specular", 431 AI_MATKEY_COLOR_EMISSIVE = "$clr.emissive", 432 AI_MATKEY_COLOR_TRANSPARENT = "$clr.transparent", 433 AI_MATKEY_COLOR_REFLECTIVE = "$clr.reflective", 434 AI_MATKEY_GLOBAL_BACKGROUND_IMAGE = "?bg.global", 435 AI_MATKEY_TEXTURE = "$tex.file", 436 AI_MATKEY_UVWSRC = "$tex.uvwsrc", 437 AI_MATKEY_TEXOP = "$tex.op", 438 AI_MATKEY_MAPPING = "$tex.mapping", 439 AI_MATKEY_TEXBLEND = "$tex.blend", 440 AI_MATKEY_MAPPINGMODE_U = "$tex.mapmodeu", 441 AI_MATKEY_MAPPINGMODE_V = "$tex.mapmodev", 442 AI_MATKEY_TEXMAP_AXIS = "$tex.mapaxis", 443 AI_MATKEY_UVTRANSFORM = "$tex.uvtrafo", 444 AI_MATKEY_TEXFLAGS = "$tex.flags", 445 } 446 447 // matrix3x3.h 448 align(1) struct aiMatrix3x3 { 449 float a1, a2, a3; 450 float b1, b2, b3; 451 float c1, c2, c3; 452 } 453 454 // matrix4x4.h 455 struct aiMatrix4x4 { 456 float a1, a2, a3, a4; 457 float b1, b2, b3, b4; 458 float c1, c2, c3, c4; 459 float d1, d2, d3, d4; 460 } 461 462 // mesh.h 463 enum AI_MAX_FACE_INDICES = 0x7fff; 464 enum AI_MAX_BONE_WEIGHTS = 0x7fffffff; 465 enum AI_MAX_VERTICES = 0x7fffffff; 466 enum AI_MAX_FACES = 0x7fffffff; 467 enum AI_MAX_NUMBER_OF_COLOR_SETS = 0x8; 468 enum AI_MAX_NUMBER_OF_TEXTURECOORDS = 0x8; 469 470 struct aiFace { 471 uint mNumIndices; 472 uint* mIndices; 473 } 474 475 struct aiVertexWeight { 476 uint mVertexId; 477 float mWeight; 478 } 479 480 struct aiBone { 481 aiString mName; 482 uint mNumWeights; 483 aiVertexWeight* mWeights; 484 aiMatrix4x4 mOffsetMatrix; 485 } 486 487 alias aiPrimitiveType = uint; 488 enum : uint { 489 aiPrimitiveType_POINT = 0x1, 490 aiPrimitiveType_LINE = 0x2, 491 aiPrimitiveType_TRIANGLE = 0x4, 492 aiPrimitiveType_POLYGON = 0x8, 493 494 } 495 496 struct aiAnimMesh { 497 aiVector3D* mVertices; 498 aiVector3D* mNormals; 499 aiVector3D* mTangents; 500 aiVector3D* mBitangents; 501 aiColor4D*[AI_MAX_NUMBER_OF_COLOR_SETS] mColors; 502 aiVector3D*[AI_MAX_NUMBER_OF_TEXTURECOORDS] mTextureCoords; 503 uint mNumVertices; 504 } 505 506 struct aiMesh { 507 uint mPrimitiveTypes; 508 uint mNumVertices; 509 uint mNumFaces; 510 aiVector3D* mVertices; 511 aiVector3D* mNormals; 512 aiVector3D* mTangents; 513 aiVector3D* mBitangents; 514 aiColor4D*[AI_MAX_NUMBER_OF_COLOR_SETS] mColors; 515 aiVector3D*[AI_MAX_NUMBER_OF_TEXTURECOORDS] mTextureCoords; 516 uint[AI_MAX_NUMBER_OF_TEXTURECOORDS] mNumUVComponents; 517 aiFace* mFaces; 518 uint mNumBones; 519 aiBone** mBones; 520 uint mMaterialIndex; 521 aiString mName; 522 uint mNumAnimMeshes; 523 aiAnimMesh** mAnimMeshes; 524 } 525 526 // metadata.h 527 alias aiMetadataType = int; 528 enum { 529 AI_BOOL = 0, 530 AI_INT = 1, 531 AI_UINT64 = 2, 532 AI_FLOAT = 3, 533 AI_AISTRING = 4, 534 AI_AIVECTOR3D = 5, 535 } 536 537 struct aiMetadataEntry { 538 aiMetadataType mType; 539 void* mData; 540 } 541 542 @nogc pure nothrow { 543 aiMetadataType GetAiType(bool) { return AI_BOOL; } 544 aiMetadataType GetAiType(int) { return AI_INT; } 545 aiMetadataType GetAiType(ulong) { return AI_UINT64; } 546 aiMetadataType GetAiType(float) { return AI_FLOAT; } 547 aiMetadataType GetAiType(aiString) { return AI_AISTRING; } 548 aiMetadataType GetAiType(aiVector3D) { return AI_AIVECTOR3D; } 549 } 550 551 struct aiMetadata { 552 uint mNumProperties; 553 aiString* mKeys; 554 aiMetadataEntry* mValues; 555 } 556 557 // postprocess.h 558 alias aiPostProcessSteps = uint; 559 enum : uint { 560 aiProcess_CalcTangentSpace = 0x1, 561 aiProcess_JoinIdenticalVertices = 0x2, 562 aiProcess_MakeLeftHanded = 0x4, 563 aiProcess_Triangulate = 0x8, 564 aiProcess_RemoveComponent = 0x10, 565 aiProcess_GenNormals = 0x20, 566 aiProcess_GenSmoothNormals = 0x40, 567 aiProcess_SplitLargeMeshes = 0x80, 568 aiProcess_PreTransformVertices = 0x100, 569 aiProcess_LimitBoneWeights = 0x200, 570 aiProcess_ValidateDataStructure = 0x400, 571 aiProcess_ImproveCacheLocality = 0x800, 572 aiProcess_RemoveRedundantMaterials = 0x1000, 573 aiProcess_FixInFacingNormals = 0x2000, 574 aiProcess_SortByPType = 0x8000, 575 aiProcess_FindDegenerates = 0x10000, 576 aiProcess_FindInvalidData = 0x20000, 577 aiProcess_GenUVCoords = 0x40000, 578 aiProcess_TransformUVCoords = 0x80000, 579 aiProcess_FindInstances = 0x100000, 580 aiProcess_OptimizeMeshes = 0x200000, 581 aiProcess_OptimizeGraph = 0x400000, 582 aiProcess_FlipUVs = 0x800000, 583 aiProcess_FlipWindingOrder = 0x1000000, 584 aiProcess_SplitByBoneCount = 0x2000000, 585 aiProcess_Debone = 0x4000000, 586 587 aiProcess_ConvertToLeftHanded = aiProcess_MakeLeftHanded | aiProcess_FlipUVs | aiProcess_FlipWindingOrder | 0, 588 aiProcessPreset_TargetRealtime_Fast = aiProcess_CalcTangentSpace | aiProcess_GenNormals | 589 aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_GenUVCoords | 590 aiProcess_SortByPType | 0, 591 aiProcessPreset_TargetRealtime_Quality = aiProcess_CalcTangentSpace | aiProcess_GenSmoothNormals | aiProcess_JoinIdenticalVertices | 592 aiProcess_ImproveCacheLocality | aiProcess_LimitBoneWeights | aiProcess_RemoveRedundantMaterials | 593 aiProcess_SplitLargeMeshes | aiProcess_Triangulate | aiProcess_GenUVCoords | aiProcess_SortByPType | 594 aiProcess_FindDegenerates | aiProcess_FindInvalidData | 0, 595 aiProcessPreset_TargetRealtime_MaxQuality = 596 aiProcessPreset_TargetRealtime_Quality | 597 aiProcess_FindInstances | aiProcess_ValidateDataStructure | 598 aiProcess_OptimizeMeshes | aiProcess_Debone | 0, 599 } 600 601 // quaternion.h 602 struct aiQuaternion { 603 float w, x, y, z; 604 } 605 606 // scene.h 607 struct aiNode { 608 aiString mName; 609 aiMatrix4x4 mTransformation; 610 aiNode* mParent; 611 uint mNumChildren; 612 aiNode** mChildren; 613 uint mNumMeshes; 614 uint* mMeshes; 615 aiMetadata* mMetaData; 616 } 617 618 enum { 619 AI_SCENE_FLAGS_INCOMPLETE = 0x1, 620 AI_SCENE_FLAGS_VALIDATED = 0x2, 621 AI_SCENE_FLAGS_VALIDATION_WARNING = 0x4, 622 AI_SCENE_FLAGS_NON_VERBOSE_FORMAT = 0x8, 623 AI_SCENE_FLAGS_TERRAIN = 0x10, 624 } 625 626 struct aiScene { 627 uint mFlags; 628 aiNode* mRootNode; 629 uint mNumMeshes; 630 aiMesh** mMeshes; 631 uint mNumMaterials; 632 aiMaterial** mMaterials; 633 uint mNumAnimations; 634 aiAnimation** mAnimations; 635 uint mNumTextures; 636 aiTexture** mTextures; 637 uint mNumLights; 638 aiLight** mLights; 639 uint mNumCameras; 640 aiCamera** mCameras; 641 } 642 643 // texture.h 644 align(1) struct aiTexel { 645 ubyte b, g, r, a; 646 } 647 648 struct aiTexture { 649 uint mWidth; 650 uint mHeight; 651 char[4] achFormatHint; 652 aiTexel* pcData; 653 } 654 655 // types.h 656 enum MAXLEN = 1024; 657 658 align(1) struct aiPlane { 659 float a, b, c, d; 660 } 661 662 align(1) struct aiRay { 663 aiVector3D pos, dir; 664 } 665 666 align(1) struct aiColor3D { 667 float r, g, b; 668 } 669 670 struct aiString { 671 size_t length; 672 char[MAXLEN] data; 673 } 674 675 alias aiReturn = int; 676 enum { 677 aiReturn_SUCCESS = 0x0, 678 aiReturn_FAILURE = -0x1, 679 aiReturn_OUTOFMEMORY = -0x3, 680 } 681 682 alias aiOrigin = uint; 683 enum : uint { 684 aiOrigin_SET = 0x0, 685 aiOrigin_CUR = 0x1, 686 aiOrigin_END = 0x2, 687 } 688 689 alias aiDefaultLogStream = uint; 690 enum : uint { 691 aiDefaultLogStream_FILE = 0x1, 692 aiDefaultLogStream_STDOUT = 0x2, 693 aiDefaultLogStream_STDERR = 0x4, 694 aiDefaultLogStream_DEBUGGER = 0x8, 695 } 696 697 struct aiMemoryInfo { 698 uint textures; 699 uint materials; 700 uint meshes; 701 uint nodes; 702 uint animations; 703 uint cameras; 704 uint lights; 705 uint total; 706 } 707 708 // vector2.h 709 struct aiVector2D { 710 float x, y; 711 } 712 713 // vector3.h 714 align(1) struct aiVector3D { 715 float x, y, z; 716 } 717 718 // version.h 719 720 enum { 721 ASSIMP_CFLAGS_SHARED = 0x1, 722 ASSIMP_CFLAGS_STLPORT = 0x2, 723 ASSIMP_CFLAGS_DEBUG = 0x4, 724 ASSIMP_CFLAGS_NOBOOST = 0x8, 725 ASSIMP_CFLAGS_SINGLETHREADED = 0x10, 726 }