Class Assimp
- java.lang.Object
-
- org.lwjgl.assimp.Assimp
-
public class Assimp extends java.lang.ObjectContains bindings to the Assimp library.General Features
- Written in portable, ISO-compliant C++
- Easily configurable and customizable
- Core interface / API is provided for both C++ and C
- Command-line interface to perform common operations (i.e. quick file stats, convert models, extract embedded textures) from the shell
- Imports bones, vertex weights and animations (i.e. skinning, skeletal animations)
- Loads multiple UV and vertex color channels (current limit is 8)
- Works well with UNICODE input files
- Supports complex multi-layer materials
- Supports embedded textures, both compressed (e.g. PNG) or just raw color data
- No external dependencies except boost (zlib and irrxml are also needed, but they're included in the repository so you don't need to bother). And there's even a workaround to compile Assimp without boost - with some minor limitations.
- Due to its export interface, Assimp serves as general-purpose 3D model converter
Import Formats
COMMON INTERCHANGE FORMATS (An asterisk indicates limited support)
- Autodesk ( .fbx )
- Collada ( .dae )
- glTF ( .gltf, .glb )
- Blender 3D ( .blend )
- 3ds Max 3DS ( .3ds )
- 3ds Max ASE ( .ase )
- Wavefront Object ( .obj )
- Industry Foundation Classes (IFC/Step) ( .ifc )
- XGL ( .xgl,.zgl )
- Stanford Polygon Library ( .ply )
- *AutoCAD DXF ( .dxf )
- LightWave ( .lwo )
- LightWave Scene ( .lws )
- Modo ( .lxo )
- Stereolithography ( .stl )
- DirectX X ( .x )
- AC3D ( .ac )
- Milkshape 3D ( .ms3d )
- * TrueSpace ( .cob,.scn )
- *OpenGEX ( .ogex )
- *X3D ( .x3d )
- *3MF ( .3mf )
MOTION CAPTURE FORMATS
- Biovision BVH ( .bvh )
- * CharacterStudio Motion ( .csm )
GRAPHICS ENGINE FORMATS
- Ogre XML ( .xml )
- Irrlicht Mesh ( .irrmesh )
- * Irrlicht Scene ( .irr )
GAME FILE FORMATS
- Quake I ( .mdl )
- Quake II ( .md2 )
- Quake III Mesh ( .md3 )
- Quake III Map/BSP ( .pk3 )
- * Return to Castle Wolfenstein ( .mdc )
- Doom 3 ( .md5* )
- *Valve Model ( .smd,.vta )
- *Open Game Engine Exchange ( .ogex )
- *Unreal ( .3d )
OTHER FILE FORMATS
- BlitzBasic 3D ( .b3d )
- Quick3D ( .q3d,.q3s )
- Neutral File Format ( .nff )
- Sense8 WorldToolKit ( .nff )
- Object File Format ( .off )
- PovRAY Raw ( .raw )
- Terragen Terrain ( .ter )
- 3D GameStudio (3DGS) ( .mdl )
- 3D GameStudio (3DGS) Terrain ( .hmp )
- Izware Nendo ( .ndo )
Export Formats
COMMON INTERCHANGE FORMATS
- Collada ( .dae )
- Wavefront Object ( .obj )
- Stereolithography ( .stl )
- Stanford Polygon Library ( .ply )
Post-processing
REAL TIME RENDERING
- Improve vertex cache locality
- Convert from right-handed to left-handed space
- Limit weights affecting a single vertex
- Split meshes to avoid exceeding bone count limits
- Triangulate arbitrary polygons
- Join identical vertices, optimize indexing
- Find degenerate polygons
- Split large meshes to overcome GPU limitations (i.e. vertex count)
VERTEX DATA
- Compute "hard" per-face normal vectors
- Compute "smooth" per-vertex normal vectors
- Compute tangents and bitangents
SCENEGRAPH
- Collapse the scene graph, transform everything to world coordinates
- Optimize meshes & nodes for fewer drawcalls
OTHER
- Validate the output structure to ensure maximum data integrity
- Remove unrequired materials, effectively detect and merge duplicates
- Try to correct face winding
- Drop dummy bones introduced somewhere in your content pipeline
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAssimp.FunctionsContains the function pointers loaded from the assimpSharedLibrary.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_AI_MATKEY_MAPPING_BASE
_AI_MATKEY_MAPPINGMODE_U_BASE
_AI_MATKEY_MAPPINGMODE_V_BASE
_AI_MATKEY_TEXBLEND_BASE
_AI_MATKEY_TEXFLAGS_BASE
_AI_MATKEY_TEXMAP_AXIS_BASE
_AI_MATKEY_TEXOP_BASE
_AI_MATKEY_TEXTURE_BASE
_AI_MATKEY_UVTRANSFORM_BASE
_AI_MATKEY_UVWSRC_BASEMaterial keysstatic java.lang.Stringai_AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE
ai_AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE
ai_AI_MATKEY_GLTF_MAPPINGID_BASE
ai_AI_MATKEY_GLTF_MAPPINGNAME_BASE
ai_AI_MATKEY_GLTF_SCALE_BASE
ai_AI_MATKEY_GLTF_STRENGTH_BASE
ai_AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASEPBR Material keysstatic intAI_AISTRING
AI_AIVECTOR3D
AI_BOOLEnum used to distinguish data types.static java.lang.StringAI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORTSpecifies whether the Android JNI asset extraction is supported.static floatAI_CONFIG_APP_SCALE_DEFAULTDefault value for configuration properties.static java.lang.StringAI_CONFIG_APP_SCALE_KEYSpecifies an application key factor for scale.static java.lang.StringAI_CONFIG_EXPORT_POINT_CLOUDSSpecifies whether the assimp export shall be able to export point clouds.static java.lang.StringAI_CONFIG_EXPORT_XFILE_64BITSpecifies the xfile use double for real values of float.static java.lang.StringAI_CONFIG_FAVOUR_SPEEDA hint to assimp to favour speed against import quality.static java.lang.StringAI_CONFIG_FBX_CONVERT_TO_MSet whether the FBX importer shall convert the unit from cm to m.static java.lang.StringAI_CONFIG_GLOB_MEASURE_TIMEEnables time measurements.static floatAI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULTDefault value for configuration properties.static java.lang.StringAI_CONFIG_GLOBAL_SCALE_FACTOR_KEYSpecifies a global key factor for scale.static java.lang.StringAI_CONFIG_IMPORT_AC_EVAL_SUBDIVISIONConfigures whether the AC loader evaluates subdivision surfaces (indicated by the presence of the 'subdiv' attribute in the file).static java.lang.StringAI_CONFIG_IMPORT_AC_SEPARATE_BFCULLConfigures the AC loader to collect all surfaces which have the "Backface cull" flag set in separate meshes.static java.lang.StringAI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALSConfigures the ASE loader to always reconstruct normal vectors basing on the smoothing groups loaded from the file.static java.lang.StringAI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTIONSpecifies whether the Collada loader will ignore the provided up direction.static java.lang.StringAI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMESSpecifies whether the Collada loader should use Collada names as node names.static java.lang.StringAI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMINGSet whether the fbx importer will use the legacy embedded texture naming.static java.lang.StringAI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVESSpecifies whether the importer will drop empty animation curves or animation curves which match the bind pose transformation over their entire defined range.static java.lang.StringAI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTSSet whether the fbx importer will preserve pivot points for transformations (as extra nodes).static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERSSet whether the fbx importer will merge all geometry layers present in the source file or take only the first.static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALSSet whether the fbx importer will read all materials present in the source file or take only the referenced materials.static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_ANIMATIONSSet whether the fbx importer will read animations.static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_CAMERASSet whether the fbx importer will read cameras.static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_LIGHTSSet whether the fbx importer will read light sources.static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_MATERIALSSet whether the fbx importer will read materials.static java.lang.StringAI_CONFIG_IMPORT_FBX_READ_TEXTURESSet whether the fbx importer will read embedded textures.static java.lang.StringAI_CONFIG_IMPORT_FBX_STRICT_MODESet whether the fbx importer will act in strict mode in which only FBX 2013 is supported and any other sub formats are rejected.static java.lang.StringAI_CONFIG_IMPORT_GLOBAL_KEYFRAMESet the vertex animation keyframe to be imported.static java.lang.StringAI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATIONSpecifies whether the IFC loader will use its own, custom triangulation algorithm to triangulate wall and floor meshes.static java.lang.StringAI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATIONSet the tessellation for IFC cylindrical shapes.static java.lang.StringAI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONSSpecifies whether the IFC loader skips over shape representations of type 'Curve2D'.static java.lang.StringAI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONSSpecifies whether the IFC loader skips over IfcSpace elements.static java.lang.StringAI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLESets the tessellation conic angle for IFC smoothing curves.static java.lang.StringAI_CONFIG_IMPORT_IRR_ANIM_FPSDefines the output frame rate of the IRR loader.static java.lang.StringAI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLYConfigures the LWO loader to load just one layer from the model.static java.lang.StringAI_CONFIG_IMPORT_LWS_ANIM_ENDEnd of the imported time range.static java.lang.StringAI_CONFIG_IMPORT_LWS_ANIM_STARTDefines the begin of the time range for which the LWS loader evaluates animations and computesAINodeAnim's.static java.lang.StringAI_CONFIG_IMPORT_MD2_KEYFRAMEstatic java.lang.StringAI_CONFIG_IMPORT_MD3_HANDLE_MULTIPARTConfigures the M3D loader to detect and process multi-part Quake player models.static java.lang.StringAI_CONFIG_IMPORT_MD3_KEYFRAMEstatic java.lang.StringAI_CONFIG_IMPORT_MD3_SHADER_SRCSpecify the Quake 3 shader file to be used for a particular MD3 file.static java.lang.StringAI_CONFIG_IMPORT_MD3_SKIN_NAMETells the MD3 loader which skin files to load.static java.lang.StringAI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOADConfigures the MD5 loader to not load the MD5ANIM file for a MD5MESH file automatically.static java.lang.StringAI_CONFIG_IMPORT_MDC_KEYFRAMEstatic java.lang.StringAI_CONFIG_IMPORT_MDL_COLORMAPSets the colormap (= palette) to be used to decode embedded textures in MDL (Quake or 3DGS) files.static java.lang.StringAI_CONFIG_IMPORT_MDL_KEYFRAMEstatic java.lang.StringAI_CONFIG_IMPORT_NO_SKELETON_MESHESGlobal setting to disable generation of skeleton dummy meshesstatic java.lang.StringAI_CONFIG_IMPORT_OGRE_MATERIAL_FILEOgre Importer will try to find referenced materials from this file.static java.lang.StringAI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAMEOgre Importer detect the texture usage from its filename.static java.lang.StringAI_CONFIG_IMPORT_REMOVE_EMPTY_BONESSet whether the importer shall not remove empty bones.static java.lang.StringAI_CONFIG_IMPORT_SMD_KEYFRAMEstatic java.lang.StringAI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LISTSmd load multiple animations.static java.lang.StringAI_CONFIG_IMPORT_TER_MAKE_UVSConfigures the terragen import plugin to compute uv's for terrains, if not given.static java.lang.StringAI_CONFIG_IMPORT_UNREAL_KEYFRAMEstatic java.lang.StringAI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLESpecifies the maximum angle that may be between two vertex tangents that their tangents and bi-tangents are smoothed.static java.lang.StringAI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEXSource UV channel for tangent space computation.static java.lang.StringAI_CONFIG_PP_DB_ALL_OR_NONERequire all bones qualify for deboning before removing any.static java.lang.StringAI_CONFIG_PP_DB_THRESHOLDLower the deboning threshold in order to remove more bones.static java.lang.StringAI_CONFIG_PP_FD_CHECKAREAConfigures theProcess_FindDegeneratesto check the area of a triangle to be greater than e-6.static java.lang.StringAI_CONFIG_PP_FD_REMOVEConfigures theProcess_FindDegeneratesstep to remove degenerated primitives from the import - immediately.static java.lang.StringAI_CONFIG_PP_FID_ANIM_ACCURACYInput parameter to theProcess_FindInvalidDatastep: Specifies the floating-point accuracy for animation values.static java.lang.StringAI_CONFIG_PP_FID_IGNORE_TEXTURECOORDSInput parameter to theProcess_FindInvalidDatastep: Set to true to ignore texture coordinates.static java.lang.StringAI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLESpecifies the maximum angle that may be between two face normals at the same vertex position that their are smoothed together.static java.lang.StringAI_CONFIG_PP_ICL_PTCACHE_SIZESet the size of the post-transform vertex cache to optimize the vertices for.static java.lang.StringAI_CONFIG_PP_LBW_MAX_WEIGHTSSet the maximum number of bones affecting a single vertex.static java.lang.StringAI_CONFIG_PP_OG_EXCLUDE_LISTConfigures theProcess_OptimizeGraphstep to preserve nodes matching a name in a given list.static java.lang.StringAI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATIONConfigures theProcess_PreTransformVerticesstep to use a users defined matrix as the scene root node transformation before transforming vertices.static java.lang.StringAI_CONFIG_PP_PTV_KEEP_HIERARCHYConfigures theProcess_PreTransformVerticesstep to keep the scene hierarchy.static java.lang.StringAI_CONFIG_PP_PTV_NORMALIZEConfigures theProcess_PreTransformVerticesstep to normalize all vertex components into the[-1,1]range.static java.lang.StringAI_CONFIG_PP_PTV_ROOT_TRANSFORMATIONConfigures theProcess_PreTransformVerticesstep to use a users defined matrix as the scene root node transformation before transforming vertices.static java.lang.StringAI_CONFIG_PP_RRM_EXCLUDE_LISTConfigures theProcess_RemoveRedundantMaterialsstep to keep materials matching a name in a given list.static java.lang.StringAI_CONFIG_PP_RVC_FLAGSInput parameter to theProcess_RemoveComponentstep: Specifies the parts of the data structure to be removed.static java.lang.StringAI_CONFIG_PP_SBBC_MAX_BONESMaximum bone count per mesh for theProcess_SplitByBoneCountstep.static java.lang.StringAI_CONFIG_PP_SBP_REMOVEInput parameter to theProcess_SortByPTypestep: Specifies which primitive types are removed by the step.static java.lang.StringAI_CONFIG_PP_SLM_TRIANGLE_LIMITSet the maximum number of triangles in a mesh.static java.lang.StringAI_CONFIG_PP_SLM_VERTEX_LIMITSet the maximum number of vertices in a mesh.static java.lang.StringAI_CONFIG_PP_TUV_EVALUATEInput parameter to theProcess_TransformUVCoordsstep: Specifies which UV transformations are evaluated.static java.lang.StringAI_CONFIG_UNREAL_HANDLE_FLAGSConfigures the UNREAL 3D loader to separate faces with different surface flags (e.g.static floatAI_DEBONE_THRESHOLDDefault value for configuration properties.static java.lang.StringAI_DEFAULT_MATERIAL_NAMEName for default materials (2nd is used if meshes have UV coords)static intAI_DOUBLEEnum used to distinguish data types.static floatai_epsilonNumerical limits.static intAI_FALSEBoolean constantsstatic intAI_FLOATEnum used to distinguish data types.static intAI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATIONDefault values for configuration properties.static floatAI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLEDefault value for configuration properties.static intAI_INT32Enum used to distinguish data types.static intAI_LBW_MAX_WEIGHTSDefault values for configuration properties.static doubleAI_MATH_HALF_PIThis is PI.static floatAI_MATH_HALF_PI_FThis is PI.static doubleAI_MATH_PIThis is PI.static floatAI_MATH_PI_FThis is PI.static doubleAI_MATH_TWO_PIThis is PI.static floatAI_MATH_TWO_PI_FThis is PI.static java.lang.StringAI_MATKEY_BLEND_FUNC
AI_MATKEY_BUMPSCALING
AI_MATKEY_COLOR_AMBIENT
AI_MATKEY_COLOR_DIFFUSE
AI_MATKEY_COLOR_EMISSIVE
AI_MATKEY_COLOR_REFLECTIVE
AI_MATKEY_COLOR_SPECULAR
AI_MATKEY_COLOR_TRANSPARENT
AI_MATKEY_ENABLE_WIREFRAME
AI_MATKEY_GLOBAL_BACKGROUND_IMAGE
AI_MATKEY_GLOBAL_SHADERLANGMaterial keysstatic intAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE
AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTUREstatic java.lang.StringAI_MATKEY_NAME
AI_MATKEY_OPACITY
AI_MATKEY_REFLECTIVITY
AI_MATKEY_REFRACTI
AI_MATKEY_SHADER_COMPUTE
AI_MATKEY_SHADER_FRAGMENT
AI_MATKEY_SHADER_GEO
AI_MATKEY_SHADER_PRIMITIVE
AI_MATKEY_SHADER_TESSELATION
AI_MATKEY_SHADER_VERTEX
AI_MATKEY_SHADING_MODEL
AI_MATKEY_SHININESS
AI_MATKEY_SHININESS_STRENGTH
AI_MATKEY_TRANSPARENCYFACTOR
AI_MATKEY_TWOSIDEDMaterial keysstatic intAI_MAX_BONE_WEIGHTS
AI_MAX_FACE_INDICESMaximum number of indices per face (polygon).static intAI_MAX_FACESMaximum number of faces per mesh.static intAI_MAX_NUMBER_OF_COLOR_SETSSupported number of vertex color sets per mesh.static intAI_MAX_NUMBER_OF_TEXTURECOORDSSupported number of texture coord sets (UV(W) channels) per mesh.static intAI_MAX_VERTICESMaximum number of vertices per mesh.static intAI_META_MAXEnum used to distinguish data types.static intAI_SBBC_DEFAULT_MAX_BONESDefault values for configuration properties.static intAI_SCENE_FLAGS_INCOMPLETESpecifies that the scene data structure that was imported is not complete.static intAI_SCENE_FLAGS_NON_VERBOSE_FORMATThis flag is currently only set by the aiProcess_JoinIdenticalVertices step.static intAI_SCENE_FLAGS_TERRAINDenotes pure height-map terrain data.static intAI_SCENE_FLAGS_VALIDATEDThis flag is set by the validation postprocess-step (aiPostProcess_ValidateDS) if the validation is successful.static intAI_SCENE_FLAGS_VALIDATION_WARNINGThis flag is set by the validation postprocess-step (aiPostProcess_ValidateDS) if the validation is successful but some issues have been found.static intAI_SLM_DEFAULT_MAX_TRIANGLES
AI_SLM_DEFAULT_MAX_VERTICESDefault values for configuration properties.static intAI_TRUEBoolean constantsstatic intAI_UINT64Enum used to distinguish data types.static intAI_UVTRAFO_ALL
AI_UVTRAFO_ROTATION
AI_UVTRAFO_SCALING
AI_UVTRAFO_TRANSLATIONUVCoord Transformsstatic java.lang.StringaiAI_MATKEY_GLTF_ALPHACUTOFF
aiAI_MATKEY_GLTF_ALPHAMODE
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR
aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS
aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR
aiAI_MATKEY_GLTF_UNLITPBR Material keysstatic intaiAnimBehaviour_CONSTANT
aiAnimBehaviour_DEFAULT
aiAnimBehaviour_LINEAR
aiAnimBehaviour_REPEATDefines how an animation channel behaves outside the defined time range.static intaiBlendMode_Additive
aiBlendMode_DefaultDefines alpha-blend flags.static intaiComponent_ANIMATIONS
aiComponent_BONEWEIGHTS
aiComponent_CAMERAS
aiComponent_COLORS
aiComponent_LIGHTS
aiComponent_MATERIALS
aiComponent_MESHES
aiComponent_NORMALS
aiComponent_TANGENTS_AND_BITANGENTS
aiComponent_TEXCOORDS
aiComponent_TEXTURESEnumerates components of theAISceneandAIMeshdata structures that can be excluded from the import using theProcess_RemoveComponentstep.static intaiDefaultLogStream_DEBUGGER
aiDefaultLogStream_FILE
aiDefaultLogStream_STDERR
aiDefaultLogStream_STDOUTEnumerates predefined log streaming destinations.static intaiImporterFlags_Experimental
aiImporterFlags_LimitedSupport
aiImporterFlags_SupportBinaryFlavour
aiImporterFlags_SupportCompressedFlavour
aiImporterFlags_SupportTextFlavourMixed set of flags forAIImporterDesc, indicating some features common to many importers.static intaiLightSource_AMBIENT
aiLightSource_AREA
aiLightSource_DIRECTIONAL
aiLightSource_POINT
aiLightSource_SPOT
aiLightSource_UNDEFINEDEnumerates all supported types of light sources.static intaiMorphingMethod_MORPH_NORMALIZED
aiMorphingMethod_MORPH_RELATIVE
aiMorphingMethod_VERTEX_BLENDEnumerates the methods of mesh morphing supported by Assimp.static intaiOrigin_CUR
aiOrigin_END
aiOrigin_SETSeek origins (for the virtual file system API).static intaiPrimitiveType_LINE
aiPrimitiveType_POINT
aiPrimitiveType_POLYGON
aiPrimitiveType_TRIANGLEEnumerates the types of geometric primitives supported by Assimp.static intaiProcess_CalcTangentSpaceDefines the flags for all possible post processing steps.static intaiProcess_ConvertToLeftHandedProcess Presetsstatic intaiProcess_Debone
aiProcess_DropNormals
aiProcess_EmbedTextures
aiProcess_FindDegenerates
aiProcess_FindInstances
aiProcess_FindInvalidData
aiProcess_FixInfacingNormals
aiProcess_FlipUVs
aiProcess_FlipWindingOrder
aiProcess_ForceGenNormals
aiProcess_GenBoundingBoxes
aiProcess_GenNormals
aiProcess_GenSmoothNormals
aiProcess_GenUVCoords
aiProcess_GlobalScale
aiProcess_ImproveCacheLocality
aiProcess_JoinIdenticalVertices
aiProcess_LimitBoneWeights
aiProcess_MakeLeftHanded
aiProcess_OptimizeGraph
aiProcess_OptimizeMeshes
aiProcess_PreTransformVertices
aiProcess_RemoveComponent
aiProcess_RemoveRedundantMaterials
aiProcess_SortByPType
aiProcess_SplitByBoneCount
aiProcess_SplitLargeMeshes
aiProcess_TransformUVCoords
aiProcess_Triangulate
aiProcess_ValidateDataStructureDefines the flags for all possible post processing steps.static intaiProcessPreset_TargetRealtime_Fast
aiProcessPreset_TargetRealtime_MaxQuality
aiProcessPreset_TargetRealtime_QualityProcess Presetsstatic intaiPTI_Buffer
aiPTI_Double
aiPTI_Float
aiPTI_Integer
aiPTI_StringA very primitive RTTI system for the contents of material properties.static intaiReturn_FAILURE
aiReturn_OUTOFMEMORY
aiReturn_SUCCESSStandard return type for some library functions.static intaiShadingMode_Blinn
aiShadingMode_CookTorrance
aiShadingMode_Flat
aiShadingMode_Fresnel
aiShadingMode_Gouraud
aiShadingMode_Minnaert
aiShadingMode_NoShading
aiShadingMode_OrenNayar
aiShadingMode_Phong
aiShadingMode_ToonDefines all shading models supported by the library.static intaiTextureFlags_IgnoreAlpha
aiTextureFlags_Invert
aiTextureFlags_UseAlphaDefines some mixed flags for a particular texture.static intaiTextureMapMode_Clamp
aiTextureMapMode_Decal
aiTextureMapMode_Mirror
aiTextureMapMode_WrapDefines how UV coordinates outside the [0...1] range are handled.static intaiTextureMapping_BOX
aiTextureMapping_CYLINDER
aiTextureMapping_OTHER
aiTextureMapping_PLANE
aiTextureMapping_SPHERE
aiTextureMapping_UVDefines how the mapping coords for a texture are generated.static intaiTextureOp_Add
aiTextureOp_Divide
aiTextureOp_Multiply
aiTextureOp_SignedAdd
aiTextureOp_SmoothAdd
aiTextureOp_SubtractDefines how the Nth texture of a specific type is combined with the result of all previous layers.static intaiTextureType_AMBIENT
aiTextureType_DIFFUSE
aiTextureType_DISPLACEMENT
aiTextureType_EMISSIVE
aiTextureType_HEIGHT
aiTextureType_LIGHTMAP
aiTextureType_NONE
aiTextureType_NORMALS
aiTextureType_OPACITY
aiTextureType_REFLECTION
aiTextureType_SHININESS
aiTextureType_SPECULAR
aiTextureType_UNKNOWNDefines the purpose of a texture.static intASSIMP_CFLAGS_DEBUGAssimp was compiled as a debug buildstatic intASSIMP_CFLAGS_NOBOOSTAssimp was compiled withASSIMP_BUILD_BOOST_WORKAROUNDdefinedstatic intASSIMP_CFLAGS_SHAREDAssimp was compiled as a shared object (Windows: DLL)static intASSIMP_CFLAGS_SINGLETHREADEDAssimp was compiled withASSIMP_BUILD_SINGLETHREADEDdefinedstatic intASSIMP_CFLAGS_STLPORTAssimp was compiled against STLportstatic intMAXLENMaximum dimension for strings, ASSIMP strings are zero terminated.static intPP_ICL_PTCACHE_SIZEDefault values for configuration properties.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static floatAI_DEG_TO_RAD(float x)Tiny macro to convert from degrees to radiansstatic floatAI_RAD_TO_DEG(float x)Tiny macro to convert from radians to degreesstatic AISceneaiApplyPostProcessing(AIScene pScene, int pFlags)Apply post-processing to an already-imported scene.static voidaiAttachLogStream(AILogStream stream)Attach a custom log stream to the libraries' logging system.static intaiComponent_COLORSn(int n)Remove a specific color channel 'n'static intaiComponent_TEXCOORDSn(int n)Remove a specific UV channel 'n'static AISceneaiCopyScene(AIScene pIn)Create a modifiable copy of a scene.static voidaiCopyScene(AIScene pIn, org.lwjgl.PointerBuffer pOut)Create a modifiable copy of a scene.static AIPropertyStoreaiCreatePropertyStore()Create an empty property store.static voidaiCreateQuaternionFromMatrix(AIQuaternion quat, AIMatrix3x3 mat)Construct a quaternion from a 3x3 rotation matrix.static voidaiDecomposeMatrix(AIMatrix4x4 mat, AIVector3D scaling, AIQuaternion rotation, AIVector3D position)Decompose a transformation matrix into its rotational, translational and scaling components.static voidaiDetachAllLogStreams()Detach all active log streams from the libraries' logging system.static intaiDetachLogStream(AILogStream stream)Detach a custom log stream from the libraries' logging system.static voidaiEnableVerboseLogging(boolean d)Enable verbose logging.static intaiExportScene(AIScene pScene, java.lang.CharSequence pFormatId, java.lang.CharSequence pFileName, int pPreProcessing)Exports the given scene to a chosen file format and writes the result file(s) to disk.static intaiExportScene(AIScene pScene, java.nio.ByteBuffer pFormatId, java.nio.ByteBuffer pFileName, int pPreProcessing)Exports the given scene to a chosen file format and writes the result file(s) to disk.static intaiExportSceneEx(AIScene pScene, java.lang.CharSequence pFormatId, java.lang.CharSequence pFileName, AIFileIO pIO, int pPreProcessing)Exports the given scene to a chosen file format using custom IO logic supplied by you.static intaiExportSceneEx(AIScene pScene, java.nio.ByteBuffer pFormatId, java.nio.ByteBuffer pFileName, AIFileIO pIO, int pPreProcessing)Exports the given scene to a chosen file format using custom IO logic supplied by you.static AIExportDataBlobaiExportSceneToBlob(AIScene pScene, java.lang.CharSequence pFormatId, int pPreProcessing)Exports the given scene to a chosen file format.static AIExportDataBlobaiExportSceneToBlob(AIScene pScene, java.nio.ByteBuffer pFormatId, int pPreProcessing)Exports the given scene to a chosen file format.static voidaiFreeScene(AIScene pIn)Frees a scene copy created usingCopyScenestatic java.lang.StringaiGetBranchName()Returns the branch name of the Assimp runtime.static intaiGetCompileFlags()Returns assimp's compile flags.static java.lang.StringaiGetErrorString()Returns the error text of the last failed import process.static longaiGetExportFormatCount()Returns the number of export file formats available in the current Assimp build.static AIExportFormatDescaiGetExportFormatDescription(long pIndex)Returns a description of the nth export file format.static voidaiGetExtensionList(AIString szOut)Get a list of all file extensions supported by ASSIMP.static AIImporterDescaiGetImporterDesc(java.lang.CharSequence extension)Returns the Importer description for a given extension.static AIImporterDescaiGetImporterDesc(java.nio.ByteBuffer extension)Returns the Importer description for a given extension.static longaiGetImportFormatCount()Returns the number of import file formats available in the current Assimp build.static AIImporterDescaiGetImportFormatDescription(long pIndex)Returns a description of the nth import file format.static java.lang.StringaiGetLegalString()Returns a string with legal copyright and licensing information about Assimp.static intaiGetMaterialColor(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIColor4D pOut)Retrieve a color value with a specific key from a material.static intaiGetMaterialColor(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIColor4D pOut)Retrieve a color value with a specific key from a material.static intaiGetMaterialFloatArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, float[] pOut, int[] pMax)Array version of:GetMaterialFloatArraystatic intaiGetMaterialFloatArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, java.nio.FloatBuffer pOut, java.nio.IntBuffer pMax)Retrieve an array of float values with a specific key from the material.static intaiGetMaterialFloatArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, float[] pOut, int[] pMax)Array version of:GetMaterialFloatArraystatic intaiGetMaterialFloatArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, java.nio.FloatBuffer pOut, java.nio.IntBuffer pMax)Retrieve an array of float values with a specific key from the material.static intaiGetMaterialIntegerArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, int[] pOut, int[] pMax)Array version of:GetMaterialIntegerArraystatic intaiGetMaterialIntegerArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, java.nio.IntBuffer pOut, java.nio.IntBuffer pMax)Retrieve an array of integer values with a specific key from a material.static intaiGetMaterialIntegerArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, int[] pOut, int[] pMax)Array version of:GetMaterialIntegerArraystatic intaiGetMaterialIntegerArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, java.nio.IntBuffer pOut, java.nio.IntBuffer pMax)Retrieve an array of integer values with a specific key from a material.static intaiGetMaterialProperty(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, org.lwjgl.PointerBuffer mPropOut)Retrieve a material property with a specific key from the material.static intaiGetMaterialProperty(AIMaterial pMat, java.lang.CharSequence pKey, org.lwjgl.PointerBuffer mPropOut)Retrieve a material property with a specific key from the material.static intaiGetMaterialProperty(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, org.lwjgl.PointerBuffer mPropOut)Retrieve a material property with a specific key from the material.static intaiGetMaterialProperty(AIMaterial pMat, java.nio.ByteBuffer pKey, org.lwjgl.PointerBuffer mPropOut)Retrieve a material property with a specific key from the material.static intaiGetMaterialString(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIString pOut)Retrieve a string value with a specific key from a material.static intaiGetMaterialString(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIString pOut)Retrieve a string value with a specific key from a material.static intaiGetMaterialTexture(AIMaterial pMat, int type, int index, AIString path, int[] mapping, int[] uvindex, float[] blend, int[] op, int[] mapmode, int[] flags)Array version of:GetMaterialTexturestatic intaiGetMaterialTexture(AIMaterial pMat, int type, int index, AIString path, java.nio.IntBuffer mapping, java.nio.IntBuffer uvindex, java.nio.FloatBuffer blend, java.nio.IntBuffer op, java.nio.IntBuffer mapmode, java.nio.IntBuffer flags)Helper function to get all values pertaining to a particular texture slot from a material structure.static intaiGetMaterialTextureCount(AIMaterial pMat, int type)Get the number of textures for a particular texture type.static intaiGetMaterialUVTransform(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIUVTransform pOut)Retrieve a UVTransform value with a specific key from a material.static intaiGetMaterialUVTransform(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIUVTransform pOut)Retrieve a UVTransform value with a specific key from a material.static voidaiGetMemoryRequirements(AIScene pIn, AIMemoryInfo in)Get the approximated storage required by an imported asset.static intaiGetVersionMajor()Returns the current major version number of Assimp.static intaiGetVersionMinor()Returns the current minor version number of Assimp.static intaiGetVersionRevision()Returns the repository revision of the Assimp runtime.static voidaiIdentityMatrix3(AIMatrix3x3 mat)Get a 3x3 identity matrix.static voidaiIdentityMatrix4(AIMatrix4x4 mat)Get a 4x4 identity matrix.static AISceneaiImportFile(java.lang.CharSequence pFile, int pFlags)Reads the given file and returns its content.static AISceneaiImportFile(java.nio.ByteBuffer pFile, int pFlags)Reads the given file and returns its content.static AISceneaiImportFileEx(java.lang.CharSequence pFile, int pFlags, AIFileIO pFS)Reads the given file using user-defined I/O functions and returns its content.static AISceneaiImportFileEx(java.nio.ByteBuffer pFile, int pFlags, AIFileIO pFS)Reads the given file using user-defined I/O functions and returns its content.static AISceneaiImportFileExWithProperties(java.lang.CharSequence pFile, int pFlags, AIFileIO pFS, AIPropertyStore pProps)Same asImportFileEx, but adds an extra parameter containing importer settings.static AISceneaiImportFileExWithProperties(java.nio.ByteBuffer pFile, int pFlags, AIFileIO pFS, AIPropertyStore pProps)Same asImportFileEx, but adds an extra parameter containing importer settings.static AISceneaiImportFileFromMemory(java.nio.ByteBuffer pBuffer, int pFlags, java.lang.CharSequence pHint)Reads the given file from a given memory buffer.static AISceneaiImportFileFromMemory(java.nio.ByteBuffer pBuffer, int pFlags, java.nio.ByteBuffer pHint)Reads the given file from a given memory buffer.static AISceneaiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer, int pFlags, java.lang.CharSequence pHint, AIPropertyStore pProps)Same asImportFileFromMemory, but adds an extra parameter containing importer settings.static AISceneaiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer, int pFlags, java.nio.ByteBuffer pHint, AIPropertyStore pProps)Same asImportFileFromMemory, but adds an extra parameter containing importer settings.static booleanaiIsExtensionSupported(java.lang.CharSequence szExtension)Returns whether a given file extension is supported by ASSIMP.static booleanaiIsExtensionSupported(java.nio.ByteBuffer szExtension)Returns whether a given file extension is supported by ASSIMP.static voidaiMultiplyMatrix3(AIMatrix3x3 dst, AIMatrix3x3 src)Multiply two 3x3 matrices.static voidaiMultiplyMatrix4(AIMatrix4x4 dst, AIMatrix4x4 src)Multiply two 4x4 matrices.static voidaiReleaseExportBlob(AIExportDataBlob pData)Releases the memory associated with the given exported data.static voidaiReleaseExportFormatDescription(AIExportFormatDesc desc)Release a description of the nth export file format.static voidaiReleaseImport(AIScene pScene)Releases all resources associated with the given import process.static voidaiReleasePropertyStore(AIPropertyStore p)Delete a property store.static voidaiSetImportPropertyFloat(AIPropertyStore store, java.lang.CharSequence szName, float value)Set an floating-point property.static voidaiSetImportPropertyFloat(AIPropertyStore store, java.nio.ByteBuffer szName, float value)Set an floating-point property.static voidaiSetImportPropertyInteger(AIPropertyStore store, java.lang.CharSequence szName, int value)Set an integer property.static voidaiSetImportPropertyInteger(AIPropertyStore store, java.nio.ByteBuffer szName, int value)Set an integer property.static voidaiSetImportPropertyMatrix(AIPropertyStore store, java.lang.CharSequence szName, AIMatrix4x4 value)Set a matrix property.static voidaiSetImportPropertyMatrix(AIPropertyStore store, java.nio.ByteBuffer szName, AIMatrix4x4 value)Set a matrix property.static voidaiSetImportPropertyString(AIPropertyStore store, java.lang.CharSequence szName, AIString value)Set a string property.static voidaiSetImportPropertyString(AIPropertyStore store, java.nio.ByteBuffer szName, AIString value)Set a string property.static voidaiTransformVecByMatrix3(AIVector3D vec, AIMatrix3x3 mat)Transform a vector by a 3x3 matrixstatic voidaiTransformVecByMatrix4(AIVector3D vec, AIMatrix4x4 mat)Transform a vector by a 4x4 matrixstatic voidaiTransposeMatrix3(AIMatrix3x3 mat)Transpose a 3x3 matrix.static voidaiTransposeMatrix4(AIMatrix4x4 mat)Transpose a 4x4 matrix.static org.lwjgl.system.SharedLibrarygetLibrary()Returns the assimpSharedLibrary.static longnaiApplyPostProcessing(long pScene, int pFlags)Unsafe version of:ApplyPostProcessingstatic voidnaiAttachLogStream(long stream)Unsafe version of:AttachLogStreamstatic voidnaiCopyScene(long pIn, long pOut)Unsafe version of:CopyScenestatic longnaiCreatePropertyStore()Unsafe version of:CreatePropertyStorestatic voidnaiCreateQuaternionFromMatrix(long quat, long mat)Unsafe version of:CreateQuaternionFromMatrixstatic voidnaiDecomposeMatrix(long mat, long scaling, long rotation, long position)Unsafe version of:DecomposeMatrixstatic intnaiDetachLogStream(long stream)Unsafe version of:DetachLogStreamstatic intnaiExportScene(long pScene, long pFormatId, long pFileName, int pPreProcessing)Unsafe version of:ExportScenestatic intnaiExportSceneEx(long pScene, long pFormatId, long pFileName, long pIO, int pPreProcessing)Unsafe version of:ExportSceneExstatic longnaiExportSceneToBlob(long pScene, long pFormatId, int pPreProcessing)Unsafe version of:ExportSceneToBlobstatic voidnaiFreeScene(long pIn)Unsafe version of:FreeScenestatic longnaiGetBranchName()Unsafe version of:GetBranchNamestatic longnaiGetErrorString()Unsafe version of:GetErrorStringstatic longnaiGetExportFormatDescription(long pIndex)Unsafe version of:GetExportFormatDescriptionstatic voidnaiGetExtensionList(long szOut)Unsafe version of:GetExtensionListstatic longnaiGetImporterDesc(long extension)Unsafe version of:GetImporterDescstatic longnaiGetImportFormatDescription(long pIndex)Unsafe version of:GetImportFormatDescriptionstatic longnaiGetLegalString()Unsafe version of:GetLegalStringstatic intnaiGetMaterialColor(long pMat, long pKey, int type, int index, long pOut)Unsafe version of:GetMaterialColorstatic intnaiGetMaterialFloatArray(long pMat, long pKey, int type, int index, long pOut, long pMax)Unsafe version of:GetMaterialFloatArraystatic intnaiGetMaterialIntegerArray(long pMat, long pKey, int type, int index, long pOut, long pMax)Unsafe version of:GetMaterialIntegerArraystatic intnaiGetMaterialProperty(long pMat, long pKey, int type, int index, long mPropOut)Unsafe version of:GetMaterialPropertystatic intnaiGetMaterialString(long pMat, long pKey, int type, int index, long pOut)Unsafe version of:GetMaterialStringstatic intnaiGetMaterialTexture(long pMat, int type, int index, long path, long mapping, long uvindex, long blend, long op, long mapmode, long flags)Unsafe version of:GetMaterialTexturestatic intnaiGetMaterialTextureCount(long pMat, int type)Unsafe version of:GetMaterialTextureCountstatic intnaiGetMaterialUVTransform(long pMat, long pKey, int type, int index, long pOut)Unsafe version of:GetMaterialUVTransformstatic voidnaiGetMemoryRequirements(long pIn, long in)Unsafe version of:GetMemoryRequirementsstatic voidnaiIdentityMatrix3(long mat)Unsafe version of:IdentityMatrix3static voidnaiIdentityMatrix4(long mat)Unsafe version of:IdentityMatrix4static longnaiImportFile(long pFile, int pFlags)Unsafe version of:ImportFilestatic longnaiImportFileEx(long pFile, int pFlags, long pFS)Unsafe version of:ImportFileExstatic longnaiImportFileExWithProperties(long pFile, int pFlags, long pFS, long pProps)Unsafe version of:ImportFileExWithPropertiesstatic longnaiImportFileFromMemory(long pBuffer, int pLength, int pFlags, long pHint)Unsafe version of:ImportFileFromMemorystatic longnaiImportFileFromMemoryWithProperties(long pBuffer, int pLength, int pFlags, long pHint, long pProps)Unsafe version of:ImportFileFromMemoryWithPropertiesstatic intnaiIsExtensionSupported(long szExtension)Unsafe version of:IsExtensionSupportedstatic voidnaiMultiplyMatrix3(long dst, long src)Unsafe version of:MultiplyMatrix3static voidnaiMultiplyMatrix4(long dst, long src)Unsafe version of:MultiplyMatrix4static voidnaiReleaseExportBlob(long pData)Unsafe version of:ReleaseExportBlobstatic voidnaiReleaseExportFormatDescription(long desc)Unsafe version of:ReleaseExportFormatDescriptionstatic voidnaiReleaseImport(long pScene)Unsafe version of:ReleaseImportstatic voidnaiReleasePropertyStore(long p)Unsafe version of:ReleasePropertyStorestatic voidnaiSetImportPropertyFloat(long store, long szName, float value)Unsafe version of:SetImportPropertyFloatstatic voidnaiSetImportPropertyInteger(long store, long szName, int value)Unsafe version of:SetImportPropertyIntegerstatic voidnaiSetImportPropertyMatrix(long store, long szName, long value)Unsafe version of:SetImportPropertyMatrixstatic voidnaiSetImportPropertyString(long store, long szName, long value)Unsafe version of:SetImportPropertyStringstatic voidnaiTransformVecByMatrix3(long vec, long mat)Unsafe version of:TransformVecByMatrix3static voidnaiTransformVecByMatrix4(long vec, long mat)Unsafe version of:TransformVecByMatrix4static voidnaiTransposeMatrix3(long mat)Unsafe version of:TransposeMatrix3static voidnaiTransposeMatrix4(long mat)Unsafe version of:TransposeMatrix4
-
-
-
Field Detail
-
AI_CONFIG_GLOB_MEASURE_TIME
Enables time measurements.If enabled, measures the time needed for each part of the loading process (i.e. IO time, importing, postprocessing, ..) and dumps these timings to the DefaultLogger. See the Performance Page for more information on this topic.
Property type: bool. Default value: false.
-
AI_CONFIG_IMPORT_NO_SKELETON_MESHES
Global setting to disable generation of skeleton dummy meshesSkeleton dummy meshes are generated as a visualization aid in cases which the input data contains no geometry, but only animation data.
Property data type: bool. Default value: false
-
AI_CONFIG_PP_SBBC_MAX_BONES
Maximum bone count per mesh for theProcess_SplitByBoneCountstep.Meshes are split until the maximum number of bones is reached. The default value is
AI_SBBC_DEFAULT_MAX_BONES, which may be altered at compile-time.Property data type: integer.
-
AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE
Specifies the maximum angle that may be between two vertex tangents that their tangents and bi-tangents are smoothed.This applies to the
Process_CalcTangentSpacestep. The angle is specified in degrees. The maximum value is 175.Property type: float. Default value: 45 degrees
-
AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX
Source UV channel for tangent space computation.The specified channel must exist or an error will be raised.
Property type: integer. Default value: 0
-
AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE
Specifies the maximum angle that may be between two face normals at the same vertex position that their are smoothed together.Sometimes referred to as 'crease angle'. This applies to the
Process_GenSmoothNormalsstep. The angle is specified in degrees, so 180 is PI. The default value is 175 degrees (all vertex normals are smoothed). The maximum value is 175, too.Property type: float.
Warning: setting this option may cause a severe loss of performance. The performance is unaffected if the
AI_CONFIG_FAVOUR_SPEEDflag is set but the output quality may be reduced.
-
AI_CONFIG_IMPORT_MDL_COLORMAP
Sets the colormap (= palette) to be used to decode embedded textures in MDL (Quake or 3DGS) files.This must be a valid path to a file. The file is 768 (256*3) bytes large and contains RGB triplets for each of the 256 palette entries. The default value is colormap.lmp. If the file is not found, a default palette (from Quake 1) is used.
Property type: string.
-
AI_CONFIG_PP_RRM_EXCLUDE_LIST
Configures theProcess_RemoveRedundantMaterialsstep to keep materials matching a name in a given list.This is a list of 1 to n strings, ' ' serves as delimiter character. Identifiers containing whitespaces must be enclosed in *single* quotation marks. For example:
"keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'". If a material matches on of these names, it will not be modified or removed by the postprocessing step nor will other materials be replaced by a reference to it.This option might be useful if you are using some magic material names to pass additional semantics through the content pipeline. This ensures they won't be optimized away, but a general optimization is still performed for materials not contained in the list.
Property type: String. Default value: n/a
Note
Linefeeds, tabs or carriage returns are treated as whitespace. Material names are case sensitive.
-
AI_CONFIG_PP_PTV_KEEP_HIERARCHY
Configures theProcess_PreTransformVerticesstep to keep the scene hierarchy. Meshes are moved to worldspace, but no optimization is performed (read: meshes with equal materials are not joined. The total number of meshes won't change).This option could be of use for you if the scene hierarchy contains important additional information which you intend to parse. For rendering, you can still render all meshes in the scene without any transformations.
Property type: bool. Default value: false.
-
AI_CONFIG_PP_PTV_NORMALIZE
Configures theProcess_PreTransformVerticesstep to normalize all vertex components into the[-1,1]range. That is, a bounding box for the whole scene is computed, the maximum component is taken and all meshes are scaled appropriately (uniformly of course!). This might be useful if you don't know the spatial dimension of the input data.
-
AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION
Configures theProcess_PreTransformVerticesstep to use a users defined matrix as the scene root node transformation before transforming vertices.Property type: bool. Default value: false.
-
AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION
Configures theProcess_PreTransformVerticesstep to use a users defined matrix as the scene root node transformation before transforming vertices. This property corresponds to the 'a1' component of the transformation matrix.Property type: aiMatrix4x4.
-
AI_CONFIG_PP_FD_REMOVE
Configures theProcess_FindDegeneratesstep to remove degenerated primitives from the import - immediately.The default behaviour converts degenerated triangles to lines and degenerated lines to points. See the documentation to the
Process_FindDegeneratesstep for a detailed example of the various ways to get rid of these lines and points if you don't want them.Property type: bool. Default value: false.
-
AI_CONFIG_PP_FD_CHECKAREA
Configures theProcess_FindDegeneratesto check the area of a triangle to be greater than e-6. If this is not the case the triangle will be removed ifAI_CONFIG_PP_FD_REMOVEis set to true.Property type: bool. Default value: false.
-
AI_CONFIG_PP_OG_EXCLUDE_LIST
Configures theProcess_OptimizeGraphstep to preserve nodes matching a name in a given list.This is a list of 1 to n strings, ' ' serves as delimiter character. Identifiers containing whitespaces must be enclosed in *single* quotation marks. For example:
"keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'". If a node matches on of these names, it will not be modified or removed by the postprocessing step.This option might be useful if you are using some magic node names to pass additional semantics through the content pipeline. This ensures they won't be optimized away, but a general optimization is still performed for nodes not contained in the list.
Property type: String. Default value: n/a
Note
Linefeeds, tabs or carriage returns are treated as whitespace. Node names are case sensitive.
-
AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
Set the maximum number of triangles in a mesh.This is used by the
Process_SplitLargeMeshesPostProcess-Step to determine whether a mesh must be split or not.Property type: integer.
Note
The default value is
AI_SLM_DEFAULT_MAX_TRIANGLES
-
AI_CONFIG_PP_SLM_VERTEX_LIMIT
Set the maximum number of vertices in a mesh.This is used by the
Process_SplitLargeMeshesPostProcess-Step to determine whether a mesh must be split or not.Property type: integer.
Note
The default value is
AI_SLM_DEFAULT_MAX_VERTICES
-
AI_CONFIG_PP_LBW_MAX_WEIGHTS
Set the maximum number of bones affecting a single vertex.This is used by the
Process_LimitBoneWeightsPostProcess-Step.Property type: integer.
Note
The default value is
AI_LBW_MAX_WEIGHTS
-
AI_CONFIG_PP_DB_THRESHOLD
Lower the deboning threshold in order to remove more bones.This is used by the
Process_DebonePostProcess-Step.Property type: float.
Note
The default value is
AI_DEBONE_THRESHOLD
-
AI_CONFIG_PP_DB_ALL_OR_NONE
Require all bones qualify for deboning before removing any.This is used by the
Process_DebonePostProcess-Step.Property type: bool.
Note
The default value is 0
-
AI_CONFIG_PP_ICL_PTCACHE_SIZE
Set the size of the post-transform vertex cache to optimize the vertices for. This configures theProcess_ImproveCacheLocalitystep.The size is given in vertices. Of course you can't know how the vertex format will exactly look like after the import returns, but you can still guess what your meshes will probably have.
Property type: integer.
Note
The default value is
PP_ICL_PTCACHE_SIZE. That results in slight performance improvements for most nVidia/AMD cards since 2002.
-
AI_CONFIG_PP_RVC_FLAGS
Input parameter to theProcess_RemoveComponentstep: Specifies the parts of the data structure to be removed.See the documentation to this step for further details. The property is expected to be an integer, a bitwise combination of the
aiComponentflags. The default value is 0. Important: if no valid mesh is remaining after the step has been executed (e.g you thought it was funny to specify ALL of the flags defined above) the import FAILS. Mainly because there is no data to work on anymore ...
-
AI_CONFIG_PP_SBP_REMOVE
Input parameter to theProcess_SortByPTypestep: Specifies which primitive types are removed by the step.This is a bitwise combination of the
aiPrimitiveTypeflags. Specifying all of them is illegal, of course. A typical use would be to exclude all line and point meshes from the import.This is an integer property, its default value is 0.
-
AI_CONFIG_PP_FID_ANIM_ACCURACY
Input parameter to theProcess_FindInvalidDatastep: Specifies the floating-point accuracy for animation values.The step checks for animation tracks where all frame values are absolutely equal and removes them. This tweakable controls the epsilon for floating-point comparisons - two keys are considered equal if the invariant
abs(n0-n1)>epsilonholds true for all vector respectively quaternion components.The default value is 0.f - comparisons are exact then.
-
AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS
Input parameter to theProcess_FindInvalidDatastep: Set to true to ignore texture coordinates.This may be useful if you have to assign different kind of textures like one for the summer or one for the winter.
-
AI_CONFIG_PP_TUV_EVALUATE
Input parameter to theProcess_TransformUVCoordsstep: Specifies which UV transformations are evaluated.This is a bitwise combination of the
AI_UVTRAFO_XXXflags (integer property, of course). By default all transformations are enabled (AI_UVTRAFO_ALL).
-
AI_CONFIG_FAVOUR_SPEED
A hint to assimp to favour speed against import quality.Enabling this option may result in faster loading, but it needn't. It represents just a hint to loaders and post-processing steps to use faster code paths, if possible.
This property is expected to be an integer, != 0 stands for true. The default value is 0.
-
AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS
Set whether the fbx importer will merge all geometry layers present in the source file or take only the first.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS
Set whether the fbx importer will read all materials present in the source file or take only the referenced materials.This is void unless
IMPORT_FBX_READ_MATERIALS=1.Property type: bool. The default value is false (0)
-
AI_CONFIG_IMPORT_FBX_READ_MATERIALS
Set whether the fbx importer will read materials.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_READ_TEXTURES
Set whether the fbx importer will read embedded textures.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_READ_CAMERAS
Set whether the fbx importer will read cameras.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_READ_LIGHTS
Set whether the fbx importer will read light sources.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS
Set whether the fbx importer will read animations.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_STRICT_MODE
Set whether the fbx importer will act in strict mode in which only FBX 2013 is supported and any other sub formats are rejected. FBX 2013 is the primary target for the importer, so this format is best supported and well-tested.Property type: bool. The default value is false (0)
-
AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS
Set whether the fbx importer will preserve pivot points for transformations (as extra nodes). If set to false, pivots and offsets will be evaluated whenever possible.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES
Specifies whether the importer will drop empty animation curves or animation curves which match the bind pose transformation over their entire defined range.Property type: bool. The default value is true (1)
-
AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING
Set whether the fbx importer will use the legacy embedded texture naming.Property type: bool. The default value is false (0)
-
AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES
Set whether the importer shall not remove empty bones.Empty bones are often used to define connections for other models.
Property type: bool. The default value is false (0)
-
AI_CONFIG_FBX_CONVERT_TO_M
Set whether the FBX importer shall convert the unit from cm to m.Property type: bool. The default value is false (0)
-
AI_CONFIG_IMPORT_GLOBAL_KEYFRAME
Set the vertex animation keyframe to be imported.ASSIMP does not support vertex keyframes (only bone animation is supported). The library reads only one frame of models with vertex animations. By default this is the first frame.
Note
The default value is 0. This option applies to all importers. However, it is also possible to override the global setting for a specific loader. You can use the
AI_CONFIG_IMPORT_XXX_KEYFRAMEoptions (where XXX is a placeholder for the file format for which you want to override the global setting).Property type: integer.
-
AI_CONFIG_IMPORT_MD3_KEYFRAME
- See Also:
- Constant Field Values
-
AI_CONFIG_IMPORT_MD2_KEYFRAME
-
AI_CONFIG_IMPORT_MDL_KEYFRAME
-
AI_CONFIG_IMPORT_MDC_KEYFRAME
-
AI_CONFIG_IMPORT_SMD_KEYFRAME
-
AI_CONFIG_IMPORT_UNREAL_KEYFRAME
-
AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST
Smd load multiple animations.Property type: bool. Default value: true.
-
AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL
Configures the AC loader to collect all surfaces which have the "Backface cull" flag set in separate meshes.Property type: bool. Default value: true.
-
AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION
Configures whether the AC loader evaluates subdivision surfaces (indicated by the presence of the 'subdiv' attribute in the file). By default, Assimp performs the subdivision using the standard Catmull-Clark algorithm.Property type: bool. Default value: true.
-
AI_CONFIG_UNREAL_HANDLE_FLAGS
Configures the UNREAL 3D loader to separate faces with different surface flags (e.g. two-sided vs. single-sided).Property type: bool. Default value: true.
-
AI_CONFIG_IMPORT_TER_MAKE_UVS
Configures the terragen import plugin to compute uv's for terrains, if not given. Furthermore a default texture is assigned.UV coordinates for terrains are so simple to compute that you'll usually want to compute them on your own, if you need them. This option is intended for model viewers which want to offer an easy way to apply textures to terrains.
Property type: bool. Default value: false.
-
AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS
Configures the ASE loader to always reconstruct normal vectors basing on the smoothing groups loaded from the file.Some ASE files have carry invalid normals, other don't.
Property type: bool. Default value: true.
-
AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART
Configures the M3D loader to detect and process multi-part Quake player models.These models usually consist of 3 files, lower.md3, upper.md3 and head.md3. If this property is set to true, Assimp will try to load and * combine all three files if one of them is loaded.
Property type: bool. Default value: true.
-
AI_CONFIG_IMPORT_MD3_SKIN_NAME
Tells the MD3 loader which skin files to load.When loading MD3 files, Assimp checks whether a file
[md3_file_name]_[skin_name].skinis existing. These files are used by * Quake III to be able to assign different skins (e.g. red and blue team) to models. 'default', 'red', 'blue' are typical skin names.Property type: String. Default value: "default".
-
AI_CONFIG_IMPORT_MD3_SHADER_SRC
Specify the Quake 3 shader file to be used for a particular MD3 file. This can also be a search path.By default Assimp's behaviour is as follows: If a MD3 file
any_path/models/any_q3_subdir/model_name/file_name.md3is loaded, the library tries to locate the corresponding shader file inany_path/scripts/model_name.shader. This property overrides this behaviour. It can either specify a full path to the shader to be loaded or alternatively the path (relative or absolute) to the directory where the shaders for all MD3s to be loaded reside. Assimp attempts to openIMPORT_MD3_SHADER_SRC/model_name.shaderfirst,IMPORT_MD3_SHADER_SRC/file_name.shaderis the fallback file. Note thatIMPORT_MD3_SHADER_SRCshould have a terminal (back)slash.Property type: String. Default value: n/a.
-
AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY
Configures the LWO loader to load just one layer from the model.LWO files consist of layers and in some cases it could be useful to load only one of them. This property can be either a string - which specifies the name of the layer - or an integer - the index of the layer. If the property is not set the whole LWO model is loaded. Loading fails if the requested layer is not available. The layer index is zero-based and the layer name may not be empty.
Property type: Integer. Default value: all layers are loaded.
-
AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD
Configures the MD5 loader to not load the MD5ANIM file for a MD5MESH file automatically.The default strategy is to look for a file with the same name but the MD5ANIM extension in the same directory. If it is found, it is loaded * and combined with the MD5MESH file. This configuration option can be used to disable this behaviour.
Property type: bool. Default value: false.
-
AI_CONFIG_IMPORT_LWS_ANIM_START
Defines the begin of the time range for which the LWS loader evaluates animations and computesAINodeAnim's.Assimp provides full conversion of LightWave's envelope system, including pre and post conditions. The loader computes linearly subsampled animation chanels with the frame rate given in the LWS file. This property defines the start time. Note: animation channels are only generated if a node has at least one envelope with more tan one key assigned. This property is given in frames, '0' is the first frame. By default, if this property is not set, the importer takes the animation start from the input LWS file ('FirstFrame' line).
Property type: Integer. Default value: taken from file.
-
AI_CONFIG_IMPORT_LWS_ANIM_END
End of the imported time range.
-
AI_CONFIG_IMPORT_IRR_ANIM_FPS
Defines the output frame rate of the IRR loader.IRR animations are difficult to convert for Assimp and there will always be a loss of quality. This setting defines how many keys per second are returned by the converter.
Property type: integer. Default value: 100
-
AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE
Ogre Importer will try to find referenced materials from this file.Ogre meshes reference with material names, this does not tell Assimp the file where it is located in. Assimp will try to find the source file in the following order:
<material-name>.material,<mesh-filename-base>.materialand lastly the material name defined by this config property.Property type: String. Default value:
Scene.material.
-
AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME
Ogre Importer detect the texture usage from its filename.Ogre material texture units do not define texture type, the textures usage depends on the used shader or Ogre's fixed pipeline. If this config property is true Assimp will try to detect the type from the textures filename postfix: _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec, _specular and _specularmap for specular map, _l, _light, _lightmap, _occ and _occlusion for light map, _disp and _displacement for displacement map. The matching is case insensitive. Post fix is taken between the last underscore and the last period.
Default behavior is to detect type from lower cased texture unit name by matching against: normalmap, specularmap, lightmap and displacementmap. For both cases if no match is found
TextureType_DIFFUSEis used.Property type: Bool. Default value: false.
-
AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS
Specifies whether the IFC loader skips over IfcSpace elements.IfcSpace elements (and their geometric representations) are used to represent, well, free space in a building storey.
Property type: Bool. Default value: true.
-
AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT
Specifies whether the Android JNI asset extraction is supported.Turn on this option if you want to manage assets in native Android application without having to keep the internal directory and asset manager pointer.
-
AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS
Specifies whether the IFC loader skips over shape representations of type 'Curve2D'.A lot of files contain both a faceted mesh representation and a outline with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those, so turning this option off just clutters the log with errors.
Property type: Bool. Default value: true.
-
AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION
Specifies whether the IFC loader will use its own, custom triangulation algorithm to triangulate wall and floor meshes.If this property is set to false, walls will be either triangulated by
Process_Triangulateor will be passed through as huge polygons with faked holes (i.e. holes that are connected with the outer boundary using a dummy edge). It is highly recommended to set this property to true if you want triangulated data becauseProcess_Triangulateis known to have problems with the kind of polygons that the IFC loader spits out for complicated meshes.Property type: Bool. Default value: true.
-
AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE
Sets the tessellation conic angle for IFC smoothing curves.This is used by the IFC importer to determine the tessellation parameter for smoothing curves.
The default value is
AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLEand the accepted values are in range [5.0, 120.0].Property type: Float.
-
AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION
Set the tessellation for IFC cylindrical shapes.This is used by the IFC importer to determine the tessellation parameter for cylindrical shapes, i.e. the number of segments used to aproximate a circle.
The default value is
AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATIONand the accepted values are in range [3, 180].Property type: Integer.
-
AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION
Specifies whether the Collada loader will ignore the provided up direction.If this property is set to true, the up direction provided in the file header will be ignored and the file will be loaded as is.
Property type: Bool. Default value: false.
-
AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES
Specifies whether the Collada loader should use Collada names as node names.If this property is set to true, the Collada names will be used as the node name. The default is to use the id tag (resp. sid tag, if no id tag is present) instead.
Property type: Bool. Default value: false.
-
AI_CONFIG_EXPORT_XFILE_64BIT
Specifies the xfile use double for real values of float.Property type: Bool. Default value: false.
-
AI_CONFIG_EXPORT_POINT_CLOUDS
Specifies whether the assimp export shall be able to export point clouds.When this flag is not defined the render data has to contain valid faces. Point clouds are only a collection of vertices which have nor spatial organization by a face and the validation process will remove them. Enabling this feature will switch off the flag and enable the functionality to export pure point clouds.
Property type: Bool. Default value: false.
-
AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY
Specifies a global key factor for scale.Property type: float. Default value: 1.0f
-
AI_CONFIG_APP_SCALE_KEY
Specifies an application key factor for scale.Property type: float. Default value: 1.0f
-
AI_SBBC_DEFAULT_MAX_BONES, AI_SLM_DEFAULT_MAX_TRIANGLES, AI_SLM_DEFAULT_MAX_VERTICES, AI_LBW_MAX_WEIGHTS, PP_ICL_PTCACHE_SIZE, AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION
Default values for configuration properties.
-
AI_DEBONE_THRESHOLD, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE, AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT, AI_CONFIG_APP_SCALE_DEFAULT
Default value for configuration properties.
-
AI_UVTRAFO_SCALING, AI_UVTRAFO_ROTATION, AI_UVTRAFO_TRANSLATION, AI_UVTRAFO_ALL
UVCoord Transforms
-
aiComponent_NORMALS, aiComponent_TANGENTS_AND_BITANGENTS, aiComponent_COLORS, aiComponent_TEXCOORDS, aiComponent_BONEWEIGHTS, aiComponent_ANIMATIONS, aiComponent_TEXTURES, aiComponent_LIGHTS, aiComponent_CAMERAS, aiComponent_MESHES, aiComponent_MATERIALS
Enumerates components of theAISceneandAIMeshdata structures that can be excluded from the import using theProcess_RemoveComponentstep.See the documentation to
Process_RemoveComponentfor more details.Enum values:
Component_NORMALS- Normal vectorsComponent_TANGENTS_AND_BITANGENTS- Tangents and bitangents go always togetherComponent_COLORS- ALL color sets. UseComponent_COLORSnto specify the N'th set.Component_TEXCOORDS- ALL texture UV sets. UseComponent_TEXCOORDSnto specify the N'th set.Component_BONEWEIGHTS- Removes all bone weights from all meshes. The scenegraph nodes corresponding to the bones are NOT removed. use theProcess_OptimizeGraphstep to do this.Component_ANIMATIONS- Removes all node animations (AIScene::mAnimations). The corresponding scenegraph nodes are NOT removed. use theProcess_OptimizeGraphstep to do this.Component_TEXTURES- Removes all embedded texturesComponent_LIGHTS- Removes all light sources (AIScene::mLights). The corresponding scenegraph nodes are NOT removed. use theProcess_OptimizeGraphstep to do this.Component_CAMERAS- Removes all cameras (AIScene::mCameras). The corresponding scenegraph nodes are NOT removed. use theProcess_OptimizeGraphstep to do this.Component_MESHES- Removes all meshes (AIScene::mMeshes).Component_MATERIALS- Removes all materials. One default material will be generated, soAIScene::mNumMaterialswill be 1.
-
AI_MATH_PI, AI_MATH_TWO_PI, AI_MATH_HALF_PI, AI_MATH_PI_F, AI_MATH_TWO_PI_F, AI_MATH_HALF_PI_F
This is PI. Hi PI.
-
ai_epsilon
Numerical limits.
-
MAXLEN
Maximum dimension for strings, ASSIMP strings are zero terminated.
-
aiReturn_SUCCESS, aiReturn_FAILURE, aiReturn_OUTOFMEMORY
Standard return type for some library functions. Rarely used.Enum values:
Return_SUCCESS- Indicates that a function was successful.Return_FAILURE- Indicates that a function failed.Return_OUTOFMEMORY- Indicates that not enough memory is available to perform the requested operation.
-
aiOrigin_SET, aiOrigin_CUR, aiOrigin_END
Seek origins (for the virtual file system API).Enum values:
Origin_SET- Beginning of the fileOrigin_CUR- Current position of the file pointerOrigin_END- End of the file, offsets must be negative
-
aiDefaultLogStream_FILE, aiDefaultLogStream_STDOUT, aiDefaultLogStream_STDERR, aiDefaultLogStream_DEBUGGER
Enumerates predefined log streaming destinations.Enum values:
DefaultLogStream_FILE- Stream the log to a fileDefaultLogStream_STDOUT- Stream the log tostd::coutDefaultLogStream_STDERR- Stream the log tostd::cerrDefaultLogStream_DEBUGGER- MSVC only: Stream the log the the debugger (this relies onOutputDebugStringfrom the Win32 SDK)
-
aiAnimBehaviour_DEFAULT, aiAnimBehaviour_CONSTANT, aiAnimBehaviour_LINEAR, aiAnimBehaviour_REPEAT
Defines how an animation channel behaves outside the defined time range. This corresponds toAINodeAnim::mPreStateandAINodeAnim::mPostState.Enum values:
AnimBehaviour_DEFAULT- The value from the default node transformation is takenAnimBehaviour_CONSTANT- The nearest key value is used without interpolationAnimBehaviour_LINEAR- The value of the nearest two keys is linearly extrapolated for the current time value.AnimBehaviour_REPEAT- The animation is repeated. If the animation key go from n to m and the current time is t, use the value at(t-n) % (|m-n|).
-
aiImporterFlags_SupportTextFlavour, aiImporterFlags_SupportBinaryFlavour, aiImporterFlags_SupportCompressedFlavour, aiImporterFlags_LimitedSupport, aiImporterFlags_Experimental
Mixed set of flags forAIImporterDesc, indicating some features common to many importers.Enum values:
ImporterFlags_SupportTextFlavour- Indicates that there is a textual encoding of the file format; and that it is supported.ImporterFlags_SupportBinaryFlavour- Indicates that there is a binary encoding of the file format; and that it is supported.ImporterFlags_SupportCompressedFlavour- Indicates that there is a compressed encoding of the file format; and that it is supported.ImporterFlags_LimitedSupport- Indicates that the importer reads only a very particular subset of the file format. This happens commonly for declarative or procedural formats which cannot easily be mapped toAISceneImporterFlags_Experimental- Indicates that the importer is highly experimental and should be used with care. This only happens for trunk (i.e. SVN) versions, experimental code is not included in releases.
-
aiLightSource_UNDEFINED, aiLightSource_DIRECTIONAL, aiLightSource_POINT, aiLightSource_SPOT, aiLightSource_AMBIENT, aiLightSource_AREA
Enumerates all supported types of light sources. (enum aiLightSourceType)Enum values:
LightSource_UNDEFINED- Undefined or unknown light sourceLightSource_DIRECTIONAL- A directional light source has a well-defined direction but is infinitely far away. That's quite a good approximation for sun light.LightSource_POINT- A point light source has a well-defined position in space but no direction - it emits light in all directions. A normal bulb is a point light.LightSource_SPOT- A spot light source emits light in a specific angle. It has a position and a direction it is pointing to. A good example for a spot light is a light spot in sport arenas.LightSource_AMBIENT- The generic light level of the world, including the bounces of all other light sources. Typically, there's at most one ambient light in a scene. This light type doesn't have a valid position, direction, or other properties, just a color.LightSource_AREA- An area light is a rectangle with predefined size that uniformly emits light from one of its sides. The position is center of the rectangle and direction is its normal vector.
-
AI_DEFAULT_MATERIAL_NAME
Name for default materials (2nd is used if meshes have UV coords)
-
aiTextureOp_Multiply, aiTextureOp_Add, aiTextureOp_Subtract, aiTextureOp_Divide, aiTextureOp_SmoothAdd, aiTextureOp_SignedAdd
Defines how the Nth texture of a specific type is combined with the result of all previous layers.Enum values:
TextureOp_Multiply-T = T1 * T2TextureOp_Add-T = T1 + T2TextureOp_Subtract-T = T1 - T2TextureOp_Divide-T = T1 / T2TextureOp_SmoothAdd-T = (T1 + T2) - (T1 * T2)TextureOp_SignedAdd-T = T1 + (T2 - 0.5)
-
aiTextureMapMode_Wrap, aiTextureMapMode_Clamp, aiTextureMapMode_Decal, aiTextureMapMode_Mirror
Defines how UV coordinates outside the [0...1] range are handled. Commonly referred to as 'wrapping mode'.Enum values:
TextureMapMode_Wrap- A texture coordinateu|vis translated tou%1|v%1TextureMapMode_Clamp- Texture coordinates outside[0...1]are clamped to the nearest valid value.TextureMapMode_Decal- If the texture coordinates for a pixel are outside[0...1]the texture is not applied to that pixelTextureMapMode_Mirror- A texture coordinateu|vbecomesu%1|v%1if(u-(u%1))%2is zero and1-(u%1)|1-(v%1)otherwise
-
aiTextureMapping_UV, aiTextureMapping_SPHERE, aiTextureMapping_CYLINDER, aiTextureMapping_BOX, aiTextureMapping_PLANE, aiTextureMapping_OTHER
Defines how the mapping coords for a texture are generated.Real-time applications typically require full UV coordinates, so the use of the
Process_GenUVCoordsstep is highly recommended. It generates proper UV channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given.See the
_AI_MATKEY_MAPPING_BASEproperty for more details.Enum values:
TextureMapping_UV- The mapping coordinates are taken from an UV channel. The_AI_MATKEY_UVWSRC_BASEkey specifies from which UV channel the texture coordinates are to be taken from (remember, meshes can have more than one UV channel).TextureMapping_SPHERE- Spherical mappingTextureMapping_CYLINDER- Cylindrical mappingTextureMapping_BOX- Cubic mappingTextureMapping_PLANE- Planar mappingTextureMapping_OTHER- Undefined mapping. Have fun.
-
aiTextureType_NONE, aiTextureType_DIFFUSE, aiTextureType_SPECULAR, aiTextureType_AMBIENT, aiTextureType_EMISSIVE, aiTextureType_HEIGHT, aiTextureType_NORMALS, aiTextureType_SHININESS, aiTextureType_OPACITY, aiTextureType_DISPLACEMENT, aiTextureType_LIGHTMAP, aiTextureType_REFLECTION, aiTextureType_UNKNOWN
Defines the purpose of a texture.This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
Enum values:
TextureType_NONE- Dummy value. No texture, but the value to be used as 'texture semantic' (AIMaterialProperty::mSemantic) for all material properties *not* related to textures.TextureType_DIFFUSE- The texture is combined with the result of the diffuse lighting equation.TextureType_SPECULAR- The texture is combined with the result of the specular lighting equation.TextureType_AMBIENT- The texture is combined with the result of the ambient lighting equation.TextureType_EMISSIVE- The texture is added to the result of the lighting calculation. It isn't influenced by incoming light.TextureType_HEIGHT- The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height.TextureType_NORMALS- The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not distinguish here.TextureType_SHININESS- The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun.TextureType_OPACITY- The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun.TextureType_DISPLACEMENT- Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements.TextureType_LIGHTMAP- Lightmap texture (aka Ambient Occlusion). Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light.TextureType_REFLECTION- Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications.TextureType_UNKNOWN- Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is excluded from any further post-processing.
-
aiShadingMode_Flat, aiShadingMode_Gouraud, aiShadingMode_Phong, aiShadingMode_Blinn, aiShadingMode_Toon, aiShadingMode_OrenNayar, aiShadingMode_Minnaert, aiShadingMode_CookTorrance, aiShadingMode_NoShading, aiShadingMode_Fresnel
Defines all shading models supported by the library.The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
Enum values:
ShadingMode_Flat- Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'.ShadingMode_Gouraud- Simple Gouraud shading.ShadingMode_Phong- Phong-ShadingShadingMode_Blinn- Phong-Blinn-ShadingShadingMode_Toon- Toon-Shading per pixel. Also known as 'comic' shader.ShadingMode_OrenNayar- OrenNayar-Shading per pixel. Extension to standard Lambertian shading, taking the roughness of the material into accountShadingMode_Minnaert- Minnaert-Shading per pixel. Extension to standard Lambertian shading, taking the 'darkness' of the material into accountShadingMode_CookTorrance- CookTorrance-Shading per pixel. Special shader for metallic surfaces.ShadingMode_NoShading- No shading at all. Constant light influence of 1.0.ShadingMode_Fresnel- Fresnel shading
-
aiTextureFlags_Invert, aiTextureFlags_UseAlpha, aiTextureFlags_IgnoreAlpha
Defines some mixed flags for a particular texture.Usually you'll instruct your cg artists how textures have to look like and how they will be processed in your application. However, if you use Assimp for completely generic loading purposes you might also need to process these flags in order to display as many 'unknown' 3D models as possible correctly.
This corresponds to the
_AI_MATKEY_TEXFLAGS_BASEproperty.Enum values:
TextureFlags_Invert- The texture's color values have to be inverted (component-wise 1-n)TextureFlags_UseAlpha- Explicit request to the application to process the alpha channel of the texture. Mutually exclusive withTextureFlags_IgnoreAlpha. These flags are set if the library can say for sure that the alpha channel is used/is not used. If the model format does not define this, it is left to the application to decide whether the texture alpha channel - if any - is evaluated or not.TextureFlags_IgnoreAlpha- Explicit request to the application to ignore the alpha channel of the texture. Mutually exclusive withTextureFlags_UseAlpha.
-
aiBlendMode_Default, aiBlendMode_Additive
Defines alpha-blend flags.If you're familiar with OpenGL or D3D, these flags aren't new to you. They define *how* the final color value of a pixel is computed, basing on the previous color at that pixel and the new color value from the material.
Enum values:
BlendMode_Default-SourceColor*SourceAlpha + DestColor*(1-SourceAlpha)BlendMode_Additive-SourceColor*1 + DestColor*1
-
aiPTI_Float, aiPTI_Double, aiPTI_String, aiPTI_Integer, aiPTI_Buffer
A very primitive RTTI system for the contents of material properties.Enum values:
PTI_Float- Array of single-precision (32 Bit) floatsPTI_Double- Array of double-precision (64 Bit) floatsPTI_String- The material property is an aiString.PTI_Integer- Array of (32 Bit) integersPTI_Buffer- Simple binary buffer, content undefined. Not convertible to anything.
-
AI_MATKEY_NAME, AI_MATKEY_TWOSIDED, AI_MATKEY_SHADING_MODEL, AI_MATKEY_ENABLE_WIREFRAME, AI_MATKEY_BLEND_FUNC, AI_MATKEY_OPACITY, AI_MATKEY_TRANSPARENCYFACTOR, AI_MATKEY_BUMPSCALING, AI_MATKEY_SHININESS, AI_MATKEY_REFLECTIVITY, AI_MATKEY_SHININESS_STRENGTH, AI_MATKEY_REFRACTI, AI_MATKEY_COLOR_DIFFUSE, AI_MATKEY_COLOR_AMBIENT, AI_MATKEY_COLOR_SPECULAR, AI_MATKEY_COLOR_EMISSIVE, AI_MATKEY_COLOR_TRANSPARENT, AI_MATKEY_COLOR_REFLECTIVE, AI_MATKEY_GLOBAL_BACKGROUND_IMAGE, AI_MATKEY_GLOBAL_SHADERLANG, AI_MATKEY_SHADER_VERTEX, AI_MATKEY_SHADER_FRAGMENT, AI_MATKEY_SHADER_GEO, AI_MATKEY_SHADER_TESSELATION, AI_MATKEY_SHADER_PRIMITIVE, AI_MATKEY_SHADER_COMPUTE, _AI_MATKEY_TEXTURE_BASE, _AI_MATKEY_UVWSRC_BASE, _AI_MATKEY_TEXOP_BASE, _AI_MATKEY_MAPPING_BASE, _AI_MATKEY_TEXBLEND_BASE, _AI_MATKEY_MAPPINGMODE_U_BASE, _AI_MATKEY_MAPPINGMODE_V_BASE, _AI_MATKEY_TEXMAP_AXIS_BASE, _AI_MATKEY_UVTRANSFORM_BASE, _AI_MATKEY_TEXFLAGS_BASE
Material keys
-
aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR, aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR, aiAI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR, aiAI_MATKEY_GLTF_ALPHAMODE, aiAI_MATKEY_GLTF_ALPHACUTOFF, aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS, aiAI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR, aiAI_MATKEY_GLTF_UNLIT, ai_AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, ai_AI_MATKEY_GLTF_MAPPINGNAME_BASE, ai_AI_MATKEY_GLTF_MAPPINGID_BASE, ai_AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, ai_AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, ai_AI_MATKEY_GLTF_SCALE_BASE, ai_AI_MATKEY_GLTF_STRENGTH_BASE
PBR Material keys
-
AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE
- See Also:
- Constant Field Values
-
AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE
- See Also:
- Constant Field Values
-
AI_MAX_FACE_INDICES, AI_MAX_BONE_WEIGHTS
Maximum number of indices per face (polygon).
-
AI_MAX_VERTICES
Maximum number of vertices per mesh.
-
AI_MAX_FACES
Maximum number of faces per mesh.
-
AI_MAX_NUMBER_OF_COLOR_SETS
Supported number of vertex color sets per mesh.
-
AI_MAX_NUMBER_OF_TEXTURECOORDS
Supported number of texture coord sets (UV(W) channels) per mesh.
-
aiPrimitiveType_POINT, aiPrimitiveType_LINE, aiPrimitiveType_TRIANGLE, aiPrimitiveType_POLYGON
Enumerates the types of geometric primitives supported by Assimp.Enum values:
PrimitiveType_POINT- A point primitive. This is just a single vertex in the virtual world,AIFacecontains just one index for such a primitive.PrimitiveType_LINE- A line primitive. This is a line defined through a start and an end position.AIFacecontains exactly two indices for such a primitive.PrimitiveType_TRIANGLE- A triangular primitive. A triangle consists of three indices.PrimitiveType_POLYGON- A higher-level polygon with more than 3 edges. A triangle is a polygon, but polygon in this context means "all polygons that are not triangles". The "Triangulate"-Step is provided for your convenience, it splits all polygons in triangles (which are much easier to handle).
-
aiMorphingMethod_VERTEX_BLEND, aiMorphingMethod_MORPH_NORMALIZED, aiMorphingMethod_MORPH_RELATIVE
Enumerates the methods of mesh morphing supported by Assimp. (enum aiMorphingMethod)Enum values:
MorphingMethod_VERTEX_BLEND- Interpolation between morph targets.MorphingMethod_MORPH_NORMALIZED- Normalized morphing between morph targets.MorphingMethod_MORPH_RELATIVE- Relative morphing between morph targets.
-
AI_BOOL, AI_INT32, AI_UINT64, AI_FLOAT, AI_DOUBLE, AI_AISTRING, AI_AIVECTOR3D, AI_META_MAX
Enum used to distinguish data types.Enum values:
-
aiProcess_CalcTangentSpace, aiProcess_JoinIdenticalVertices, aiProcess_MakeLeftHanded, aiProcess_Triangulate, aiProcess_RemoveComponent, aiProcess_GenNormals, aiProcess_GenSmoothNormals, aiProcess_SplitLargeMeshes, aiProcess_PreTransformVertices, aiProcess_LimitBoneWeights, aiProcess_ValidateDataStructure, aiProcess_ImproveCacheLocality, aiProcess_RemoveRedundantMaterials, aiProcess_FixInfacingNormals, aiProcess_SortByPType, aiProcess_FindDegenerates, aiProcess_FindInvalidData, aiProcess_GenUVCoords, aiProcess_TransformUVCoords, aiProcess_FindInstances, aiProcess_OptimizeMeshes, aiProcess_OptimizeGraph, aiProcess_FlipUVs, aiProcess_FlipWindingOrder, aiProcess_SplitByBoneCount, aiProcess_Debone, aiProcess_GlobalScale, aiProcess_EmbedTextures, aiProcess_ForceGenNormals, aiProcess_DropNormals, aiProcess_GenBoundingBoxes
Defines the flags for all possible post processing steps.Enum values:
Process_CalcTangentSpace- Calculates the tangents and bitangents for the imported meshes.Does nothing if a mesh does not have normals. You might want this post processing step to be executed if you plan to use tangent space calculations such as normal mapping applied to the meshes. There's an importer property,
AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to specify a maximum smoothing angle for the algorithm. However, usually you'll want to leave it at the default value.Process_JoinIdenticalVertices- Identifies and joins identical vertex data sets within all imported meshes.After this step is run, each mesh contains unique vertices, so a vertex may be used by multiple faces. You usually want to use this post processing step. If your application deals with indexed geometry, this step is compulsory or you'll just waste rendering time. If this flag is not specified, no vertices are referenced by more than one face and no index buffer is required for rendering.
Process_MakeLeftHanded- Converts all the imported data to a left-handed coordinate space.By default the data is returned in a right-handed coordinate space (which OpenGL prefers). In this space, +X points to the right, +Z points towards the viewer, and +Y points upwards. In the DirectX coordinate space +X points to the right, +Y points upwards, and +Z points away from the viewer.
You'll probably want to consider this flag if you use Direct3D for rendering. The
Process_ConvertToLeftHandedflag supersedes this setting and bundles all conversions typically required for D3D-based applications.Process_Triangulate- Triangulates all faces of all meshes.By default the imported mesh data might contain faces with more than 3 indices. For rendering you'll usually want all faces to be triangles. This post processing step splits up faces with more than 3 indices into triangles. Line and point primitives are *not* modified! If you want 'triangles only' with no other kinds of primitives, try the following solution:
- Specify both
Process_TriangulateandProcess_SortByPType - Ignore all point and line meshes when you process assimp's output
- Specify both
Process_RemoveComponent- Removes some parts of the data structure (animations, materials, light sources, cameras, textures, vertex components).The components to be removed are specified in a separate importer property,
AI_CONFIG_PP_RVC_FLAGS. This is quite useful if you don't need all parts of the output structure. Vertex colors are rarely used today for example... Calling this step to remove unneeded data from the pipeline as early as possible results in increased performance and a more optimized output data structure. This step is also useful if you want to force Assimp to recompute normals or tangents. The corresponding steps don't recompute them if they're already there (loaded from the source asset). By using this step you can make sure they are NOT there.This flag is a poor one, mainly because its purpose is usually misunderstood. Consider the following case: a 3D model has been exported from a CAD app, and it has per-face vertex colors. Vertex positions can't be shared, thus the
Process_JoinIdenticalVerticesstep fails to optimize the data because of these nasty little vertex colors. Most apps don't even process them, so it's all for nothing. By using this step, unneeded components are excluded as early as possible thus opening more room for internal optimizations.Process_GenNormals- Generates normals for all faces of all meshes.This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there. Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate vertices in some cases.
Process_JoinIdenticalVerticesis *senseless* then.This flag may not be specified together with
Process_GenSmoothNormals.Process_GenSmoothNormals- Generates smooth normals for all vertices in the mesh.This is ignored if normals are already there at the time this flag is evaluated. Model importers try to load them from the source file, so they're usually already there.
This flag may not be specified together with
Process_GenNormals. There's a importer property,AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLEwhich allows you to specify an angle maximum for the normal smoothing algorithm. Normals exceeding this limit are not smoothed, resulting in a 'hard' seam between two faces. Using a decent angle here (e.g. 80 degrees) results in very good visual appearance.Process_SplitLargeMeshes- Splits large meshes into smaller sub-meshes.This is quite useful for real-time rendering, where the number of triangles which can be maximally processed in a single draw-call is limited by the video driver/hardware. The maximum vertex buffer is usually limited too. Both requirements can be met with this step: you may specify both a triangle and vertex limit for a single mesh.
The split limits can (and should!) be set through the
AI_CONFIG_PP_SLM_VERTEX_LIMITandAI_CONFIG_PP_SLM_TRIANGLE_LIMITimporter properties. The default values areAI_SLM_DEFAULT_MAX_VERTICESandAI_SLM_DEFAULT_MAX_TRIANGLES.Note that splitting is generally a time-consuming task, but only if there's something to split. The use of this step is recommended for most users.
Process_PreTransformVertices- Removes the node graph and pre-transforms all vertices with the local transformation matrices of their nodes.The output scene still contains nodes, however there is only a root node with children, each one referencing only one mesh, and each mesh referencing one material. For rendering, you can simply render all meshes in order - you don't need to pay attention to local transformations and the node hierarchy. Animations are removed during this step.
This step is intended for applications without a scenegraph. The step CAN cause some problems: if e.g. a mesh of the asset contains normals and another, using the same material index, does not, they will be brought together, but the first meshes's part of the normal list is zeroed. However, these artifacts are rare.
Note
The
AI_CONFIG_PP_PTV_NORMALIZEconfiguration property can be set to normalize the scene's spatial dimension to the-1...1range.Process_LimitBoneWeights- Limits the number of bones simultaneously affecting a single vertex to a maximum value.If any vertex is affected by more than the maximum number of bones, the least important vertex weights are removed and the remaining vertex weights are renormalized so that the weights still sum up to 1. The default bone weight limit is 4 (defined as
AI_LBW_MAX_WEIGHTSin config.h), but you can use theAI_CONFIG_PP_LBW_MAX_WEIGHTSimporter property to supply your own limit to the post processing step.If you intend to perform the skinning in hardware, this post processing step might be of interest to you.
Process_ValidateDataStructure- Validates the imported scene data structure. This makes sure that all indices are valid, all animations and bones are linked correctly, all material references are correct .. etc.It is recommended that you capture Assimp's log output if you use this flag, so you can easily find out what's wrong if a file fails the validation. The validator is quite strict and will find *all* inconsistencies in the data structure... It is recommended that plugin developers use it to debug their loaders. There are two types of validation failures:
- Error: There's something wrong with the imported data. Further postprocessing is not possible and the data is not usable at all. The import
fails.
GetErrorStringcarries the error message around. - Warning: There are some minor issues (e.g. 1000000 animation keyframes with the same time), but further postprocessing and use of the data
structure is still safe. Warning details are written to the log file,
AI_SCENE_FLAGS_VALIDATION_WARNINGis set inAIScene::mFlags.
This post-processing step is not time-consuming. Its use is not compulsory, but recommended.
- Error: There's something wrong with the imported data. Further postprocessing is not possible and the data is not usable at all. The import
fails.
Process_ImproveCacheLocality- Reorders triangles for better vertex cache locality.The step tries to improve the ACMR (average post-transform vertex cache miss ratio) for all meshes. The implementation runs in O(n) and is roughly based on the 'tipsify' algorithm (see this paper).
If you intend to render huge models in hardware, this step might be of interest to you. The
AI_CONFIG_PP_ICL_PTCACHE_SIZEimporter property can be used to fine-tune the cache optimization.Process_RemoveRedundantMaterials- Searches for redundant/unreferenced materials and removes them.This is especially useful in combination with the
Process_PreTransformVerticesandProcess_OptimizeMeshesflags. Both join small meshes with equal characteristics, but they can't do their work if two meshes have different materials. Because several material settings are lost during Assimp's import filters, (and because many exporters don't check for redundant materials), huge models often have materials which are are defined several times with exactly the same settings.Several material settings not contributing to the final appearance of a surface are ignored in all comparisons (e.g. the material name). So, if you're passing additional information through the content pipeline (probably using *magic* material names), don't specify this flag. Alternatively take a look at the
AI_CONFIG_PP_RRM_EXCLUDE_LISTimporter property.Process_FixInfacingNormals- This step tries to determine which meshes have normal vectors that are facing inwards and inverts them.The algorithm is simple but effective: the bounding box of all vertices + their normals is compared against the volume of the bounding box of all vertices without their normals. This works well for most objects, problems might occur with planar surfaces. However, the step tries to filter such cases. The step inverts all in-facing normals. Generally it is recommended to enable this step, although the result is not always correct.
Process_SortByPType- This step splits meshes with more than one primitive type in homogeneous sub-meshes.The step is executed after the triangulation step. After the step returns, just one bit is set in
AIMesh::mPrimitiveTypes. This is especially useful for real-time rendering where point and line primitives are often ignored or rendered separately. You can use theAI_CONFIG_PP_SBP_REMOVEimporter property to specify which primitive types you need. This can be used to easily exclude lines and points, which are rarely used, from the import.Process_FindDegenerates- This step searches all meshes for degenerate primitives and converts them to proper lines or points.A face is 'degenerate' if one or more of its points are identical. To have the degenerate stuff not only detected and collapsed but removed, try one of the following procedures:
- (if you support lines and points for rendering but don't want the degenerates)
- Specify the
Process_FindDegeneratesflag. - Set the
AI_CONFIG_PP_FD_REMOVEimporter property to 1. This will cause the step to remove degenerate triangles from the import as soon as they're detected. They won't pass any further pipeline steps.
- Specify the
- (if you don't support lines and points at all)
- Specify the
Process_FindDegeneratesflag. - Specify the
Process_SortByPTypeflag. This moves line and point primitives to separate meshes. - Set the
AI_CONFIG_PP_SBP_REMOVEimporter property toto causePrimitiveType_POINT|PrimitiveType_LINEProcess_SortByPTypeto reject point and line meshes from the scene.
- Specify the
This step also removes very small triangles with a surface area smaller than 10^-6. If you rely on having these small triangles, or notice holes in your model, set the property
AI_CONFIG_PP_FD_CHECKAREAtofalse.Note
Degenerate polygons are not necessarily evil and that's why they're not removed by default. There are several file formats which don't support lines or points, and some exporters bypass the format specification and write them as degenerate triangles instead.
- (if you support lines and points for rendering but don't want the degenerates)
Process_FindInvalidData- This step searches all meshes for invalid data, such as zeroed normal vectors or invalid UV coords and removes/fixes them. This is intended to get rid of some common exporter errors.This is especially useful for normals. If they are invalid, and the step recognizes this, they will be removed and can later be recomputed, i.e. by the
Process_GenSmoothNormalsflag.The step will also remove meshes that are infinitely small and reduce animation tracks consisting of hundreds if redundant keys to a single key. The
AI_CONFIG_PP_FID_ANIM_ACCURACYconfig property decides the accuracy of the check for duplicate animation tracks.Process_GenUVCoords- This step converts non-UV mappings (such as spherical or cylindrical mapping) to proper texture coordinate channels.Most applications will support UV mapping only, so you will probably want to specify this step in every case. Note that Assimp is not always able to match the original mapping implementation of the 3D app which produced a model perfectly. It's always better to let the modelling app compute the UV channels - 3ds max, Maya, Blender, LightWave, and Modo do this for example.
Note
If this step is not requested, you'll need to process the
_AI_MATKEY_MAPPING_BASEmaterial property in order to display all assets properly.Process_TransformUVCoords- This step applies per-texture UV transformations and bakes them into stand-alone vtexture coordinate channels.UV transformations are specified per-texture - see the
_AI_MATKEY_UVTRANSFORM_BASEmaterial key for more information. This step processes all textures with transformed input UV coordinates and generates a new (pre-transformed) UV channel which replaces the old channel. Most applications won't support UV transformations, so you will probably want to specify this step.Note
UV transformations are usually implemented in real-time apps by transforming texture coordinates at vertex shader stage with a 3x3 (homogenous) transformation matrix.
Process_FindInstances- This step searches for duplicate meshes and replaces them with references to the first mesh.This step takes a while, so don't use it if speed is a concern. Its main purpose is to workaround the fact that many export file formats don't support instanced meshes, so exporters need to duplicate meshes. This step removes the duplicates again. Please note that Assimp does not currently support per-node material assignment to meshes, which means that identical meshes with different materials are currently *not* joined, although this is planned for future versions.
Process_OptimizeMeshes- A post-processing step to reduce the number of meshes.This will, in fact, reduce the number of draw calls.
This is a very effective optimization and is recommended to be used together with
Process_OptimizeGraph, if possible. The flag is fully compatible with bothProcess_SplitLargeMeshesandProcess_SortByPType.Process_OptimizeGraph- A post-processing step to optimize the scene hierarchy.Nodes without animations, bones, lights or cameras assigned are collapsed and joined.
Node names can be lost during this step. If you use special 'tag nodes' to pass additional information through your content pipeline, use the
AI_CONFIG_PP_OG_EXCLUDE_LISTimporter property to specify a list of node names you want to be kept. Nodes matching one of the names in this list won't be touched or modified.Use this flag with caution. Most simple files will be collapsed to a single node, so complex hierarchies are usually completely lost. This is not useful for editor environments, but probably a very effective optimization if you just want to get the model data, convert it to your own format, and render it as fast as possible.
This flag is designed to be used with
Process_OptimizeMeshesfor best results.Note
'Crappy' scenes with thousands of extremely small meshes packed in deeply nested nodes exist for almost all file formats.
Process_OptimizeMeshesin combination withProcess_OptimizeGraphusually fixes them all and makes them renderable.Process_FlipUVs- This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.Output UV coordinate system:
0y|0y ---------- 1x|0y | | | | | | 0x|1y ---------- 1x|1yYou'll probably want to consider this flag if you use Direct3D for rendering. The
Process_ConvertToLeftHandedflag supersedes this setting and bundles all conversions typically required for D3D-based applications.Process_FlipWindingOrder- This step adjusts the output face winding order to be CW.The default face winding order is counter clockwise (CCW).
Output face order:
x2 x0 x1Process_SplitByBoneCount- This step splits meshes with many bones into sub-meshes so that each sub-mesh has fewer or as many bones as a given limit.Process_Debone- This step removes bones losslessly or according to some threshold.In some cases (i.e. formats that require it) exporters are forced to assign dummy bone weights to otherwise static meshes assigned to animated meshes. Full, weight-based skinning is expensive while animating nodes is extremely cheap, so this step is offered to clean up the data in that regard.
Use
AI_CONFIG_PP_DB_THRESHOLDto control this. UseAI_CONFIG_PP_DB_ALL_OR_NONEif you want bones removed if and only if all bones within the scene qualify for removal.Process_GlobalScale- This step will perform a global scale of the model.Some importers are providing a mechanism to define a scaling unit for the model. This post processing step can be used to do so. You need to get the global scaling from your importer settings like in FBX. Use the flag
AI_CONFIG_GLOBAL_SCALE_FACTOR_KEYfrom the global property table to configure this.Use
AI_CONFIG_GLOBAL_SCALE_FACTOR_KEYto setup the global scaling factor.Process_EmbedTextures- A postprocessing step to embed of textures.This will remove external data dependencies for textures. If a texture's file does not exist at the specified path (due, for instance, to an absolute path generated on another system), it will check if a file with the same name exists at the root folder of the imported model. And if so, it uses that.
Process_ForceGenNormalsProcess_DropNormals- Drops normals for all faces of all meshes.This is ignored if no normals are present.
Face normals are shared between all points of a single face, so a single point can have multiple normals, which forces the library to duplicate vertices in some cases.
Process_JoinIdenticalVerticesis senseless then. This process gives sense back toProcess_JoinIdenticalVertices.Process_GenBoundingBoxes
-
aiProcess_ConvertToLeftHanded, aiProcessPreset_TargetRealtime_Fast, aiProcessPreset_TargetRealtime_Quality, aiProcessPreset_TargetRealtime_MaxQuality
Process PresetsEnum values:
Process_ConvertToLeftHanded- Shortcut flag for Direct3D-based applications.Supersedes the
Process_MakeLeftHandedandProcess_FlipUVsandProcess_FlipWindingOrderflags. The output data matches Direct3D's conventions: left-handed geometry, upper-left origin for UV coordinates and finally clockwise face order, suitable for CCW culling.ProcessPreset_TargetRealtime_Fast- Default postprocess configuration optimizing the data for real-time rendering.Applications would want to use this preset to load models on end-user PCs, maybe for direct use in game.
If you're using DirectX, don't forget to combine this value with the
Process_ConvertToLeftHandedstep. If you don't support UV transformations in your application apply theProcess_TransformUVCoordsstep, too.Note
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_Quality- Default postprocess configuration optimizing the data for real-time rendering.Unlike
ProcessPreset_TargetRealtime_Fast, this configuration performs some extra optimizations to improve rendering speed and to minimize memory usage. It could be a good choice for a level editor environment where import speed is not so important.If you're using DirectX, don't forget to combine this value with the
Process_ConvertToLeftHandedstep. If you don't support UV transformations in your application apply theProcess_TransformUVCoordsstep, too.Note
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
ProcessPreset_TargetRealtime_MaxQuality- Default postprocess configuration optimizing the data for real-time rendering.This preset enables almost every optimization step to achieve perfectly optimized data. It's your choice for level editor environments where import speed is not important.
If you're using DirectX, don't forget to combine this value with the
Process_ConvertToLeftHandedstep. If you don't support UV transformations in your application, apply theProcess_TransformUVCoordsstep, too.Note
Please take the time to read the docs for the steps enabled by this preset. Some of them offer further configurable properties, while some of them might not be of use for you so it might be better to not specify them.
-
AI_SCENE_FLAGS_INCOMPLETE
Specifies that the scene data structure that was imported is not complete. This flag bypasses some internal validations and allows the import of animation skeletons, material libraries or camera animation paths using Assimp. Most applications won't support such data.
-
AI_SCENE_FLAGS_VALIDATED
This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS) if the validation is successful. In a validated scene you can be sure that any cross references in the data structure (e.g. vertex indices) are valid.
-
AI_SCENE_FLAGS_VALIDATION_WARNING
This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS) if the validation is successful but some issues have been found. This can for example mean that a texture that does not exist is referenced by a material or that the bone weights for a vertex don't sum to 1.0 ... . In most cases you should still be able to use the import. This flag could be useful for applications which don't capture Assimp's log output.
-
AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
This flag is currently only set by the aiProcess_JoinIdenticalVertices step. It indicates that the vertices of the output meshes aren't in the internal verbose format anymore. In the verbose format all vertices are unique, no vertex is ever referenced by more than one face.
-
AI_SCENE_FLAGS_TERRAIN
Denotes pure height-map terrain data. Pure terrains usually consist of quads, sometimes triangles, in a regular grid. The x,y coordinates of all vertex positions refer to the x,y coordinates on the terrain height map, the z-axis stores the elevation at a specific point.TER (Terragen) and HMP (3D Game Studio) are height map formats. Note: Assimp is probably not the best choice for loading *huge* terrains - fully triangulated data takes extremely much free store and should be avoided as long as possible (typically you'll do the triangulation when you actually need to render it).
-
ASSIMP_CFLAGS_SHARED
Assimp was compiled as a shared object (Windows: DLL)
-
ASSIMP_CFLAGS_STLPORT
Assimp was compiled against STLport
-
ASSIMP_CFLAGS_DEBUG
Assimp was compiled as a debug build
-
ASSIMP_CFLAGS_NOBOOST
Assimp was compiled withASSIMP_BUILD_BOOST_WORKAROUNDdefined
-
ASSIMP_CFLAGS_SINGLETHREADED
Assimp was compiled withASSIMP_BUILD_SINGLETHREADEDdefined
-
-
Method Detail
-
getLibrary
public static org.lwjgl.system.SharedLibrary getLibrary()
Returns the assimpSharedLibrary.
-
aiComponent_COLORSn
public static int aiComponent_COLORSn(int n)
Remove a specific color channel 'n'- Parameters:
n- The color channel
-
aiComponent_TEXCOORDSn
public static int aiComponent_TEXCOORDSn(int n)
Remove a specific UV channel 'n'- Parameters:
n- The UV channel
-
AI_DEG_TO_RAD
public static float AI_DEG_TO_RAD(float x)
Tiny macro to convert from degrees to radians- Parameters:
x- The value in degrees
-
AI_RAD_TO_DEG
public static float AI_RAD_TO_DEG(float x)
Tiny macro to convert from radians to degrees- Parameters:
x- The value in radians
-
aiGetExportFormatCount
public static long aiGetExportFormatCount()
Returns the number of export file formats available in the current Assimp build. UseGetExportFormatDescriptionto retrieve infos of a specific export format.
-
naiGetExportFormatDescription
public static long naiGetExportFormatDescription(long pIndex)
Unsafe version of:GetExportFormatDescription
-
aiGetExportFormatDescription
@Nullable public static AIExportFormatDesc aiGetExportFormatDescription(long pIndex)
Returns a description of the nth export file format. UseGetExportFormatCountto learn how many export formats are supported. The description must be released by callingReleaseExportFormatDescriptionafterwards.- Parameters:
pIndex- Index of the export format to retrieve information for. Valid range is 0 toGetExportFormatCount- Returns:
- A description of that specific export format.
NULLifpIndexis out of range.
-
naiReleaseExportFormatDescription
public static void naiReleaseExportFormatDescription(long desc)
Unsafe version of:ReleaseExportFormatDescription
-
aiReleaseExportFormatDescription
public static void aiReleaseExportFormatDescription(AIExportFormatDesc desc)
Release a description of the nth export file format. Must be returned byGetExportFormatDescription.- Parameters:
desc- Pointer to the description
-
naiCopyScene
public static void naiCopyScene(long pIn, long pOut)Unsafe version of:CopyScene
-
aiCopyScene
public static void aiCopyScene(AIScene pIn, org.lwjgl.PointerBuffer pOut)
Create a modifiable copy of a scene.This is useful to import files via Assimp, change their topology and export them again. Since the scene returned by the various importer functions is const, a modifiable copy is needed.
- Parameters:
pIn- Valid scene to be copiedpOut- Receives a modifiable copy of the scene. UseFreeSceneto delete it again.
-
aiCopyScene
@Nullable public static AIScene aiCopyScene(AIScene pIn)
Create a modifiable copy of a scene.This is useful to import files via Assimp, change their topology and export them again. Since the scene returned by the various importer functions is const, a modifiable copy is needed.
- Parameters:
pIn- Valid scene to be copied
-
naiFreeScene
public static void naiFreeScene(long pIn)
Unsafe version of:FreeScene
-
aiFreeScene
public static void aiFreeScene(AIScene pIn)
Frees a scene copy created usingCopyScene- Parameters:
pIn- Scene to be freed
-
naiExportScene
public static int naiExportScene(long pScene, long pFormatId, long pFileName, int pPreProcessing)Unsafe version of:ExportScene
-
aiExportScene
public static int aiExportScene(AIScene pScene, java.nio.ByteBuffer pFormatId, java.nio.ByteBuffer pFileName, int pPreProcessing) public static int aiExportScene(AIScene pScene, java.lang.CharSequence pFormatId, java.lang.CharSequence pFileName, int pPreProcessing)
Exports the given scene to a chosen file format and writes the result file(s) to disk.Note
Use
CopySceneto get a modifiable copy of a previously imported scene.- Parameters:
pScene- The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions, have a look at the last parameter.pFormatId- ID string to specify to which format you want to export to. UseGetExportFormatCount/GetExportFormatDescriptionto learn which export formats are available.pFileName- Output file to writepPreProcessing- Accepts any choice of theaiPostProcessStepsenumerated flags, but in reality only a subset of them makes sense here. Specifying 'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. TheProcess_MakeLeftHanded,Process_FlipUVsandProcess_FlipWindingOrderflags are used in the import side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite effect, respectively. Some other of theaiPostProcessStepsenumerated values may be useful as well, but you'll need to try out what their effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can enforce it by specifying theProcess_Triangulateflag, most export formats support only triangulate data so they would run the step anyway.If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using
CopySceneand potentially modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour (Process_MakeLeftHanded,Process_FlipUVsandProcess_FlipWindingOrder). One or more of:- Returns:
- a status code indicating the result of the export
-
naiExportSceneEx
public static int naiExportSceneEx(long pScene, long pFormatId, long pFileName, long pIO, int pPreProcessing)Unsafe version of:ExportSceneEx
-
aiExportSceneEx
public static int aiExportSceneEx(AIScene pScene, java.nio.ByteBuffer pFormatId, java.nio.ByteBuffer pFileName, @Nullable AIFileIO pIO, int pPreProcessing) public static int aiExportSceneEx(AIScene pScene, java.lang.CharSequence pFormatId, java.lang.CharSequence pFileName, @Nullable AIFileIO pIO, int pPreProcessing)
Exports the given scene to a chosen file format using custom IO logic supplied by you.Note
Use
CopySceneto get a modifiable copy of a previously imported scene.- Parameters:
pScene- The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions, have a look at the last parameter.pFormatId- ID string to specify to which format you want to export to. UseGetExportFormatCount/GetExportFormatDescriptionto learn which export formats are available.pFileName- Output file to writepIO- custom IO implementation to be used. Use this if you use your own storage methods. If none is supplied, a default implementation using standard file IO is used. Note thatExportSceneToBlobis provided as convenience function to export to memory buffers.pPreProcessing- Accepts any choice of theaiPostProcessStepsenumerated flags, but in reality only a subset of them makes sense here. Specifying 'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. TheProcess_MakeLeftHanded,Process_FlipUVsandProcess_FlipWindingOrderflags are used in the import side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite effect, respectively. Some other of theaiPostProcessStepsenumerated values may be useful as well, but you'll need to try out what their effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can enforce it by specifying theProcess_Triangulateflag, most export formats support only triangulate data so they would run the step anyway.If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using
CopySceneand potentially modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour (Process_MakeLeftHanded,Process_FlipUVsandProcess_FlipWindingOrder). One or more of:- Returns:
- a status code indicating the result of the export
-
naiExportSceneToBlob
public static long naiExportSceneToBlob(long pScene, long pFormatId, int pPreProcessing)Unsafe version of:ExportSceneToBlob
-
aiExportSceneToBlob
@Nullable public static AIExportDataBlob aiExportSceneToBlob(AIScene pScene, java.nio.ByteBuffer pFormatId, int pPreProcessing) @Nullable public static AIExportDataBlob aiExportSceneToBlob(AIScene pScene, java.lang.CharSequence pFormatId, int pPreProcessing)
Exports the given scene to a chosen file format. Returns the exported data as a binary blob which you can write into a file or something. When you're done with the data, useReleaseExportBlobto free the resources associated with the export.- Parameters:
pScene- The scene to export. Stays in possession of the caller, is not changed by the function. The scene is expected to conform to Assimp's Importer output format as specified in the Data Structures Page. In short, this means the model data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. If your input data uses different conventions, have a look at the last parameter.pFormatId- ID string to specify to which format you want to export to. UseGetExportFormatCount/GetExportFormatDescriptionto learn which export formats are available.pPreProcessing- Accepts any choice of theaiPostProcessStepsenumerated flags, but in reality only a subset of them makes sense here. Specifying 'preprocessing' flags is useful if the input scene does not conform to Assimp's default conventions as specified in the Data Structures Page. In short, this means the geometry data should use a right-handed coordinate systems, face winding should be counter-clockwise and the UV coordinate origin is assumed to be in the upper left. TheProcess_MakeLeftHanded,Process_FlipUVsandProcess_FlipWindingOrderflags are used in the import side to allow users to have those defaults automatically adapted to their conventions. Specifying those flags for exporting has the opposite effect, respectively. Some other of theaiPostProcessStepsenumerated values may be useful as well, but you'll need to try out what their effect on the exported file is. Many formats impose their own restrictions on the structure of the geometry stored therein, so some preprocessing may have little or no effect at all, or may be redundant as exporters would apply them anyhow. A good example is triangulation - whilst you can enforce it by specifying theProcess_Triangulateflag, most export formats support only triangulate data so they would run the step anyway.If assimp detects that the input scene was directly taken from the importer side of the library (i.e. not copied using
CopySceneand potentially modified afterwards), any postprocessing steps already applied to the scene will not be applied again, unless they show non-idempotent behaviour (Process_MakeLeftHanded,Process_FlipUVsandProcess_FlipWindingOrder). One or more of:- Returns:
- the exported data or
NULLin case of error
-
naiReleaseExportBlob
public static void naiReleaseExportBlob(long pData)
Unsafe version of:ReleaseExportBlob
-
aiReleaseExportBlob
public static void aiReleaseExportBlob(AIExportDataBlob pData)
Releases the memory associated with the given exported data. Use this function to free a data blob returned byExportSceneToBlob.- Parameters:
pData- the data blob returned byExportSceneToBlob
-
naiImportFile
public static long naiImportFile(long pFile, int pFlags)Unsafe version of:ImportFile
-
aiImportFile
@Nullable public static AIScene aiImportFile(java.nio.ByteBuffer pFile, int pFlags) @Nullable public static AIScene aiImportFile(java.lang.CharSequence pFile, int pFlags)
Reads the given file and returns its content.If the call succeeds, the imported data is returned in an
AIScenestructure. The data is intended to be read-only, it stays property of the ASSIMP library and will be stable untilReleaseImportis called. After you're done with it, callReleaseImportto free the resources associated with this file. If the import fails,NULLis returned instead. CallGetErrorStringto retrieve a human-readable error text.- Parameters:
pFile- Path and filename of the file to be importedpFlags- Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to useApplyPostProcessing. One or more of:- Returns:
- Pointer to the imported data or
NULLif the import failed.
-
naiImportFileEx
public static long naiImportFileEx(long pFile, int pFlags, long pFS)Unsafe version of:ImportFileEx
-
aiImportFileEx
@Nullable public static AIScene aiImportFileEx(java.nio.ByteBuffer pFile, int pFlags, @Nullable AIFileIO pFS) @Nullable public static AIScene aiImportFileEx(java.lang.CharSequence pFile, int pFlags, @Nullable AIFileIO pFS)
Reads the given file using user-defined I/O functions and returns its content.If the call succeeds, the imported data is returned in an
AIScenestructure. The data is intended to be read-only, it stays property of the ASSIMP library and will be stable untilReleaseImportis called. After you're done with it, callReleaseImportto free the resources associated with this file. If the import fails,NULLis returned instead. CallGetErrorStringto retrieve a human-readable error text.- Parameters:
pFile- Path and filename of the file to be importedpFlags- Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to useApplyPostProcessing. One or more of:pFS- Will be used to open the model file itself and any other files the loader needs to open. PassNULLto use the default implementation.- Returns:
- Pointer to the imported data or
NULLif the import failed.
-
naiImportFileExWithProperties
public static long naiImportFileExWithProperties(long pFile, int pFlags, long pFS, long pProps)Unsafe version of:ImportFileExWithProperties
-
aiImportFileExWithProperties
@Nullable public static AIScene aiImportFileExWithProperties(java.nio.ByteBuffer pFile, int pFlags, @Nullable AIFileIO pFS, AIPropertyStore pProps) @Nullable public static AIScene aiImportFileExWithProperties(java.lang.CharSequence pFile, int pFlags, @Nullable AIFileIO pFS, AIPropertyStore pProps)
Same asImportFileEx, but adds an extra parameter containing importer settings.- Parameters:
pFile- Path and filename of the file to be importedpFlags- Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to useApplyPostProcessing. One or more of:pFS- Will be used to open the model file itself and any other files the loader needs to open. PassNULLto use the default implementation.pProps-AIPropertyStoreinstance containing import settings.- Returns:
- Pointer to the imported data or
NULLif the import failed.
-
naiImportFileFromMemory
public static long naiImportFileFromMemory(long pBuffer, int pLength, int pFlags, long pHint)Unsafe version of:ImportFileFromMemory- Parameters:
pLength- Length of pBuffer, in bytes
-
aiImportFileFromMemory
@Nullable public static AIScene aiImportFileFromMemory(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.nio.ByteBuffer pHint) @Nullable public static AIScene aiImportFileFromMemory(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.lang.CharSequence pHint)
Reads the given file from a given memory buffer.If the call succeeds, the contents of the file are returned as a pointer to an
AISceneobject. The returned data is intended to be read-only, the importer keeps ownership of the data and will destroy it upon destruction. If the import fails,NULLis returned. A human-readable error description can be retrieved by callingGetErrorString.Note
This is a straightforward way to decode models from memory buffers, but it doesn't handle model formats that spread their data across multiple files or even directories. Examples include OBJ or MD3, which outsource parts of their material info into external scripts. If you need full functionality, provide a custom IOSystem to make Assimp find these files and use the regular
ImportFileEx/ImportFileExWithPropertiesAPI.- Parameters:
pBuffer- Pointer to the file datapFlags- Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to useApplyPostProcessing. One or more of:pHint- An additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified bypHintand passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...- Returns:
- A pointer to the imported data,
NULLif the import failed.
-
naiImportFileFromMemoryWithProperties
public static long naiImportFileFromMemoryWithProperties(long pBuffer, int pLength, int pFlags, long pHint, long pProps)Unsafe version of:ImportFileFromMemoryWithProperties- Parameters:
pLength- Length of pBuffer, in bytes
-
aiImportFileFromMemoryWithProperties
@Nullable public static AIScene aiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.nio.ByteBuffer pHint, AIPropertyStore pProps) @Nullable public static AIScene aiImportFileFromMemoryWithProperties(java.nio.ByteBuffer pBuffer, int pFlags, @Nullable java.lang.CharSequence pHint, AIPropertyStore pProps)
Same asImportFileFromMemory, but adds an extra parameter containing importer settings.- Parameters:
pBuffer- Pointer to the file datapFlags- Optional post processing steps to be executed after a successful import. If you wish to inspect the imported scene first in order to fine-tune your post-processing setup, consider to useApplyPostProcessing. One or more of:pHint- An additional hint to the library. If this is a non empty string, the library looks for a loader to support the file extension specified bypHintand passes the file to the first matching loader. If this loader is unable to completely the request, the library continues and tries to determine the file format on its own, a task that may or may not be successful. Check the return value, and you'll know ...pProps-AIPropertyStoreinstance containing import settings.- Returns:
- A pointer to the imported data,
NULLif the import failed.
-
naiApplyPostProcessing
public static long naiApplyPostProcessing(long pScene, int pFlags)Unsafe version of:ApplyPostProcessing
-
aiApplyPostProcessing
@Nullable public static AIScene aiApplyPostProcessing(AIScene pScene, int pFlags)
Apply post-processing to an already-imported scene.This is strictly equivalent to calling
ImportFile/ImportFileExwith the same flags. However, you can use this separate function to inspect the imported scene first to fine-tune your post-processing setup.- Parameters:
pScene- Scene to work on.pFlags- Provide a bitwise combination of theaiPostProcessStepsflags. One or more of:- Returns:
- A pointer to the post-processed data. Post processing is done in-place, meaning this is still the same
AIScenewhich you passed forpScene. However, if post-processing failed, the scene could now beNULL. That's quite a rare case, post processing steps are not really designed to 'fail'. To be exact, theProcess_ValidateDataStructureflag is currently the only post processing step which can actually cause the scene to be reset toNULL.
-
naiAttachLogStream
public static void naiAttachLogStream(long stream)
Unsafe version of:AttachLogStream
-
aiAttachLogStream
public static void aiAttachLogStream(AILogStream stream)
Attach a custom log stream to the libraries' logging system.Attaching a log stream can slightly reduce Assimp's overall import performance. Multiple log-streams can be attached.
Note
To ensure proper destruction of the logging system, you need to manually call
DetachLogStreamon every single log stream you attach. Alternatively (for the lazy folks)DetachAllLogStreamsis provided.- Parameters:
stream- Describes the new log stream.
-
aiEnableVerboseLogging
public static void aiEnableVerboseLogging(boolean d)
Enable verbose logging. Verbose logging includes debug-related stuff and detailed import statistics. This can have severe impact on import performance and memory consumption. However, it might be useful to find out why a file didn't read correctly.- Parameters:
d- true or false, your decision
-
naiDetachLogStream
public static int naiDetachLogStream(long stream)
Unsafe version of:DetachLogStream
-
aiDetachLogStream
public static int aiDetachLogStream(AILogStream stream)
Detach a custom log stream from the libraries' logging system.This is the counterpart of
AttachLogStream. If you attached a stream, don't forget to detach it again.- Parameters:
stream- The log stream to be detached.- Returns:
Return_SUCCESSif the log stream has been detached successfully.
-
aiDetachAllLogStreams
public static void aiDetachAllLogStreams()
Detach all active log streams from the libraries' logging system. This ensures that the logging system is terminated properly and all resources allocated by it are actually freed. If you attached a stream, don't forget to detach it again.
-
naiReleaseImport
public static void naiReleaseImport(long pScene)
Unsafe version of:ReleaseImport
-
aiReleaseImport
public static void aiReleaseImport(@Nullable AIScene pScene)Releases all resources associated with the given import process.Call this function after you're done with the imported data.
- Parameters:
pScene- The imported data to release.NULLis a valid value.
-
naiGetErrorString
public static long naiGetErrorString()
Unsafe version of:GetErrorString
-
aiGetErrorString
@Nullable public static java.lang.String aiGetErrorString()
Returns the error text of the last failed import process.- Returns:
- A textual description of the error that occurred at the last import process.
NULLif there was no error. There can't be an error if you got a non-NULLAIScenefromImportFile/ImportFileEx/ApplyPostProcessing.
-
naiIsExtensionSupported
public static int naiIsExtensionSupported(long szExtension)
Unsafe version of:IsExtensionSupported
-
aiIsExtensionSupported
public static boolean aiIsExtensionSupported(java.nio.ByteBuffer szExtension) public static boolean aiIsExtensionSupported(java.lang.CharSequence szExtension)
Returns whether a given file extension is supported by ASSIMP.- Parameters:
szExtension- Extension for which the function queries support for. Must include a leading dot '.'. Example: ".3ds", ".md3"- Returns:
- true if the file extension is supported.
-
naiGetExtensionList
public static void naiGetExtensionList(long szOut)
Unsafe version of:GetExtensionList
-
aiGetExtensionList
public static void aiGetExtensionList(AIString szOut)
Get a list of all file extensions supported by ASSIMP.If a file extension is contained in the list this does, of course, not mean that ASSIMP is able to load all files with this extension.
- Parameters:
szOut- String to receive the extension list. Format of the list: "*.3ds;*.obj;*.dae".NULLis not a valid parameter.
-
naiGetMemoryRequirements
public static void naiGetMemoryRequirements(long pIn, long in)Unsafe version of:GetMemoryRequirements
-
aiGetMemoryRequirements
public static void aiGetMemoryRequirements(AIScene pIn, AIMemoryInfo in)
Get the approximated storage required by an imported asset.- Parameters:
pIn- Input asset.in- Data structure to be filled.
-
naiCreatePropertyStore
public static long naiCreatePropertyStore()
Unsafe version of:CreatePropertyStore
-
aiCreatePropertyStore
@Nullable public static AIPropertyStore aiCreatePropertyStore()
Create an empty property store. Property stores are used to collect import settings.- Returns:
- New property store. Property stores need to be manually destroyed using the
ReleasePropertyStoreAPI function.
-
naiReleasePropertyStore
public static void naiReleasePropertyStore(long p)
Unsafe version of:ReleasePropertyStore
-
aiReleasePropertyStore
public static void aiReleasePropertyStore(AIPropertyStore p)
Delete a property store.- Parameters:
p- Property store to be deleted.
-
naiSetImportPropertyInteger
public static void naiSetImportPropertyInteger(long store, long szName, int value)Unsafe version of:SetImportPropertyInteger
-
aiSetImportPropertyInteger
public static void aiSetImportPropertyInteger(AIPropertyStore store, java.nio.ByteBuffer szName, int value) public static void aiSetImportPropertyInteger(AIPropertyStore store, java.lang.CharSequence szName, int value)
Set an integer property.This is the C-version of
Assimp::Importer::SetPropertyInteger(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.- Parameters:
store- Store to modify. UseCreatePropertyStoreto obtain a store.szName- Name of the configuration property to be set. One of:value- New value for the property
-
naiSetImportPropertyFloat
public static void naiSetImportPropertyFloat(long store, long szName, float value)Unsafe version of:SetImportPropertyFloat
-
aiSetImportPropertyFloat
public static void aiSetImportPropertyFloat(AIPropertyStore store, java.nio.ByteBuffer szName, float value) public static void aiSetImportPropertyFloat(AIPropertyStore store, java.lang.CharSequence szName, float value)
Set an floating-point property.This is the C-version of
Assimp::Importer::SetPropertyFloat(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.- Parameters:
store- Store to modify. UseCreatePropertyStoreto obtain a store.szName- Name of the configuration property to be set. One of:value- New value for the property
-
naiSetImportPropertyString
public static void naiSetImportPropertyString(long store, long szName, long value)Unsafe version of:SetImportPropertyString
-
aiSetImportPropertyString
public static void aiSetImportPropertyString(AIPropertyStore store, java.nio.ByteBuffer szName, AIString value) public static void aiSetImportPropertyString(AIPropertyStore store, java.lang.CharSequence szName, AIString value)
Set a string property.This is the C-version of
Assimp::Importer::SetPropertyString(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.- Parameters:
store- Store to modify. UseCreatePropertyStoreto obtain a store.szName- Name of the configuration property to be set. One of:value- New value for the property
-
naiSetImportPropertyMatrix
public static void naiSetImportPropertyMatrix(long store, long szName, long value)Unsafe version of:SetImportPropertyMatrix
-
aiSetImportPropertyMatrix
public static void aiSetImportPropertyMatrix(AIPropertyStore store, java.nio.ByteBuffer szName, AIMatrix4x4 value) public static void aiSetImportPropertyMatrix(AIPropertyStore store, java.lang.CharSequence szName, AIMatrix4x4 value)
Set a matrix property.This is the C-version of
Assimp::Importer::SetPropertyMatrix(). In the C interface, properties are always shared by all imports. It is not possible to specify them per import.- Parameters:
store- Store to modify. UseCreatePropertyStoreto obtain a store.szName- Name of the configuration property to be set. One of:value- New value for the property
-
naiCreateQuaternionFromMatrix
public static void naiCreateQuaternionFromMatrix(long quat, long mat)Unsafe version of:CreateQuaternionFromMatrix
-
aiCreateQuaternionFromMatrix
public static void aiCreateQuaternionFromMatrix(AIQuaternion quat, AIMatrix3x3 mat)
Construct a quaternion from a 3x3 rotation matrix.- Parameters:
quat- Receives the output quaternion.mat- Matrix to 'quaternionize'.
-
naiDecomposeMatrix
public static void naiDecomposeMatrix(long mat, long scaling, long rotation, long position)Unsafe version of:DecomposeMatrix
-
aiDecomposeMatrix
public static void aiDecomposeMatrix(AIMatrix4x4 mat, AIVector3D scaling, AIQuaternion rotation, AIVector3D position)
Decompose a transformation matrix into its rotational, translational and scaling components.- Parameters:
mat- Matrix to decomposescaling- Receives the scaling componentrotation- Receives the rotational componentposition- Receives the translational component.
-
naiTransposeMatrix4
public static void naiTransposeMatrix4(long mat)
Unsafe version of:TransposeMatrix4
-
aiTransposeMatrix4
public static void aiTransposeMatrix4(AIMatrix4x4 mat)
Transpose a 4x4 matrix.- Parameters:
mat- Pointer to the matrix to be transposed
-
naiTransposeMatrix3
public static void naiTransposeMatrix3(long mat)
Unsafe version of:TransposeMatrix3
-
aiTransposeMatrix3
public static void aiTransposeMatrix3(AIMatrix3x3 mat)
Transpose a 3x3 matrix.- Parameters:
mat- Pointer to the matrix to be transposed
-
naiTransformVecByMatrix3
public static void naiTransformVecByMatrix3(long vec, long mat)Unsafe version of:TransformVecByMatrix3
-
aiTransformVecByMatrix3
public static void aiTransformVecByMatrix3(AIVector3D vec, AIMatrix3x3 mat)
Transform a vector by a 3x3 matrix- Parameters:
vec- Vector to be transformed.mat- Matrix to transform the vector with.
-
naiTransformVecByMatrix4
public static void naiTransformVecByMatrix4(long vec, long mat)Unsafe version of:TransformVecByMatrix4
-
aiTransformVecByMatrix4
public static void aiTransformVecByMatrix4(AIVector3D vec, AIMatrix4x4 mat)
Transform a vector by a 4x4 matrix- Parameters:
vec- Vector to be transformed.mat- Matrix to transform the vector with.
-
naiMultiplyMatrix4
public static void naiMultiplyMatrix4(long dst, long src)Unsafe version of:MultiplyMatrix4
-
aiMultiplyMatrix4
public static void aiMultiplyMatrix4(AIMatrix4x4 dst, AIMatrix4x4 src)
Multiply two 4x4 matrices.- Parameters:
dst- First factor, receives result.src- Matrix to be multiplied with 'dst'.
-
naiMultiplyMatrix3
public static void naiMultiplyMatrix3(long dst, long src)Unsafe version of:MultiplyMatrix3
-
aiMultiplyMatrix3
public static void aiMultiplyMatrix3(AIMatrix3x3 dst, AIMatrix3x3 src)
Multiply two 3x3 matrices.- Parameters:
dst- First factor, receives result.src- Matrix to be multiplied with 'dst'.
-
naiIdentityMatrix3
public static void naiIdentityMatrix3(long mat)
Unsafe version of:IdentityMatrix3
-
aiIdentityMatrix3
public static void aiIdentityMatrix3(AIMatrix3x3 mat)
Get a 3x3 identity matrix.- Parameters:
mat- Matrix to receive its personal identity
-
naiIdentityMatrix4
public static void naiIdentityMatrix4(long mat)
Unsafe version of:IdentityMatrix4
-
aiIdentityMatrix4
public static void aiIdentityMatrix4(AIMatrix4x4 mat)
Get a 4x4 identity matrix.- Parameters:
mat- Matrix to receive its personal identity
-
aiGetImportFormatCount
public static long aiGetImportFormatCount()
Returns the number of import file formats available in the current Assimp build. UseGetImportFormatDescriptionto retrieve infos of a specific import format.
-
naiGetImportFormatDescription
public static long naiGetImportFormatDescription(long pIndex)
Unsafe version of:GetImportFormatDescription
-
aiGetImportFormatDescription
@Nullable public static AIImporterDesc aiGetImportFormatDescription(long pIndex)
Returns a description of the nth import file format. UseGetImportFormatCountto learn how many import formats are supported.- Parameters:
pIndex- Index of the import format to retrieve information for. Valid range is 0 toGetImportFormatCount- Returns:
- A description of that specific import format.
NULLifpIndexis out of range.
-
naiGetImporterDesc
public static long naiGetImporterDesc(long extension)
Unsafe version of:GetImporterDesc
-
aiGetImporterDesc
@Nullable public static AIImporterDesc aiGetImporterDesc(java.nio.ByteBuffer extension) @Nullable public static AIImporterDesc aiGetImporterDesc(java.lang.CharSequence extension)
Returns the Importer description for a given extension.Will return a
NULL-pointer if no assigned importer desc. was found for the given extension.- Parameters:
extension- The extension to look for- Returns:
- A pointer showing to the ImporterDesc,
AIImporterDesc.
-
naiGetMaterialProperty
public static int naiGetMaterialProperty(long pMat, long pKey, int type, int index, long mPropOut)Unsafe version of:GetMaterialProperty
-
aiGetMaterialProperty
public static int aiGetMaterialProperty(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, org.lwjgl.PointerBuffer mPropOut) public static int aiGetMaterialProperty(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, org.lwjgl.PointerBuffer mPropOut)
Retrieve a material property with a specific key from the material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.type- Specifies the type of the texture to be retrieved. One of:index- Index of the texture to be retrieved.mPropOut- Pointer to receive a pointer to a validAIMaterialPropertystructure orNULLif the key has not been found.- Returns:
- Return_xxx values.
-
aiGetMaterialProperty
public static int aiGetMaterialProperty(AIMaterial pMat, java.nio.ByteBuffer pKey, org.lwjgl.PointerBuffer mPropOut) public static int aiGetMaterialProperty(AIMaterial pMat, java.lang.CharSequence pKey, org.lwjgl.PointerBuffer mPropOut)
Retrieve a material property with a specific key from the material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.mPropOut- Pointer to receive a pointer to a validAIMaterialPropertystructure orNULLif the key has not been found.- Returns:
- Return_xxx values.
-
naiGetMaterialFloatArray
public static int naiGetMaterialFloatArray(long pMat, long pKey, int type, int index, long pOut, long pMax)Unsafe version of:GetMaterialFloatArray- Parameters:
pMax- Specifies the size of the given buffer, in float's. Receives the number of values (not bytes!) read.
-
aiGetMaterialFloatArray
public static int aiGetMaterialFloatArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, java.nio.FloatBuffer pOut, @Nullable java.nio.IntBuffer pMax) public static int aiGetMaterialFloatArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, java.nio.FloatBuffer pOut, @Nullable java.nio.IntBuffer pMax)
Retrieve an array of float values with a specific key from the material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.type- Specifies the type of the texture to be retrieved. One of:index- Index of the texture to be retrieved.pOut- Pointer to a buffer to receive the result.pMax- Specifies the size of the given buffer, in float's. Receives the number of values (not bytes!) read.- Returns:
- Specifies whether the key has been found. If not, the output arrays remains unmodified and
pMaxis set to 0.
-
naiGetMaterialIntegerArray
public static int naiGetMaterialIntegerArray(long pMat, long pKey, int type, int index, long pOut, long pMax)Unsafe version of:GetMaterialIntegerArray- Parameters:
pMax- Specifies the size of the given buffer, in int's. Receives the number of values (not bytes!) read.
-
aiGetMaterialIntegerArray
public static int aiGetMaterialIntegerArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, java.nio.IntBuffer pOut, @Nullable java.nio.IntBuffer pMax) public static int aiGetMaterialIntegerArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, java.nio.IntBuffer pOut, @Nullable java.nio.IntBuffer pMax)
Retrieve an array of integer values with a specific key from a material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.type- Specifies the type of the texture to be retrieved. One of:index- Index of the texture to be retrieved.pOut- Pointer to a buffer to receive the result.pMax- Specifies the size of the given buffer, in int's. Receives the number of values (not bytes!) read.- Returns:
- Specifies whether the key has been found. If not, the output arrays remains unmodified and
pMaxis set to 0.
-
naiGetMaterialColor
public static int naiGetMaterialColor(long pMat, long pKey, int type, int index, long pOut)Unsafe version of:GetMaterialColor
-
aiGetMaterialColor
public static int aiGetMaterialColor(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIColor4D pOut) public static int aiGetMaterialColor(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIColor4D pOut)
Retrieve a color value with a specific key from a material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.type- Specifies the type of the texture to be retrieved. One of:index- Index of the texture to be retrieved.pOut- Pointer to a color to receive the result.- Returns:
- Specifies whether the key has been found. If not, the output struct remains unmodified.
-
naiGetMaterialUVTransform
public static int naiGetMaterialUVTransform(long pMat, long pKey, int type, int index, long pOut)Unsafe version of:GetMaterialUVTransform
-
aiGetMaterialUVTransform
public static int aiGetMaterialUVTransform(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIUVTransform pOut) public static int aiGetMaterialUVTransform(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIUVTransform pOut)
Retrieve a UVTransform value with a specific key from a material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.type- Specifies the type of the texture to be retrieved. One of:index- Index of the texture to be retrieved.pOut- Pointer to aAIUVTransformto receive the result.- Returns:
- Specifies whether the key has been found. If not, the output struct remains unmodified.
-
naiGetMaterialString
public static int naiGetMaterialString(long pMat, long pKey, int type, int index, long pOut)Unsafe version of:GetMaterialString
-
aiGetMaterialString
public static int aiGetMaterialString(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, AIString pOut) public static int aiGetMaterialString(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, AIString pOut)
Retrieve a string value with a specific key from a material.- Parameters:
pMat- Pointer to the input material. May not beNULLpKey- Key to search for. One of the AI_MATKEY_XXX constants.type- Specifies the type of the texture to be retrieved. One of:index- Index of the texture to be retrieved.pOut- Pointer to a string to receive the result.- Returns:
- Specifies whether the key has been found. If not, the output struct remains unmodified.
-
naiGetMaterialTextureCount
public static int naiGetMaterialTextureCount(long pMat, int type)Unsafe version of:GetMaterialTextureCount
-
aiGetMaterialTextureCount
public static int aiGetMaterialTextureCount(AIMaterial pMat, int type)
Get the number of textures for a particular texture type.- Parameters:
pMat- Pointer to the input material. May not beNULLtype- Texture type to check for. One of:- Returns:
- Number of textures for this type.
-
naiGetMaterialTexture
public static int naiGetMaterialTexture(long pMat, int type, int index, long path, long mapping, long uvindex, long blend, long op, long mapmode, long flags)Unsafe version of:GetMaterialTexture
-
aiGetMaterialTexture
public static int aiGetMaterialTexture(AIMaterial pMat, int type, int index, AIString path, @Nullable java.nio.IntBuffer mapping, @Nullable java.nio.IntBuffer uvindex, @Nullable java.nio.FloatBuffer blend, @Nullable java.nio.IntBuffer op, @Nullable java.nio.IntBuffer mapmode, @Nullable java.nio.IntBuffer flags)
Helper function to get all values pertaining to a particular texture slot from a material structure.This function is provided just for convenience. You could also read the texture by parsing all of its properties manually. This function bundles all of them in a huge function monster.
- Parameters:
pMat- Pointer to the input material. May not beNULLtype- Specifies the texture stack to read from (e.g. diffuse, specular, height map ...). One of:index- Index of the texture. The function fails if the requested index is not available for this texture type.path- Receives the output path. This parameter must be non-null.mapping- The texture mapping mode to be used. PassNULLif you're not interested in this information.uvindex- For UV-mapped textures: receives the index of the UV source channel. Unmodified otherwise.blend- Receives the blend factor for the texture. PassNULLif you're not interested in this information.op- Receives the texture blend operation to be perform between this texture and the previous texture. PassNULLif you're not interested in this information.mapmode- Receives the mapping modes to be used for the texture. PassNULLif you're not interested in this information. Otherwise, pass a pointer to an array of twoaiTextureMapMode's (one for each axis, UV order).flags- Receives the texture flags.- Returns:
Return_SUCCESSon success, otherwise something else. Have fun.
-
naiGetLegalString
public static long naiGetLegalString()
Unsafe version of:GetLegalString
-
aiGetLegalString
public static java.lang.String aiGetLegalString()
Returns a string with legal copyright and licensing information about Assimp. The string may include multiple lines.- Returns:
- A string containing the legal information.
-
aiGetVersionMinor
public static int aiGetVersionMinor()
Returns the current minor version number of Assimp.- Returns:
- Minor version of the Assimp runtime the application was linked/built against
-
aiGetVersionMajor
public static int aiGetVersionMajor()
Returns the current major version number of Assimp.- Returns:
- Major version of the Assimp runtime the application was linked/built against
-
aiGetVersionRevision
public static int aiGetVersionRevision()
Returns the repository revision of the Assimp runtime.- Returns:
- SVN Repository revision number of the Assimp runtime the application was linked/built against.
-
naiGetBranchName
public static long naiGetBranchName()
Unsafe version of:GetBranchName
-
aiGetBranchName
@Nullable public static java.lang.String aiGetBranchName()
Returns the branch name of the Assimp runtime.- Returns:
- the current branch name
-
aiGetCompileFlags
public static int aiGetCompileFlags()
Returns assimp's compile flags.- Returns:
- Any bitwise combination of the
ASSIMP_CFLAGS_xxxconstants.
-
aiGetMaterialFloatArray
public static int aiGetMaterialFloatArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, float[] pOut, @Nullable int[] pMax) public static int aiGetMaterialFloatArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, float[] pOut, @Nullable int[] pMax)
Array version of:GetMaterialFloatArray
-
aiGetMaterialIntegerArray
public static int aiGetMaterialIntegerArray(AIMaterial pMat, java.nio.ByteBuffer pKey, int type, int index, int[] pOut, @Nullable int[] pMax) public static int aiGetMaterialIntegerArray(AIMaterial pMat, java.lang.CharSequence pKey, int type, int index, int[] pOut, @Nullable int[] pMax)
Array version of:GetMaterialIntegerArray
-
aiGetMaterialTexture
public static int aiGetMaterialTexture(AIMaterial pMat, int type, int index, AIString path, @Nullable int[] mapping, @Nullable int[] uvindex, @Nullable float[] blend, @Nullable int[] op, @Nullable int[] mapmode, @Nullable int[] flags)
Array version of:GetMaterialTexture
-
-