Merge branch 'master' into qt-5.11
commit
e75cc86375
258
CHANGES
258
CHANGES
|
@ -1,6 +1,264 @@
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
4.1.0 (2017-12):
|
||||||
|
- FEATURES:
|
||||||
|
- Export 3MF ( experimental )
|
||||||
|
- Import / Export glTF 2
|
||||||
|
- Introduce new zib-lib to eb able to export zip-archives
|
||||||
|
- FIXES/HOUSEKEEPING:
|
||||||
|
- Added missing include to stdlib.h and remove load library call
|
||||||
|
- Fix install for builds with MSVC compiler and NMake.
|
||||||
|
- Update list of supported file formats.
|
||||||
|
- Add TriLib to the official list of supported ports.
|
||||||
|
- Re-enabling PACK_STRUCT for MDL files.
|
||||||
|
- Use std.::unique_ptr
|
||||||
|
- Update D3MFExporter.h
|
||||||
|
- Update MD3Loader.cpp, using index
|
||||||
|
- Fix all warnings on MSVC14
|
||||||
|
- Copy assimp dll to unit folder on windows
|
||||||
|
- Update jvm port supported formats
|
||||||
|
- Add support for building Mac OS X Framework bundles
|
||||||
|
- Check for nullptr dereferencing before copying scene data
|
||||||
|
- Update ValidateDataStructure.h, typo
|
||||||
|
- Enable data structure validation in cases where it doesn't cause failures
|
||||||
|
- Remove some dead assignments
|
||||||
|
- fast_atof: Silence some uninitialized variable warnings
|
||||||
|
- Check for area test if the face is a triangle.
|
||||||
|
- Set mNumUVComponents to 0 when deleting texture coordinate sets
|
||||||
|
- Only scale the root node because this will rescale all children nodes as well.
|
||||||
|
- Issue 1514: Fix frame pointer arithmetic
|
||||||
|
- Prevent failing stringstream to crash the export process
|
||||||
|
- powf -> pow
|
||||||
|
- add Defines.h to include folder for install.
|
||||||
|
- Android:
|
||||||
|
- Fix android build
|
||||||
|
- Fix assimp for cross compile for android
|
||||||
|
- Use define for D_FILE_OFFSET_BITS only for not-android systems.
|
||||||
|
- FBX:
|
||||||
|
- Fix handling with embedded textures
|
||||||
|
- FBX 7500 Binary reading
|
||||||
|
- Remove dead assignment
|
||||||
|
- Fix export of deleted meshes; Add LazyDict::Remove method
|
||||||
|
- Log an error instead of letting the fbx-importer crash. ( issue 213 )
|
||||||
|
- Replace bad pointer casting with memcpy
|
||||||
|
- Remove useless const qualifier from return value
|
||||||
|
- Add explicit instantiation of log_prefix so other FBX source files can see it
|
||||||
|
- add missing inversion of postrotation matrix for fbx.
|
||||||
|
- FIReader: Silence uninitialized variable warning
|
||||||
|
- Update version check in FBX reader to check for version >= 7500
|
||||||
|
- Use actual min/max of anim keys when start/stop time is missing
|
||||||
|
- GLTF1:
|
||||||
|
- Fix output of glTF 1 version string
|
||||||
|
- Fix delete / delete[] mismatch in glTFAsset
|
||||||
|
- Don’t ignore rgba(1,1,1,1) color properties
|
||||||
|
- glTF2 primitives fixes
|
||||||
|
- Don’t ignore rgba(1,1,1,1) color properties
|
||||||
|
- Fix delete / delete[] mismatch in glTFAsset
|
||||||
|
- Remove KHR_binary_glTF code
|
||||||
|
- glTF nodes can only hold one mesh. this simply assigns to and check’s a Node’s Mesh
|
||||||
|
- version in glb header is stored as uint32_t
|
||||||
|
- GLTF2:
|
||||||
|
- node name conflict fix
|
||||||
|
- Fix transform matrices multiplication order
|
||||||
|
- Preserve node names when importing
|
||||||
|
- Add support for tangents in import
|
||||||
|
- Fix typo on gltf2 camera parameters
|
||||||
|
- Moved byteStride from accessor to bufferView
|
||||||
|
- Implemented reading binary glTF2 (glb) files
|
||||||
|
- Fix signed/unsigned warning
|
||||||
|
- Add postprocess step for scaling
|
||||||
|
- Fix shininess to roughness conversion
|
||||||
|
- Prefer “BLEND” over “MASK” as an alphaMode default
|
||||||
|
- Approximate specularity / glossiness in metallicRoughness materials
|
||||||
|
- Diffuse color and diffuse texture import and export improvements
|
||||||
|
- Addressed some mismatched news/deletes caused by the new glTF2 sources.
|
||||||
|
- Fix delete / delete[] mismatches in glTF2 importer
|
||||||
|
- use correct name of exporter to gltf2
|
||||||
|
- Fix possible infinite loop when exporting to gltf2
|
||||||
|
- Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars
|
||||||
|
- Fix glTF2 alphaMode storage and reading
|
||||||
|
- Fix glTF 2.0 multi-primitive support
|
||||||
|
- Load gltf .bin files from correct directory
|
||||||
|
- Add support for importing both glTF and glTF2 files
|
||||||
|
- ampler improvements; Add new LazyDict method
|
||||||
|
- Changes to GLTF2 materials
|
||||||
|
- Remove Light, Technique references
|
||||||
|
- Start removing materials common, and adding pbrSpecularGlossiness
|
||||||
|
- Use !ObjectEmpty() vs. MemberCount() > 0
|
||||||
|
- Working read, import, export, and write of gltf2 (pbr) material
|
||||||
|
- Check in gltf2 models to test directory
|
||||||
|
- Remove un-needed test models
|
||||||
|
- Start managing and importing gltf2 pbr materials
|
||||||
|
- Update glTF2 Asset to use indexes
|
||||||
|
- Duplicate gltfImporter as gltf2Importer; Include glTF2 importer in CMake List
|
||||||
|
- glTF2: Fix animation export
|
||||||
|
- use opacity for diffuse alpha + alphaMode
|
||||||
|
- STL:
|
||||||
|
- Restore import of multi mesh binary STLs
|
||||||
|
- Blender:
|
||||||
|
- Silence warning about uninitialized member
|
||||||
|
- MDLImporter:
|
||||||
|
- Don't take address of packed struct member
|
||||||
|
- assimp_cmd:
|
||||||
|
- Fix strict-aliasing warnings
|
||||||
|
- Open3DGC:
|
||||||
|
- Fix strict-aliasing warnings
|
||||||
|
- Add assertions to silence static analyzer warnings
|
||||||
|
- Remove redundant const qualifiers from return types
|
||||||
|
- Fix some uninitialized variable warnings
|
||||||
|
- Remove OPEN3DGC and compression references
|
||||||
|
- unzip:
|
||||||
|
- Remove dead assignment
|
||||||
|
- Bail on bad compression method
|
||||||
|
- Fix possibly uninitialized variables
|
||||||
|
- clipper:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- OpenDDLExport:
|
||||||
|
- Reduce scope of a variable
|
||||||
|
- Remove dead variable
|
||||||
|
- Remove dead assignment
|
||||||
|
- Fix another potential memory leak
|
||||||
|
- X3DImporter:
|
||||||
|
- Add assertions to silence static analyzer warnings
|
||||||
|
- Add missing unittest
|
||||||
|
- Workaround for buggy Android NDK (issue #1361)
|
||||||
|
- TerragenLoader:
|
||||||
|
- Remove unused variable
|
||||||
|
- SIBImporter:
|
||||||
|
- Add assertions to silence static analyzer warnings
|
||||||
|
- IFC:
|
||||||
|
- Remove dead code
|
||||||
|
- Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it
|
||||||
|
- PLY:
|
||||||
|
- Remove dead assignment and reduce scope of a variable
|
||||||
|
- fix vertex attribute lookup.
|
||||||
|
- OpenGEX:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- Fix for TextureFile with number in file name
|
||||||
|
- Return early when element is TextureFile
|
||||||
|
- NFF:
|
||||||
|
- Add assertions to silence static analyzer warnings
|
||||||
|
- Split up some complicated assignments
|
||||||
|
- Raw: Fix misleading indentation warning
|
||||||
|
- Reduce scope of a variable
|
||||||
|
- LWO
|
||||||
|
- Reduce scope of a variable
|
||||||
|
- IRRLoader:
|
||||||
|
- Fix confusing boolean casting
|
||||||
|
- AssbinExporter:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- ASE:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- AMFImporter:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- Add a block
|
||||||
|
- OptimizeGraph:
|
||||||
|
- Fix possible null pointer dereference
|
||||||
|
- RemoveRedundantMaterials:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- ImproveCacheLocality:
|
||||||
|
- Add assertion to silence a static analyzer warning
|
||||||
|
- RemoveRedundantMaterials:
|
||||||
|
- Set pointer to nullptr after deleting it
|
||||||
|
- Travis:
|
||||||
|
- Disable unit tests in scan-build config
|
||||||
|
- Move slower builds earlier to improve parallelization
|
||||||
|
- Add static analysis to build
|
||||||
|
- Remove unused branch rule for travis.
|
||||||
|
- Add Clang UBSan build configuration
|
||||||
|
- Treat warnings as errors, without typos this time
|
||||||
|
- Unittests:
|
||||||
|
- Add VS-based source groups for the unittests.
|
||||||
|
- Collada:
|
||||||
|
- export <library_animations> tag
|
||||||
|
- Update ColladaExporter.cpp
|
||||||
|
- Silence uninitialized variable warning
|
||||||
|
- Add support for line strip primitives
|
||||||
|
- Obj Wavefront:
|
||||||
|
- check in exporting against out-of-bounds-access .
|
||||||
|
- Issue 1351: use correct name for obj-meshname export for groups.
|
||||||
|
- fix mem-lead: face will be not released in case of an error.
|
||||||
|
- Anatoscope obj exporter nomtl
|
||||||
|
- Raise exception when obj file contains invalid face indices
|
||||||
|
- Added alternative displacement texture token in OBJ MTL material.
|
||||||
|
- Obj: rename attribute from exporter.
|
||||||
|
- Fix OBJ discarding all material names if the material library is missing
|
||||||
|
- Step:
|
||||||
|
- use correct lookup for utf32
|
||||||
|
- MD2:
|
||||||
|
- Fix MD2 frames containing garbage
|
||||||
|
- STL
|
||||||
|
- add missing const.
|
||||||
|
- Fix memory-alignment bug.
|
||||||
|
- Fix issue 104: deal with more solids in one STL file.
|
||||||
|
- CMake
|
||||||
|
- Fix issue 213: use correct include folder for assimp
|
||||||
|
- Doxygen
|
||||||
|
- Fix issue 1513: put irrXML onto exclucde list for doxygen run
|
||||||
|
- PyAssimp:
|
||||||
|
- Search for libassimp.so in LD_LIBRARY_PATH if available.
|
||||||
|
- Fix operator precedence issue in header check
|
||||||
|
- Split setup.py into multiple lines
|
||||||
|
- Detect if Anaconda and fixed 3d_viewer for Python 3
|
||||||
|
- created a python3 version of the 3dviewer and fixed the / = float in py3
|
||||||
|
- Blender:
|
||||||
|
- Fix invalid access to mesh array when the array is empty.
|
||||||
|
- Fix short overflow.
|
||||||
|
- Silence warning about inline function which is declared but not defined
|
||||||
|
- JAssimp
|
||||||
|
- Changed license header for IHMC contributions from Apache 2.0 to BSD
|
||||||
|
- Add Node metadata to the Jassmip Java API
|
||||||
|
- Added supported for custom IO Systems in Java. Implemented ClassLoader IO System
|
||||||
|
- Added a link to pure jvm assimp port
|
||||||
|
- Clang sanitizer:
|
||||||
|
- Undefined Behavior sanitizer
|
||||||
|
- Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug
|
||||||
|
- B3DImporter:
|
||||||
|
- Replace bad pointer casting with memcpy
|
||||||
|
- AppVeyor:
|
||||||
|
- Cleanup and Addition of VS 2017 and running Tests
|
||||||
|
- Fixed File Size reported as 0 in tests that use temporary files
|
||||||
|
- x86 isn't a valid VS platform. Win32 it is, then.
|
||||||
|
- Replaced the worker image name, which doesn't work as generator name, with a manually created generator name.
|
||||||
|
- Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests.
|
||||||
|
- Treat warnings as errors on Appveyor
|
||||||
|
- Disable warning 4351 on MSVC 2013
|
||||||
|
- OpenGEXImporter:
|
||||||
|
- Copy materials to scene
|
||||||
|
- Store RefInfo in unique_ptr so they get automatically cleaned up
|
||||||
|
- Fix IOStream leak
|
||||||
|
- Store ChildInfo in unique_ptr so they get automatically cleaned up
|
||||||
|
- improve logging to be able to detect error-prone situations.
|
||||||
|
- AMFImporter:
|
||||||
|
- Fix memory leak
|
||||||
|
- UnrealLoader:
|
||||||
|
- Fix IOStream leak
|
||||||
|
- Upgrade RapidJSON to get rid of a clang warning
|
||||||
|
- zlib:
|
||||||
|
- Update zlib contribution
|
||||||
|
- Removed unnecessary files from zlib contribution
|
||||||
|
- Replaced unsigned long for the crc table to z_crc_t, to match what is returned by get-crc_table
|
||||||
|
- MakeVerboseFormat:
|
||||||
|
- Fix delete / delete[] mismatches in MakeVerboseFormat
|
||||||
|
- MaterialSystem:
|
||||||
|
- Fix out-of-bounds read in MaterialSystem unit test
|
||||||
|
- SIB:
|
||||||
|
- Added support for SIB models from Silo 2.5
|
||||||
|
- AssbinExporter:
|
||||||
|
- Fix strict aliasing violation
|
||||||
|
- Add Write specialization for aiColor3D
|
||||||
|
- DefaultLogger:
|
||||||
|
- Whitespace cleanup to fix GCC misleading indentation warning
|
||||||
|
- MDP:
|
||||||
|
- Fix encoding issues.
|
||||||
|
- PreTransformVertices:
|
||||||
|
- fix name lost in mesh and nodes when load with flag
|
||||||
|
- C4D:
|
||||||
|
- Fixes for C4D importer
|
||||||
|
- Unzip:
|
||||||
|
- Latest greatest.
|
||||||
|
|
||||||
4.0.1 (2017-07-28)
|
4.0.1 (2017-07-28)
|
||||||
- FIXES/HOUSEKEEPING:
|
- FIXES/HOUSEKEEPING:
|
||||||
- fix version test.
|
- fix version test.
|
||||||
|
|
|
@ -140,8 +140,6 @@ Open Asset Import Library is implemented in C++. The directory structure is:
|
||||||
/tools Tools (old assimp viewer, command line `assimp`)
|
/tools Tools (old assimp viewer, command line `assimp`)
|
||||||
/samples A small number of samples to illustrate possible
|
/samples A small number of samples to illustrate possible
|
||||||
use cases for Assimp
|
use cases for Assimp
|
||||||
/workspaces Build environments for vc,xcode,... (deprecated,
|
|
||||||
CMake has superseeded all legacy build options!)
|
|
||||||
|
|
||||||
|
|
||||||
### Where to get help ###
|
### Where to get help ###
|
||||||
|
|
|
@ -71,7 +71,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \def MACRO_ATTRREAD_CHECK_REF
|
/// \def MACRO_ATTRREAD_CHECK_REF
|
||||||
/// Check curent attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
|
/// Check current attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
|
||||||
/// "continue" will called.
|
/// "continue" will called.
|
||||||
/// \param [in] pAttrName - attribute name.
|
/// \param [in] pAttrName - attribute name.
|
||||||
/// \param [out] pVarName - output variable name.
|
/// \param [out] pVarName - output variable name.
|
||||||
|
@ -84,7 +84,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \def MACRO_ATTRREAD_CHECK_RET
|
/// \def MACRO_ATTRREAD_CHECK_RET
|
||||||
/// Check curent attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
|
/// Check current attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
|
||||||
/// If result was read then "continue" will called.
|
/// If result was read then "continue" will called.
|
||||||
/// \param [in] pAttrName - attribute name.
|
/// \param [in] pAttrName - attribute name.
|
||||||
/// \param [out] pVarName - output variable name.
|
/// \param [out] pVarName - output variable name.
|
||||||
|
@ -130,7 +130,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
} while(false)
|
} while(false)
|
||||||
|
|
||||||
/// \def MACRO_NODECHECK_READCOMP_F
|
/// \def MACRO_NODECHECK_READCOMP_F
|
||||||
/// Check curent node name and if it equal to requested then read value. Result write to output variable of type "float".
|
/// Check current node name and if it equal to requested then read value. Result write to output variable of type "float".
|
||||||
/// If result was read then "continue" will called. Also check if node data already read then raise exception.
|
/// If result was read then "continue" will called. Also check if node data already read then raise exception.
|
||||||
/// \param [in] pNodeName - node name.
|
/// \param [in] pNodeName - node name.
|
||||||
/// \param [in, out] pReadFlag - read flag.
|
/// \param [in, out] pReadFlag - read flag.
|
||||||
|
@ -147,7 +147,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \def MACRO_NODECHECK_READCOMP_U32
|
/// \def MACRO_NODECHECK_READCOMP_U32
|
||||||
/// Check curent node name and if it equal to requested then read value. Result write to output variable of type "uint32_t".
|
/// Check current node name and if it equal to requested then read value. Result write to output variable of type "uint32_t".
|
||||||
/// If result was read then "continue" will called. Also check if node data already read then raise exception.
|
/// If result was read then "continue" will called. Also check if node data already read then raise exception.
|
||||||
/// \param [in] pNodeName - node name.
|
/// \param [in] pNodeName - node name.
|
||||||
/// \param [in, out] pReadFlag - read flag.
|
/// \param [in, out] pReadFlag - read flag.
|
||||||
|
|
|
@ -99,7 +99,7 @@ CAMFImporter_NodeElement* ne;
|
||||||
ParseHelper_Node_Exit();
|
ParseHelper_Node_Exit();
|
||||||
// check that all components was defined
|
// check that all components was defined
|
||||||
if(!(read_flag[0] && read_flag[1] && read_flag[2])) throw DeadlyImportError("Not all color components are defined.");
|
if(!(read_flag[0] && read_flag[1] && read_flag[2])) throw DeadlyImportError("Not all color components are defined.");
|
||||||
// check if <a> is absent. Then manualy add "a == 1".
|
// check if <a> is absent. Then manually add "a == 1".
|
||||||
if(!read_flag[3]) als.Color.a = 1;
|
if(!read_flag[3]) als.Color.a = 1;
|
||||||
|
|
||||||
}// if(!mReader->isEmptyElement())
|
}// if(!mReader->isEmptyElement())
|
||||||
|
|
|
@ -770,7 +770,7 @@ std::list<aiNode*> ch_node;
|
||||||
// find referenced object
|
// find referenced object
|
||||||
if(!Find_ConvertedNode(als.ObjectID, pNodeList, &found_node)) Throw_ID_NotFound(als.ObjectID);
|
if(!Find_ConvertedNode(als.ObjectID, pNodeList, &found_node)) Throw_ID_NotFound(als.ObjectID);
|
||||||
|
|
||||||
// create node for apllying transformation
|
// create node for applying transformation
|
||||||
t_node = new aiNode;
|
t_node = new aiNode;
|
||||||
t_node->mParent = con_node;
|
t_node->mParent = con_node;
|
||||||
// apply transformation
|
// apply transformation
|
||||||
|
|
|
@ -427,7 +427,7 @@ public:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
//! Construct a parser from a given input file which is
|
//! Construct a parser from a given input file which is
|
||||||
//! guaranted to be terminated with zero.
|
//! guaranteed to be terminated with zero.
|
||||||
//! @param szFile Input file
|
//! @param szFile Input file
|
||||||
//! @param fileFormatDefault Assumed file format version. If the
|
//! @param fileFormatDefault Assumed file format version. If the
|
||||||
//! file format is specified in the file the new value replaces
|
//! file format is specified in the file the new value replaces
|
||||||
|
|
|
@ -227,7 +227,7 @@ void DNAParser::Parse ()
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void DNA :: DumpToFile()
|
void DNA :: DumpToFile()
|
||||||
{
|
{
|
||||||
// we dont't bother using the VFS here for this is only for debugging.
|
// we don't bother using the VFS here for this is only for debugging.
|
||||||
// (and all your bases are belong to us).
|
// (and all your bases are belong to us).
|
||||||
|
|
||||||
std::ofstream f("dna.txt");
|
std::ofstream f("dna.txt");
|
||||||
|
|
|
@ -663,7 +663,7 @@ public:
|
||||||
/** Check whether a specific item is in the cache.
|
/** Check whether a specific item is in the cache.
|
||||||
* @param s Data type of the item
|
* @param s Data type of the item
|
||||||
* @param out Output pointer. Unchanged if the
|
* @param out Output pointer. Unchanged if the
|
||||||
* cache doens't know the item yet.
|
* cache doesn't know the item yet.
|
||||||
* @param ptr Item address to look for. */
|
* @param ptr Item address to look for. */
|
||||||
template <typename T> void get (
|
template <typename T> void get (
|
||||||
const Structure& s,
|
const Structure& s,
|
||||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define INCLUDED_AI_BLEND_TESSELLATOR_H
|
#define INCLUDED_AI_BLEND_TESSELLATOR_H
|
||||||
|
|
||||||
// Use these to toggle between GLU Tessellate or poly2tri
|
// Use these to toggle between GLU Tessellate or poly2tri
|
||||||
// Note (acg) keep GLU Tesselate disabled by default - if it is turned on,
|
// Note (acg) keep GLU Tessellate disabled by default - if it is turned on,
|
||||||
// assimp needs to be linked against GLU, which is currently not yet
|
// assimp needs to be linked against GLU, which is currently not yet
|
||||||
// made configurable in CMake and potentially not wanted by most users
|
// made configurable in CMake and potentially not wanted by most users
|
||||||
// as it requires a Gl environment.
|
// as it requires a Gl environment.
|
||||||
|
|
|
@ -189,7 +189,7 @@ protected:
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
// summarize a material in an convinient way.
|
// summarize a material in an convenient way.
|
||||||
struct Material
|
struct Material
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
|
@ -956,7 +956,7 @@ void ColladaLoader::StoreSceneMaterials( aiScene* pScene)
|
||||||
// Stores all animations
|
// Stores all animations
|
||||||
void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser)
|
void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser)
|
||||||
{
|
{
|
||||||
// recursivly collect all animations from the collada scene
|
// recursively collect all animations from the collada scene
|
||||||
StoreAnimations( pScene, pParser, &pParser.mAnims, "");
|
StoreAnimations( pScene, pParser, &pParser.mAnims, "");
|
||||||
|
|
||||||
// catch special case: many animations with the same length, each affecting only a single node.
|
// catch special case: many animations with the same length, each affecting only a single node.
|
||||||
|
@ -1784,7 +1784,7 @@ aiString ColladaLoader::FindFilenameForEffectTexture( const ColladaParser& pPars
|
||||||
|
|
||||||
// TODO: check the possibility of using the flag "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
|
// TODO: check the possibility of using the flag "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
|
||||||
// In FBX files textures are now stored internally by Assimp with their filename included
|
// In FBX files textures are now stored internally by Assimp with their filename included
|
||||||
// Now Assimp can lookup thru the loaded textures after all data is processed
|
// Now Assimp can lookup through the loaded textures after all data is processed
|
||||||
// We need to load all textures before referencing them, as FBX file format order may reference a texture before loading it
|
// We need to load all textures before referencing them, as FBX file format order may reference a texture before loading it
|
||||||
// This may occur on this case too, it has to be studied
|
// This may occur on this case too, it has to be studied
|
||||||
// setup texture reference string
|
// setup texture reference string
|
||||||
|
|
|
@ -1564,7 +1564,7 @@ void Converter::TrySetTextureProperties( aiMaterial* out_mat, const TextureMap&
|
||||||
if (textureReady) {
|
if (textureReady) {
|
||||||
// TODO: check the possibility of using the flag "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
|
// TODO: check the possibility of using the flag "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
|
||||||
// In FBX files textures are now stored internally by Assimp with their filename included
|
// In FBX files textures are now stored internally by Assimp with their filename included
|
||||||
// Now Assimp can lookup thru the loaded textures after all data is processed
|
// Now Assimp can lookup through the loaded textures after all data is processed
|
||||||
// We need to load all textures before referencing them, as FBX file format order may reference a texture before loading it
|
// We need to load all textures before referencing them, as FBX file format order may reference a texture before loading it
|
||||||
// This may occur on this case too, it has to be studied
|
// This may occur on this case too, it has to be studied
|
||||||
path.data[0] = '*';
|
path.data[0] = '*';
|
||||||
|
|
|
@ -575,11 +575,11 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
|
||||||
ai_assert( count != 0 );
|
ai_assert( count != 0 );
|
||||||
ai_assert( count <= MAX_CLASSNAMES);
|
ai_assert( count <= MAX_CLASSNAMES);
|
||||||
|
|
||||||
size_t lenghts[MAX_CLASSNAMES];
|
size_t lengths[MAX_CLASSNAMES];
|
||||||
|
|
||||||
const size_t c = count;
|
const size_t c = count;
|
||||||
for (size_t i = 0; i < c; ++i) {
|
for (size_t i = 0; i < c; ++i) {
|
||||||
lenghts[ i ] = strlen(classnames[i]);
|
lengths[ i ] = strlen(classnames[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<const Connection*> temp;
|
std::vector<const Connection*> temp;
|
||||||
|
@ -597,7 +597,7 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
|
||||||
|
|
||||||
for (size_t i = 0; i < c; ++i) {
|
for (size_t i = 0; i < c; ++i) {
|
||||||
ai_assert(classnames[i]);
|
ai_assert(classnames[i]);
|
||||||
if(static_cast<size_t>(std::distance(key.begin(),key.end())) == lenghts[i] && !strncmp(classnames[i],obtype,lenghts[i])) {
|
if(static_cast<size_t>(std::distance(key.begin(),key.end())) == lengths[i] && !strncmp(classnames[i],obtype,lengths[i])) {
|
||||||
obtype = NULL;
|
obtype = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -450,7 +450,7 @@ void FBXExporter::WriteDocuments ()
|
||||||
p.AddP70string("ActiveAnimStackName", ""); // should do this properly?
|
p.AddP70string("ActiveAnimStackName", ""); // should do this properly?
|
||||||
doc.AddChild(p);
|
doc.AddChild(p);
|
||||||
|
|
||||||
// UID for root node in scene heirarchy.
|
// UID for root node in scene hierarchy.
|
||||||
// always set to 0 in the case of a single document.
|
// always set to 0 in the case of a single document.
|
||||||
// not sure what happens if more than one document exists,
|
// not sure what happens if more than one document exists,
|
||||||
// but that won't matter to us as we're exporting a single scene.
|
// but that won't matter to us as we're exporting a single scene.
|
||||||
|
@ -650,7 +650,7 @@ void FBXExporter::WriteDefinitions ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Model / FbxNode
|
// Model / FbxNode
|
||||||
// <~~ node heirarchy
|
// <~~ node hierarchy
|
||||||
count = int32_t(count_nodes(mScene->mRootNode)) - 1; // (not counting root node)
|
count = int32_t(count_nodes(mScene->mRootNode)) - 1; // (not counting root node)
|
||||||
if (count) {
|
if (count) {
|
||||||
n = FBX::Node("ObjectType", "Model");
|
n = FBX::Node("ObjectType", "Model");
|
||||||
|
@ -1223,7 +1223,7 @@ void FBXExporter::WriteObjects ()
|
||||||
// it's all about this material
|
// it's all about this material
|
||||||
aiMaterial* m = mScene->mMaterials[i];
|
aiMaterial* m = mScene->mMaterials[i];
|
||||||
|
|
||||||
// these are used to recieve material data
|
// these are used to receive material data
|
||||||
float f; aiColor3D c;
|
float f; aiColor3D c;
|
||||||
|
|
||||||
// start the node record
|
// start the node record
|
||||||
|
@ -1311,7 +1311,7 @@ void FBXExporter::WriteObjects ()
|
||||||
// Now the legacy system.
|
// Now the legacy system.
|
||||||
// For safety let's include it.
|
// For safety let's include it.
|
||||||
// thrse values don't exist in the property template,
|
// thrse values don't exist in the property template,
|
||||||
// and usualy are completely ignored when loading.
|
// and usually are completely ignored when loading.
|
||||||
// One notable exception is the "Opacity" property,
|
// One notable exception is the "Opacity" property,
|
||||||
// which Blender uses as (1.0 - alpha).
|
// which Blender uses as (1.0 - alpha).
|
||||||
c.r = 0.0f; c.g = 0.0f; c.b = 0.0f;
|
c.r = 0.0f; c.g = 0.0f; c.b = 0.0f;
|
||||||
|
@ -1532,7 +1532,7 @@ void FBXExporter::WriteObjects ()
|
||||||
// bones.
|
// bones.
|
||||||
//
|
//
|
||||||
// output structure:
|
// output structure:
|
||||||
// subset of node heirarchy that are "skeleton",
|
// subset of node hierarchy that are "skeleton",
|
||||||
// i.e. do not have meshes but only bones.
|
// i.e. do not have meshes but only bones.
|
||||||
// but.. i'm not sure how anyone could guarantee that...
|
// but.. i'm not sure how anyone could guarantee that...
|
||||||
//
|
//
|
||||||
|
@ -1544,7 +1544,7 @@ void FBXExporter::WriteObjects ()
|
||||||
//
|
//
|
||||||
// well. we can assume a sane input, i suppose.
|
// well. we can assume a sane input, i suppose.
|
||||||
//
|
//
|
||||||
// so input is the bone node heirarchy,
|
// so input is the bone node hierarchy,
|
||||||
// with an extra thing for the transformation of the MESH in BONE space.
|
// with an extra thing for the transformation of the MESH in BONE space.
|
||||||
//
|
//
|
||||||
// output is a set of bone nodes,
|
// output is a set of bone nodes,
|
||||||
|
@ -1556,7 +1556,7 @@ void FBXExporter::WriteObjects ()
|
||||||
// and represents the influence of that bone on the grandparent mesh.
|
// and represents the influence of that bone on the grandparent mesh.
|
||||||
// the subdeformer has a list of indices, and weights,
|
// the subdeformer has a list of indices, and weights,
|
||||||
// with indices specifying vertex indices,
|
// with indices specifying vertex indices,
|
||||||
// and weights specifying the correspoding influence of this bone.
|
// and weights specifying the corresponding influence of this bone.
|
||||||
// it also has Transform and TransformLink elements,
|
// it also has Transform and TransformLink elements,
|
||||||
// specifying the transform of the MESH in BONE space,
|
// specifying the transform of the MESH in BONE space,
|
||||||
// and the transformation of the BONE in WORLD space,
|
// and the transformation of the BONE in WORLD space,
|
||||||
|
@ -1806,7 +1806,7 @@ void FBXExporter::WriteObjects ()
|
||||||
// and a correct skeleton would still be output.
|
// and a correct skeleton would still be output.
|
||||||
|
|
||||||
// transformlink should be the position of the bone in world space.
|
// transformlink should be the position of the bone in world space.
|
||||||
// if the bone is in the bind pose (or nonexistant),
|
// if the bone is in the bind pose (or nonexistent),
|
||||||
// we can just use the matrix we already calculated
|
// we can just use the matrix we already calculated
|
||||||
if (bone_xform_okay) {
|
if (bone_xform_okay) {
|
||||||
sdnode.AddChild("TransformLink", bone_xform);
|
sdnode.AddChild("TransformLink", bone_xform);
|
||||||
|
@ -1945,7 +1945,7 @@ void FBXExporter::WriteObjects ()
|
||||||
|
|
||||||
// TODO: cameras, lights
|
// TODO: cameras, lights
|
||||||
|
|
||||||
// write nodes (i.e. model heirarchy)
|
// write nodes (i.e. model hierarchy)
|
||||||
// start at root node
|
// start at root node
|
||||||
WriteModelNodes(
|
WriteModelNodes(
|
||||||
outstream, mScene->mRootNode, 0, limbnodes
|
outstream, mScene->mRootNode, 0, limbnodes
|
||||||
|
@ -2203,8 +2203,8 @@ void FBXExporter::WriteModelNode(
|
||||||
} else {
|
} else {
|
||||||
// apply the transformation chain.
|
// apply the transformation chain.
|
||||||
// these transformation elements are created when importing FBX,
|
// these transformation elements are created when importing FBX,
|
||||||
// which has a complex transformation heirarchy for each node.
|
// which has a complex transformation hierarchy for each node.
|
||||||
// as such we can bake the heirarchy back into the node on export.
|
// as such we can bake the hierarchy back into the node on export.
|
||||||
for (auto &item : transform_chain) {
|
for (auto &item : transform_chain) {
|
||||||
auto elem = transform_types.find(item.first);
|
auto elem = transform_types.find(item.first);
|
||||||
if (elem == transform_types.end()) {
|
if (elem == transform_types.end()) {
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace Assimp
|
||||||
const ExportProperties* mProperties; // currently unused
|
const ExportProperties* mProperties; // currently unused
|
||||||
std::shared_ptr<IOStream> outfile; // file to write to
|
std::shared_ptr<IOStream> outfile; // file to write to
|
||||||
|
|
||||||
std::vector<FBX::Node> connections; // conection storage
|
std::vector<FBX::Node> connections; // connection storage
|
||||||
|
|
||||||
std::vector<int64_t> mesh_uids;
|
std::vector<int64_t> mesh_uids;
|
||||||
std::vector<int64_t> material_uids;
|
std::vector<int64_t> material_uids;
|
||||||
|
|
|
@ -302,7 +302,7 @@ Video::Video(uint64_t id, const Element& element, const Document& doc, const std
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Content) {
|
if(Content) {
|
||||||
//this field is ommited when the embedded texture is already loaded, let's ignore if it's not found
|
//this field is omitted when the embedded texture is already loaded, let's ignore if it's not found
|
||||||
try {
|
try {
|
||||||
const Token& token = GetRequiredToken(*Content, 0);
|
const Token& token = GetRequiredToken(*Content, 0);
|
||||||
const char* data = token.begin();
|
const char* data = token.begin();
|
||||||
|
|
|
@ -54,6 +54,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
//remove mesh at position 'index' from the scene
|
||||||
|
static void removeMesh(aiScene* pScene, unsigned const index);
|
||||||
|
//correct node indices to meshes and remove references to deleted mesh
|
||||||
|
static void updateSceneGraph(aiNode* pNode, unsigned const index);
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
FindDegeneratesProcess::FindDegeneratesProcess()
|
FindDegeneratesProcess::FindDegeneratesProcess()
|
||||||
|
@ -87,11 +92,50 @@ void FindDegeneratesProcess::SetupProperties(const Importer* pImp) {
|
||||||
void FindDegeneratesProcess::Execute( aiScene* pScene) {
|
void FindDegeneratesProcess::Execute( aiScene* pScene) {
|
||||||
ASSIMP_LOG_DEBUG("FindDegeneratesProcess begin");
|
ASSIMP_LOG_DEBUG("FindDegeneratesProcess begin");
|
||||||
for (unsigned int i = 0; i < pScene->mNumMeshes;++i){
|
for (unsigned int i = 0; i < pScene->mNumMeshes;++i){
|
||||||
ExecuteOnMesh( pScene->mMeshes[ i ] );
|
if (ExecuteOnMesh(pScene->mMeshes[i])) {
|
||||||
|
removeMesh(pScene, i);
|
||||||
|
--i; //the current i is removed, do not skip the next one
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ASSIMP_LOG_DEBUG("FindDegeneratesProcess finished");
|
ASSIMP_LOG_DEBUG("FindDegeneratesProcess finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void removeMesh(aiScene* pScene, unsigned const index) {
|
||||||
|
//we start at index and copy the pointers one position forward
|
||||||
|
//save the mesh pointer to delete it later
|
||||||
|
auto delete_me = pScene->mMeshes[index];
|
||||||
|
for (unsigned i = index; i < pScene->mNumMeshes - 1; ++i) {
|
||||||
|
pScene->mMeshes[i] = pScene->mMeshes[i+1];
|
||||||
|
}
|
||||||
|
pScene->mMeshes[pScene->mNumMeshes - 1] = nullptr;
|
||||||
|
--(pScene->mNumMeshes);
|
||||||
|
delete delete_me;
|
||||||
|
|
||||||
|
//removing a mesh also requires updating all references to it in the scene graph
|
||||||
|
updateSceneGraph(pScene->mRootNode, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void updateSceneGraph(aiNode* pNode, unsigned const index) {
|
||||||
|
for (unsigned i = 0; i < pNode->mNumMeshes; ++i) {
|
||||||
|
if (pNode->mMeshes[i] > index) {
|
||||||
|
--(pNode->mMeshes[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (pNode->mMeshes[i] == index) {
|
||||||
|
for (unsigned j = i; j < pNode->mNumMeshes -1; ++j) {
|
||||||
|
pNode->mMeshes[j] = pNode->mMeshes[j+1];
|
||||||
|
}
|
||||||
|
--(pNode->mNumMeshes);
|
||||||
|
--i;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//recurse to all children
|
||||||
|
for (unsigned i = 0; i < pNode->mNumChildren; ++i) {
|
||||||
|
updateSceneGraph(pNode->mChildren[i], index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static ai_real heron( ai_real a, ai_real b, ai_real c ) {
|
static ai_real heron( ai_real a, ai_real b, ai_real c ) {
|
||||||
ai_real s = (a + b + c) / 2;
|
ai_real s = (a + b + c) / 2;
|
||||||
ai_real area = pow((s * ( s - a ) * ( s - b ) * ( s - c ) ), (ai_real)0.5 );
|
ai_real area = pow((s * ( s - a ) * ( s - b ) * ( s - c ) ), (ai_real)0.5 );
|
||||||
|
@ -125,7 +169,7 @@ static ai_real calculateAreaOfTriangle( const aiFace& face, aiMesh* mesh ) {
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Executes the post processing step on the given imported mesh
|
// Executes the post processing step on the given imported mesh
|
||||||
void FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh) {
|
bool FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh) {
|
||||||
mesh->mPrimitiveTypes = 0;
|
mesh->mPrimitiveTypes = 0;
|
||||||
|
|
||||||
std::vector<bool> remove_me;
|
std::vector<bool> remove_me;
|
||||||
|
@ -161,7 +205,7 @@ void FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh) {
|
||||||
|
|
||||||
// NOTE: we set the removed vertex index to an unique value
|
// NOTE: we set the removed vertex index to an unique value
|
||||||
// to make sure the developer gets notified when his
|
// to make sure the developer gets notified when his
|
||||||
// application attemps to access this data.
|
// application attempts to access this data.
|
||||||
face.mIndices[ face.mNumIndices ] = 0xdeadbeef;
|
face.mIndices[ face.mNumIndices ] = 0xdeadbeef;
|
||||||
|
|
||||||
if(first) {
|
if(first) {
|
||||||
|
@ -227,30 +271,28 @@ evil_jump_outside:
|
||||||
if (&face_src != &face_dest) {
|
if (&face_src != &face_dest) {
|
||||||
// clear source
|
// clear source
|
||||||
face_src.mNumIndices = 0;
|
face_src.mNumIndices = 0;
|
||||||
face_src.mIndices = NULL;
|
face_src.mIndices = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Otherwise delete it if we don't need this face
|
// Otherwise delete it if we don't need this face
|
||||||
delete[] face_src.mIndices;
|
delete[] face_src.mIndices;
|
||||||
face_src.mIndices = NULL;
|
face_src.mIndices = nullptr;
|
||||||
face_src.mNumIndices = 0;
|
face_src.mNumIndices = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Just leave the rest of the array unreferenced, we don't care for now
|
// Just leave the rest of the array unreferenced, we don't care for now
|
||||||
mesh->mNumFaces = n;
|
mesh->mNumFaces = n;
|
||||||
if (!mesh->mNumFaces) {
|
if (!mesh->mNumFaces) {
|
||||||
// WTF!?
|
//The whole mesh consists of degenerated faces
|
||||||
// OK ... for completeness and because I'm not yet tired,
|
//signal upward, that this mesh should be deleted.
|
||||||
// let's write code that will hopefully never be called
|
ASSIMP_LOG_DEBUG("FindDegeneratesProcess removed a mesh full of degenerated primitives");
|
||||||
// (famous last words)
|
return true;
|
||||||
|
|
||||||
// OK ... bad idea.
|
|
||||||
throw DeadlyImportError("Mesh is empty after removal of degenerated primitives ... WTF!?");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deg && !DefaultLogger::isNullLogger()) {
|
if (deg && !DefaultLogger::isNullLogger()) {
|
||||||
ASSIMP_LOG_WARN_F( "Found ", deg, " degenerated primitives");
|
ASSIMP_LOG_WARN_F( "Found ", deg, " degenerated primitives");
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,8 @@ public:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Execute step on a given mesh
|
// Execute step on a given mesh
|
||||||
void ExecuteOnMesh( aiMesh* mesh);
|
///@returns true if the current mesh should be deleted, false otherwise
|
||||||
|
bool ExecuteOnMesh( aiMesh* mesh);
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/// @brief Enable the instant removal of degenerated primitives
|
/// @brief Enable the instant removal of degenerated primitives
|
||||||
|
|
|
@ -91,7 +91,7 @@ protected:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Read a property of the specified type from the current XML element.
|
/** Read a property of the specified type from the current XML element.
|
||||||
* @param out Recives output data
|
* @param out Receives output data
|
||||||
*/
|
*/
|
||||||
void ReadHexProperty (HexProperty& out);
|
void ReadHexProperty (HexProperty& out);
|
||||||
void ReadStringProperty (StringProperty& out);
|
void ReadStringProperty (StringProperty& out);
|
||||||
|
|
|
@ -997,33 +997,33 @@ bool Importer::SetPropertyInteger(const char* szName, int iValue)
|
||||||
// Set a configuration property
|
// Set a configuration property
|
||||||
bool Importer::SetPropertyFloat(const char* szName, ai_real iValue)
|
bool Importer::SetPropertyFloat(const char* szName, ai_real iValue)
|
||||||
{
|
{
|
||||||
bool exising;
|
bool existing;
|
||||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||||
exising = SetGenericProperty<ai_real>(pimpl->mFloatProperties, szName,iValue);
|
existing = SetGenericProperty<ai_real>(pimpl->mFloatProperties, szName,iValue);
|
||||||
ASSIMP_END_EXCEPTION_REGION(bool);
|
ASSIMP_END_EXCEPTION_REGION(bool);
|
||||||
return exising;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Set a configuration property
|
// Set a configuration property
|
||||||
bool Importer::SetPropertyString(const char* szName, const std::string& value)
|
bool Importer::SetPropertyString(const char* szName, const std::string& value)
|
||||||
{
|
{
|
||||||
bool exising;
|
bool existing;
|
||||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||||
exising = SetGenericProperty<std::string>(pimpl->mStringProperties, szName,value);
|
existing = SetGenericProperty<std::string>(pimpl->mStringProperties, szName,value);
|
||||||
ASSIMP_END_EXCEPTION_REGION(bool);
|
ASSIMP_END_EXCEPTION_REGION(bool);
|
||||||
return exising;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Set a configuration property
|
// Set a configuration property
|
||||||
bool Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value)
|
bool Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value)
|
||||||
{
|
{
|
||||||
bool exising;
|
bool existing;
|
||||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||||
exising = SetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties, szName,value);
|
existing = SetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties, szName,value);
|
||||||
ASSIMP_END_EXCEPTION_REGION(bool);
|
ASSIMP_END_EXCEPTION_REGION(bool);
|
||||||
return exising;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -317,7 +317,7 @@ void TempMesh::FixupFaceOrientation()
|
||||||
IfcVector3 farthestCenter = std::accumulate(mVerts.begin() + faceStartIndices[farthestIndex],
|
IfcVector3 farthestCenter = std::accumulate(mVerts.begin() + faceStartIndices[farthestIndex],
|
||||||
mVerts.begin() + faceStartIndices[farthestIndex] + mVertcnt[farthestIndex], IfcVector3(0.0))
|
mVerts.begin() + faceStartIndices[farthestIndex] + mVertcnt[farthestIndex], IfcVector3(0.0))
|
||||||
/ IfcFloat(mVertcnt[farthestIndex]);
|
/ IfcFloat(mVertcnt[farthestIndex]);
|
||||||
// We accapt a bit of negative orientation without reversing. In case of doubt, prefer the orientation given in
|
// We accept a bit of negative orientation without reversing. In case of doubt, prefer the orientation given in
|
||||||
// the file.
|
// the file.
|
||||||
if( (farthestNormal * (farthestCenter - vavg).Normalize()) < -0.4 )
|
if( (farthestNormal * (farthestCenter - vavg).Normalize()) < -0.4 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -118,7 +118,7 @@ bool areVerticesEqual(const Vertex &lhs, const Vertex &rhs, bool complex)
|
||||||
// Squared because we check against squared length of the vector difference
|
// Squared because we check against squared length of the vector difference
|
||||||
static const float squareEpsilon = epsilon * epsilon;
|
static const float squareEpsilon = epsilon * epsilon;
|
||||||
|
|
||||||
// Square compare is useful for animeshes vertexes compare
|
// Square compare is useful for animeshes vertices compare
|
||||||
if ((lhs.position - rhs.position).SquareLength() > squareEpsilon) {
|
if ((lhs.position - rhs.position).SquareLength() > squareEpsilon) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,7 +410,7 @@ void LWSImporter::BuildGraph(aiNode* nd, LWS::NodeDesc& src, std::vector<Attachm
|
||||||
// name to attach light to node -> unique due to LWs indexing system
|
// name to attach light to node -> unique due to LWs indexing system
|
||||||
lit->mName = nd->mName;
|
lit->mName = nd->mName;
|
||||||
|
|
||||||
// detemine light type and setup additional members
|
// determine light type and setup additional members
|
||||||
if (src.lightType == 2) { /* spot light */
|
if (src.lightType == 2) { /* spot light */
|
||||||
|
|
||||||
lit->mType = aiLightSource_SPOT;
|
lit->mType = aiLightSource_SPOT;
|
||||||
|
|
|
@ -141,7 +141,7 @@ void MDLImporter::SetupProperties(const Importer* pImp)
|
||||||
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
|
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// AI_CONFIG_IMPORT_MDL_COLORMAP - pallette file
|
// AI_CONFIG_IMPORT_MDL_COLORMAP - palette file
|
||||||
configPalette = pImp->GetPropertyString(AI_CONFIG_IMPORT_MDL_COLORMAP,"colormap.lmp");
|
configPalette = pImp->GetPropertyString(AI_CONFIG_IMPORT_MDL_COLORMAP,"colormap.lmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1496,7 +1496,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
|
||||||
groupData.vTextureCoords1.resize(iNumVertices,aiVector3D());
|
groupData.vTextureCoords1.resize(iNumVertices,aiVector3D());
|
||||||
|
|
||||||
// check whether the triangle data structure is large enough
|
// check whether the triangle data structure is large enough
|
||||||
// to contain a second UV coodinate set
|
// to contain a second UV coordinate set
|
||||||
if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
|
if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
|
||||||
groupData.vTextureCoords2.resize(iNumVertices,aiVector3D());
|
groupData.vTextureCoords2.resize(iNumVertices,aiVector3D());
|
||||||
groupData.bNeed2UV = true;
|
groupData.bNeed2UV = true;
|
||||||
|
|
|
@ -217,7 +217,7 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
|
||||||
pMesh->mNumFaces = indexCount / 3;
|
pMesh->mNumFaces = indexCount / 3;
|
||||||
pMesh->mFaces = new aiFace[pMesh->mNumFaces];
|
pMesh->mFaces = new aiFace[pMesh->mNumFaces];
|
||||||
|
|
||||||
const int numIndices = 3; // trianglular face
|
const int numIndices = 3; // triangular face
|
||||||
for (unsigned int index = 0; index < pMesh->mNumFaces; index++) {
|
for (unsigned int index = 0; index < pMesh->mNumFaces; index++) {
|
||||||
pMesh->mFaces[index].mNumIndices = numIndices;
|
pMesh->mFaces[index].mNumIndices = numIndices;
|
||||||
unsigned int *indices = new unsigned int[numIndices];
|
unsigned int *indices = new unsigned int[numIndices];
|
||||||
|
|
|
@ -271,7 +271,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
|
||||||
|
|
||||||
ShadingInfo s; // current material info
|
ShadingInfo s; // current material info
|
||||||
|
|
||||||
// degree of tesselation
|
// degree of tessellation
|
||||||
unsigned int iTesselation = 4;
|
unsigned int iTesselation = 4;
|
||||||
|
|
||||||
// some temporary variables we need to parse the file
|
// some temporary variables we need to parse the file
|
||||||
|
@ -988,7 +988,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
|
||||||
::ai_snprintf(currentMesh.name,128,"cone_%i",cone++);
|
::ai_snprintf(currentMesh.name,128,"cone_%i",cone++);
|
||||||
else ::ai_snprintf(currentMesh.name,128,"cylinder_%i",cylinder++);
|
else ::ai_snprintf(currentMesh.name,128,"cylinder_%i",cylinder++);
|
||||||
}
|
}
|
||||||
// 'tess' - tesselation
|
// 'tess' - tessellation
|
||||||
else if (TokenMatch(sz,"tess",4))
|
else if (TokenMatch(sz,"tess",4))
|
||||||
{
|
{
|
||||||
SkipSpaces(&sz);
|
SkipSpaces(&sz);
|
||||||
|
|
|
@ -691,7 +691,7 @@ void OpenGEXImporter::handleTransformNode( ODDLParser::DDLNode *node, aiScene *
|
||||||
void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
|
void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene ) {
|
||||||
m_currentMesh = new aiMesh;
|
m_currentMesh = new aiMesh;
|
||||||
const size_t meshidx( m_meshCache.size() );
|
const size_t meshidx( m_meshCache.size() );
|
||||||
// ownership is transfered but a reference remains in m_currentMesh
|
// ownership is transferred but a reference remains in m_currentMesh
|
||||||
m_meshCache.emplace_back( m_currentMesh );
|
m_meshCache.emplace_back( m_currentMesh );
|
||||||
|
|
||||||
Property *prop = node->getProperties();
|
Property *prop = node->getProperties();
|
||||||
|
|
|
@ -102,7 +102,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** @brief Rmeove a node from the list of locked nodes.
|
/** @brief Remove a node from the list of locked nodes.
|
||||||
* @param name Name to be unlocked
|
* @param name Name to be unlocked
|
||||||
*/
|
*/
|
||||||
inline void RemoveLockedNode(std::string& name)
|
inline void RemoveLockedNode(std::string& name)
|
||||||
|
|
|
@ -212,7 +212,7 @@ template <> struct MinMaxChooser<aiVertexWeight> {
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
/** @brief Find the min/max values of an array of Ts
|
/** @brief Find the min/max values of an array of Ts
|
||||||
* @param in Input array
|
* @param in Input array
|
||||||
* @param size Numebr of elements to process
|
* @param size Number of elements to process
|
||||||
* @param[out] min minimum value
|
* @param[out] min minimum value
|
||||||
* @param[out] max maximum value
|
* @param[out] max maximum value
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -104,7 +104,7 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
|
||||||
|
|
||||||
aiVector3D* p = mesh->mTextureCoords[i], *end = p+mesh->mNumVertices;
|
aiVector3D* p = mesh->mTextureCoords[i], *end = p+mesh->mNumVertices;
|
||||||
|
|
||||||
// Ensure unsued components are zeroed. This will make 1D texture channels work
|
// Ensure unused components are zeroed. This will make 1D texture channels work
|
||||||
// as if they were 2D channels .. just in case an application doesn't handle
|
// as if they were 2D channels .. just in case an application doesn't handle
|
||||||
// this case
|
// this case
|
||||||
if (2 == mesh->mNumUVComponents[i]) {
|
if (2 == mesh->mNumUVComponents[i]) {
|
||||||
|
|
|
@ -377,7 +377,7 @@ void StandardShapes::MakeSphere(unsigned int tess,
|
||||||
MakeIcosahedron(positions);
|
MakeIcosahedron(positions);
|
||||||
|
|
||||||
// ... and subdivide it until the requested output
|
// ... and subdivide it until the requested output
|
||||||
// tesselation is reached
|
// tessellation is reached
|
||||||
for (unsigned int i = 0; i<tess;++i)
|
for (unsigned int i = 0; i<tess;++i)
|
||||||
Subdivide(positions);
|
Subdivide(positions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ void StepExporter::WriteFile()
|
||||||
// see http://shodhganga.inflibnet.ac.in:8080/jspui/bitstream/10603/14116/11/11_chapter%203.pdf
|
// see http://shodhganga.inflibnet.ac.in:8080/jspui/bitstream/10603/14116/11/11_chapter%203.pdf
|
||||||
// note, that all realnumber values must be comma separated in x files
|
// note, that all realnumber values must be comma separated in x files
|
||||||
mOutput.setf(std::ios::fixed);
|
mOutput.setf(std::ios::fixed);
|
||||||
// precission for double
|
// precision for double
|
||||||
// see http://stackoverflow.com/questions/554063/how-do-i-print-a-double-value-with-full-precision-using-cout
|
// see http://stackoverflow.com/questions/554063/how-do-i-print-a-double-value-with-full-precision-using-cout
|
||||||
mOutput.precision(16);
|
mOutput.precision(16);
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
|
||||||
{
|
{
|
||||||
/* This function tries to simplify the input UV transformation.
|
/* This function tries to simplify the input UV transformation.
|
||||||
* That's very important as it allows us to reduce the number
|
* That's very important as it allows us to reduce the number
|
||||||
* of output UV channels. The oder in which the transformations
|
* of output UV channels. The order in which the transformations
|
||||||
* are applied is - as always - scaling, rotation, translation.
|
* are applied is - as always - scaling, rotation, translation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ static const unsigned int MajorVersion = 4;
|
||||||
static const unsigned int MinorVersion = 1;
|
static const unsigned int MinorVersion = 1;
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------
|
||||||
// Legal information string - dont't remove this.
|
// Legal information string - don't remove this.
|
||||||
static const char* LEGAL_INFORMATION =
|
static const char* LEGAL_INFORMATION =
|
||||||
|
|
||||||
"Open Asset Import Library (Assimp).\n"
|
"Open Asset Import Library (Assimp).\n"
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Assimp
|
||||||
/// Limitations.
|
/// Limitations.
|
||||||
///
|
///
|
||||||
/// Pay attention that X3D is format for interactive graphic and simulations for web browsers. aiScene can not contain all features of the X3D format.
|
/// Pay attention that X3D is format for interactive graphic and simulations for web browsers. aiScene can not contain all features of the X3D format.
|
||||||
/// Also, aiScene contain rasterized-like data. For example, X3D can describe circle all cylinder with one tag, but aiScene contain result of tesselation:
|
/// Also, aiScene contain rasterized-like data. For example, X3D can describe circle all cylinder with one tag, but aiScene contain result of tessellation:
|
||||||
/// vertices, faces etc. Yes, you can use algorithm for detecting figures or shapes, but that's not a good idea at all.
|
/// vertices, faces etc. Yes, you can use algorithm for detecting figures or shapes, but that's not a good idea at all.
|
||||||
///
|
///
|
||||||
/// Supported nodes:
|
/// Supported nodes:
|
||||||
|
|
|
@ -522,7 +522,7 @@ private:
|
||||||
/// \param [in] pStartAngle - angle in radians of start of the arc.
|
/// \param [in] pStartAngle - angle in radians of start of the arc.
|
||||||
/// \param [in] pEndAngle - angle in radians of end of the arc.
|
/// \param [in] pEndAngle - angle in radians of end of the arc.
|
||||||
/// \param [in] pRadius - radius of the arc.
|
/// \param [in] pRadius - radius of the arc.
|
||||||
/// \param [out] pNumSegments - number of segments in arc. In other words - tesselation factor.
|
/// \param [out] pNumSegments - number of segments in arc. In other words - tessellation factor.
|
||||||
/// \param [out] pVertices - generated vertices.
|
/// \param [out] pVertices - generated vertices.
|
||||||
void GeometryHelper_Make_Arc2D(const float pStartAngle, const float pEndAngle, const float pRadius, size_t pNumSegments, std::list<aiVector3D>& pVertices);
|
void GeometryHelper_Make_Arc2D(const float pStartAngle, const float pEndAngle, const float pRadius, size_t pNumSegments, std::list<aiVector3D>& pVertices);
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ void X3DImporter::ParseNode_Geometry3D_Cone()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const unsigned int tess = 30;///TODO: IME tesselation factor through ai_property
|
const unsigned int tess = 30;///TODO: IME tessellation factor through ai_property
|
||||||
|
|
||||||
std::vector<aiVector3D> tvec;// temp array for vertices.
|
std::vector<aiVector3D> tvec;// temp array for vertices.
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ void X3DImporter::ParseNode_Geometry3D_Cylinder()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const unsigned int tess = 30;///TODO: IME tesselation factor through ai_property
|
const unsigned int tess = 30;///TODO: IME tessellation factor through ai_property
|
||||||
|
|
||||||
std::vector<aiVector3D> tside;// temp array for vertices of side.
|
std::vector<aiVector3D> tside;// temp array for vertices of side.
|
||||||
std::vector<aiVector3D> tcir;// temp array for vertices of circle.
|
std::vector<aiVector3D> tcir;// temp array for vertices of circle.
|
||||||
|
@ -480,7 +480,7 @@ static aiVector3D GeometryHelper_Extrusion_GetNextY(const size_t pSpine_PointIdx
|
||||||
tvec = pSpine[1] - pSpine[0];
|
tvec = pSpine[1] - pSpine[0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{// The Y-axis used for the last point it is the vector from spine[n-2] to spine[n-1]. In our case(see above about droping tail) spine[n - 1] is
|
{// The Y-axis used for the last point it is the vector from spine[n-2] to spine[n-1]. In our case(see above about dropping tail) spine[n - 1] is
|
||||||
// the spine[0].
|
// the spine[0].
|
||||||
tvec = pSpine[spine_idx_last] - pSpine[spine_idx_last - 1];
|
tvec = pSpine[spine_idx_last] - pSpine[spine_idx_last - 1];
|
||||||
}
|
}
|
||||||
|
@ -967,7 +967,7 @@ void X3DImporter::ParseNode_Geometry3D_Sphere()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const unsigned int tess = 3;///TODO: IME tesselation factor through ai_property
|
const unsigned int tess = 3;///TODO: IME tessellation factor through ai_property
|
||||||
|
|
||||||
std::vector<aiVector3D> tlist;
|
std::vector<aiVector3D> tlist;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \def MACRO_ATTRREAD_CHECK_REF
|
/// \def MACRO_ATTRREAD_CHECK_REF
|
||||||
/// Check curent attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
|
/// Check current attribute name and if it equal to requested then read value. Result write to output variable by reference. If result was read then
|
||||||
/// "continue" will called.
|
/// "continue" will called.
|
||||||
/// \param [in] pAttrName - attribute name.
|
/// \param [in] pAttrName - attribute name.
|
||||||
/// \param [out] pVarName - output variable name.
|
/// \param [out] pVarName - output variable name.
|
||||||
|
@ -89,7 +89,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \def MACRO_ATTRREAD_CHECK_RET
|
/// \def MACRO_ATTRREAD_CHECK_RET
|
||||||
/// Check curent attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
|
/// Check current attribute name and if it equal to requested then read value. Result write to output variable using return value of \ref pFunction.
|
||||||
/// If result was read then "continue" will called.
|
/// If result was read then "continue" will called.
|
||||||
/// \param [in] pAttrName - attribute name.
|
/// \param [in] pAttrName - attribute name.
|
||||||
/// \param [out] pVarName - output variable name.
|
/// \param [out] pVarName - output variable name.
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace Assimp
|
||||||
if(!mReader->isEmptyElement()) \
|
if(!mReader->isEmptyElement()) \
|
||||||
ParseNode_Metadata(pNE, pMetaName);/* in that case node element will be added to child elements list of current node. */ \
|
ParseNode_Metadata(pNE, pMetaName);/* in that case node element will be added to child elements list of current node. */ \
|
||||||
else \
|
else \
|
||||||
NodeElement_Cur->Child.push_back(pNE);/* else - add element to child list manualy */ \
|
NodeElement_Cur->Child.push_back(pNE);/* else - add element to child list manually */ \
|
||||||
\
|
\
|
||||||
NodeElement_List.push_back(pNE);/* add new element to elements list. */ \
|
NodeElement_List.push_back(pNE);/* add new element to elements list. */ \
|
||||||
}/* if(!pUSE_Var.empty()) else */ \
|
}/* if(!pUSE_Var.empty()) else */ \
|
||||||
|
|
|
@ -132,7 +132,7 @@ void XFileExporter::WriteFile()
|
||||||
{
|
{
|
||||||
// note, that all realnumber values must be comma separated in x files
|
// note, that all realnumber values must be comma separated in x files
|
||||||
mOutput.setf(std::ios::fixed);
|
mOutput.setf(std::ios::fixed);
|
||||||
mOutput.precision(16); // precission for double
|
mOutput.precision(16); // precision for double
|
||||||
|
|
||||||
// entry of writing the file
|
// entry of writing the file
|
||||||
WriteHeader();
|
WriteHeader();
|
||||||
|
|
|
@ -498,7 +498,7 @@ aiMatrix4x4 XGLImporter::ReadTrafo()
|
||||||
right = forward ^ up;
|
right = forward ^ up;
|
||||||
if (std::fabs(up * forward) > 1e-4) {
|
if (std::fabs(up * forward) > 1e-4) {
|
||||||
// this is definitely wrong - a degenerate coordinate space ruins everything
|
// this is definitely wrong - a degenerate coordinate space ruins everything
|
||||||
// so subtitute identity transform.
|
// so substitute identity transform.
|
||||||
LogError("<forward> and <up> vectors in <transform> are skewing, ignoring trafo");
|
LogError("<forward> and <up> vectors in <transform> are skewing, ignoring trafo");
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,7 +386,7 @@ namespace glTF2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! Base classe for all glTF top-level objects
|
//! Base class for all glTF top-level objects
|
||||||
struct Object
|
struct Object
|
||||||
{
|
{
|
||||||
int index; //!< The index of this object within its property container
|
int index; //!< The index of this object within its property container
|
||||||
|
|
|
@ -381,7 +381,7 @@ namespace glTF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! Base classe for all glTF top-level objects
|
//! Base class for all glTF top-level objects
|
||||||
struct Object
|
struct Object
|
||||||
{
|
{
|
||||||
std::string id; //!< The globally unique ID used to reference this object
|
std::string id; //!< The globally unique ID used to reference this object
|
||||||
|
|
|
@ -703,7 +703,7 @@ void glTFExporter::ExportMeshes()
|
||||||
// Coordinates indices
|
// Coordinates indices
|
||||||
comp_o3dgc_ifs.SetNCoordIndex(aim->mNumFaces);
|
comp_o3dgc_ifs.SetNCoordIndex(aim->mNumFaces);
|
||||||
comp_o3dgc_ifs.SetCoordIndex((IndicesType* const)&b->GetPointer()[idx_srcdata_ind]);
|
comp_o3dgc_ifs.SetCoordIndex((IndicesType* const)&b->GetPointer()[idx_srcdata_ind]);
|
||||||
// Prepare to enconding
|
// Prepare to encoding
|
||||||
comp_o3dgc_params.SetNumFloatAttributes(comp_o3dgc_ifs.GetNumFloatAttributes());
|
comp_o3dgc_params.SetNumFloatAttributes(comp_o3dgc_ifs.GetNumFloatAttributes());
|
||||||
if(mProperties->GetPropertyBool("extensions.Open3DGC.binary", true))
|
if(mProperties->GetPropertyBool("extensions.Open3DGC.binary", true))
|
||||||
comp_o3dgc_params.SetStreamType(o3dgc::O3DGC_STREAM_TYPE_BINARY);
|
comp_o3dgc_params.SetStreamType(o3dgc::O3DGC_STREAM_TYPE_BINARY);
|
||||||
|
|
10
doc/dox.h
10
doc/dox.h
|
@ -164,7 +164,7 @@ If done correctly you should now be able to compile, link, run and use the appli
|
||||||
@section install_own Building the library from scratch
|
@section install_own Building the library from scratch
|
||||||
|
|
||||||
First you need to install cmake. Now just get the code from github or download the latest version from the webside.
|
First you need to install cmake. Now just get the code from github or download the latest version from the webside.
|
||||||
to buil the library just open a command-prompt / bash, navigate into the repo-folder and run cmake via:
|
to build the library just open a command-prompt / bash, navigate into the repo-folder and run cmake via:
|
||||||
|
|
||||||
@code
|
@code
|
||||||
cmake CMakeLists.txt
|
cmake CMakeLists.txt
|
||||||
|
@ -653,7 +653,7 @@ To apply such an animation you need to identify the animation tracks that refer
|
||||||
in your mesh. Then for every track: <br>
|
in your mesh. Then for every track: <br>
|
||||||
a) Find the keys that lay right before the current anim time. <br>
|
a) Find the keys that lay right before the current anim time. <br>
|
||||||
b) Optional: interpolate between these and the following keys. <br>
|
b) Optional: interpolate between these and the following keys. <br>
|
||||||
c) Combine the calculated position, rotation and scaling to a tranformation matrix <br>
|
c) Combine the calculated position, rotation and scaling to a transformation matrix <br>
|
||||||
d) Set the affected node's transformation to the calculated matrix. <br>
|
d) Set the affected node's transformation to the calculated matrix. <br>
|
||||||
|
|
||||||
If you need hints on how to convert to or from quaternions, have a look at the
|
If you need hints on how to convert to or from quaternions, have a look at the
|
||||||
|
@ -669,7 +669,7 @@ Such textures are loaded into an aiTexture structure.
|
||||||
|
|
||||||
In previous versions, the path from the query for `AI_MATKEY_TEXTURE(textureType, index)` would be
|
In previous versions, the path from the query for `AI_MATKEY_TEXTURE(textureType, index)` would be
|
||||||
`*<index>` where `<index>` is the index of the texture in aiScene::mTextures. Now this call will
|
`*<index>` where `<index>` is the index of the texture in aiScene::mTextures. Now this call will
|
||||||
return a file path for embedded textures in FBX files. To test if it is an embdedded texture use
|
return a file path for embedded textures in FBX files. To test if it is an embedded texture use
|
||||||
aiScene::GetEmbeddedTexture. If the returned pointer is not null, it is embedded und can be loaded
|
aiScene::GetEmbeddedTexture. If the returned pointer is not null, it is embedded und can be loaded
|
||||||
from the data structure. If it is null, search for a separate file. Other file types still use the
|
from the data structure. If it is null, search for a separate file. Other file types still use the
|
||||||
old behaviour.<br>
|
old behaviour.<br>
|
||||||
|
@ -794,7 +794,7 @@ All material key constants start with 'AI_MATKEY' (it's an ugly macro for histor
|
||||||
<td><tt>COLOR_REFLECTIVE</tt></td>
|
<td><tt>COLOR_REFLECTIVE</tt></td>
|
||||||
<td>aiColor3D</td>
|
<td>aiColor3D</td>
|
||||||
<td>black (0,0,0)</td>
|
<td>black (0,0,0)</td>
|
||||||
<td>Defines the reflective color of the material. This is typically scaled by the amount of incoming light from the direction of mirror reflection. Usually combined with an enviroment lightmap of some kind for real-time applications.</td>
|
<td>Defines the reflective color of the material. This is typically scaled by the amount of incoming light from the direction of mirror reflection. Usually combined with an environment lightmap of some kind for real-time applications.</td>
|
||||||
<td>---</td>
|
<td>---</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -819,7 +819,7 @@ All material key constants start with 'AI_MATKEY' (it's an ugly macro for histor
|
||||||
<td>int</td>
|
<td>int</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>Specifies whether meshes using this material must be rendered without backface culling. 0 for false, !0 for true. </td>
|
<td>Specifies whether meshes using this material must be rendered without backface culling. 0 for false, !0 for true. </td>
|
||||||
<td>Some importers set this property if they don't know whether the output face oder is right. As long as it is not set, you may safely enable backface culling.</tt></td>
|
<td>Some importers set this property if they don't know whether the output face order is right. As long as it is not set, you may safely enable backface culling.</tt></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -59,9 +59,9 @@ build_arch()
|
||||||
$XCODE_ROOT_DIR/Developer/usr/bin/make clean
|
$XCODE_ROOT_DIR/Developer/usr/bin/make clean
|
||||||
$XCODE_ROOT_DIR/Developer/usr/bin/make assimp -j 8 -l
|
$XCODE_ROOT_DIR/Developer/usr/bin/make assimp -j 8 -l
|
||||||
|
|
||||||
echo "[!] Moving built library into: $BUILD_DIR/$1/"
|
echo "[!] Moving built libraries into: $BUILD_DIR/$1/"
|
||||||
|
|
||||||
mv ./lib/libassimp.a $BUILD_DIR/$1/
|
mv ./lib/*.a $BUILD_DIR/$1/
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "[!] $0 - assimp iOS build script"
|
echo "[!] $0 - assimp iOS build script"
|
||||||
|
@ -110,14 +110,27 @@ for ARCH_TARGET in $DEPLOY_ARCHS; do
|
||||||
#rm ./lib/libassimp.a
|
#rm ./lib/libassimp.a
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$DEPLOY_FAT" -eq 1 ]]; then
|
|
||||||
echo '[+] Creating fat binary ...'
|
make_fat_binary()
|
||||||
|
{
|
||||||
|
LIB_NAME=$1
|
||||||
|
LIPO_ARGS=''
|
||||||
for ARCH_TARGET in $DEPLOY_ARCHS; do
|
for ARCH_TARGET in $DEPLOY_ARCHS; do
|
||||||
LIPO_ARGS="$LIPO_ARGS-arch $ARCH_TARGET $BUILD_DIR/$ARCH_TARGET/libassimp.a "
|
LIPO_ARGS="$LIPO_ARGS-arch $ARCH_TARGET $BUILD_DIR/$ARCH_TARGET/$LIB_NAME.a "
|
||||||
done
|
done
|
||||||
LIPO_ARGS="$LIPO_ARGS-create -output $BUILD_DIR/libassimp-fat.a"
|
LIPO_ARGS="$LIPO_ARGS-create -output $BUILD_DIR/$LIB_NAME-fat.a"
|
||||||
lipo $LIPO_ARGS
|
lipo $LIPO_ARGS
|
||||||
echo "[!] Done! The fat binary can be found at $BUILD_DIR"
|
}
|
||||||
|
|
||||||
|
if [[ "$DEPLOY_FAT" -eq 1 ]]; then
|
||||||
|
echo '[+] Creating fat binaries ...'
|
||||||
|
|
||||||
|
make_fat_binary 'libassimp'
|
||||||
|
make_fat_binary 'libIrrXML'
|
||||||
|
make_fat_binary 'libzlibstatic'
|
||||||
|
|
||||||
|
echo "[!] Done! The fat binaries can be found at $BUILD_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 2006-2015, assimp team
|
Copyright (c) 2006-2018, assimp team
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "assimp_view.h"
|
#include "assimp_view.h"
|
||||||
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
using namespace AssimpView;
|
using namespace AssimpView;
|
||||||
|
|
|
@ -96,8 +96,9 @@ D3DXVECTOR4 g_aclNormalColors[14] =
|
||||||
void GetNodeCount(aiNode* pcNode, unsigned int* piCnt)
|
void GetNodeCount(aiNode* pcNode, unsigned int* piCnt)
|
||||||
{
|
{
|
||||||
*piCnt = *piCnt+1;
|
*piCnt = *piCnt+1;
|
||||||
for (unsigned int i = 0; i < pcNode->mNumChildren;++i)
|
for (unsigned int i = 0; i < pcNode->mNumChildren; ++i) {
|
||||||
GetNodeCount(pcNode->mChildren[i],piCnt);
|
GetNodeCount(pcNode->mChildren[i], piCnt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
|
@ -1042,16 +1043,23 @@ int CDisplay::OnSetupTextureView(TextureInfo* pcNew)
|
||||||
switch (pcNew->eOp)
|
switch (pcNew->eOp)
|
||||||
{
|
{
|
||||||
case aiTextureOp_Add:
|
case aiTextureOp_Add:
|
||||||
szOp = "add";break;
|
szOp = "add";
|
||||||
|
break;
|
||||||
case aiTextureOp_Subtract:
|
case aiTextureOp_Subtract:
|
||||||
szOp = "sub";break;
|
szOp = "sub";
|
||||||
|
break;
|
||||||
case aiTextureOp_Divide:
|
case aiTextureOp_Divide:
|
||||||
szOp = "div";break;
|
szOp = "div";
|
||||||
|
break;
|
||||||
case aiTextureOp_SignedAdd:
|
case aiTextureOp_SignedAdd:
|
||||||
szOp = "addsign";break;
|
szOp = "addsign";
|
||||||
|
break;
|
||||||
case aiTextureOp_SmoothAdd:
|
case aiTextureOp_SmoothAdd:
|
||||||
szOp = "addsmooth";break;
|
szOp = "addsmooth";
|
||||||
default: szOp = "mul";
|
break;
|
||||||
|
default:
|
||||||
|
szOp = "mul";
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_ELOAD),szOp);
|
SetWindowText(GetDlgItem(g_hDlg,IDC_ELOAD),szOp);
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,7 @@ void SaveHistory();
|
||||||
// File associations are registered in HKCU\Software\Classes. They might
|
// File associations are registered in HKCU\Software\Classes. They might
|
||||||
// be overwritten by global file associations.
|
// be overwritten by global file associations.
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
void MakeFileAssociations()
|
void MakeFileAssociations() {
|
||||||
{
|
|
||||||
char szTemp2[MAX_PATH];
|
char szTemp2[MAX_PATH];
|
||||||
char szTemp[MAX_PATH + 10];
|
char szTemp[MAX_PATH + 10];
|
||||||
|
|
||||||
|
@ -1404,7 +1403,7 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
|
||||||
|
|
||||||
g_hDlg = hwndDlg;
|
g_hDlg = hwndDlg;
|
||||||
|
|
||||||
// load the state of the usr interface
|
// load the state of the user interface
|
||||||
InitUI();
|
InitUI();
|
||||||
|
|
||||||
// load the file history
|
// load the file history
|
||||||
|
@ -1648,11 +1647,6 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
|
||||||
xPos = xPos2 = sPoint.x;
|
xPos = xPos2 = sPoint.x;
|
||||||
yPos = yPos2 = sPoint.y;
|
yPos = yPos2 = sPoint.y;
|
||||||
|
|
||||||
/* xPos -= 10;
|
|
||||||
yPos -= 10;
|
|
||||||
xPos2 = xPos-3;
|
|
||||||
yPos2 = yPos-5;*/
|
|
||||||
|
|
||||||
RECT sRect;
|
RECT sRect;
|
||||||
GetWindowRect(GetDlgItem(g_hDlg,IDC_RT),&sRect);
|
GetWindowRect(GetDlgItem(g_hDlg,IDC_RT),&sRect);
|
||||||
sRect.right -= sRect.left;
|
sRect.right -= sRect.left;
|
||||||
|
@ -1835,7 +1829,6 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
|
||||||
HMENU hMenu = GetMenu(g_hDlg);
|
HMENU hMenu = GetMenu(g_hDlg);
|
||||||
if (ID_VIEWER_QUIT == LOWORD(wParam))
|
if (ID_VIEWER_QUIT == LOWORD(wParam))
|
||||||
{
|
{
|
||||||
|
@ -2366,7 +2359,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
HINSTANCE hPrevInstance,
|
HINSTANCE hPrevInstance,
|
||||||
LPTSTR lpCmdLine,
|
LPTSTR lpCmdLine,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
|
||||||
|
@ -2376,14 +2369,13 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
// load windows common controls library to get XP style
|
// load windows common controls library to get XP style
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
|
|
||||||
// intiailize the IDirect3D9 interface
|
// initialize the IDirect3D9 interface
|
||||||
g_hInstance = hInstance;
|
g_hInstance = hInstance;
|
||||||
if (0 == InitD3D())
|
if (0 == InitD3D()) {
|
||||||
{
|
|
||||||
MessageBox(NULL,"Failed to initialize Direct3D 9",
|
MessageBox(NULL,"Failed to initialize Direct3D 9",
|
||||||
"ASSIMP ModelViewer",MB_OK);
|
"ASSIMP ModelViewer",MB_OK);
|
||||||
return -6;
|
return -6;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the main dialog
|
// create the main dialog
|
||||||
HWND hDlg = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_DIALOGMAIN),
|
HWND hDlg = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_DIALOGMAIN),
|
||||||
|
@ -2400,12 +2392,11 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
Assimp::DefaultLogger::Debugging | Assimp::DefaultLogger::Info |
|
Assimp::DefaultLogger::Debugging | Assimp::DefaultLogger::Info |
|
||||||
Assimp::DefaultLogger::Err | Assimp::DefaultLogger::Warn);
|
Assimp::DefaultLogger::Err | Assimp::DefaultLogger::Warn);
|
||||||
|
|
||||||
if (NULL == hDlg)
|
if (NULL == hDlg) {
|
||||||
{
|
|
||||||
MessageBox(NULL,"Failed to create dialog from resource",
|
MessageBox(NULL,"Failed to create dialog from resource",
|
||||||
"ASSIMP ModelViewer",MB_OK);
|
"ASSIMP ModelViewer",MB_OK);
|
||||||
return -5;
|
return -5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// display the window
|
// display the window
|
||||||
g_hDlg = hDlg;
|
g_hDlg = hDlg;
|
||||||
|
@ -2415,12 +2406,12 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
UpdateWindow( hDlg );
|
UpdateWindow( hDlg );
|
||||||
|
|
||||||
// create the D3D device object
|
// create the D3D device object
|
||||||
if (0 == CreateDevice(g_sOptions.bMultiSample,false,true))
|
if (0 == CreateDevice(g_sOptions.bMultiSample,false,true)) {
|
||||||
{
|
|
||||||
MessageBox(NULL,"Failed to initialize Direct3D 9 (2)",
|
MessageBox(NULL,"Failed to initialize Direct3D 9 (2)",
|
||||||
"ASSIMP ModelViewer",MB_OK);
|
"ASSIMP ModelViewer",MB_OK);
|
||||||
return -4;
|
return -4;
|
||||||
}
|
}
|
||||||
|
|
||||||
CLogDisplay::Instance().AddEntry("[OK] Here we go!");
|
CLogDisplay::Instance().AddEntry("[OK] Here we go!");
|
||||||
|
|
||||||
// create the log window
|
// create the log window
|
||||||
|
|
|
@ -148,7 +148,7 @@ float g_fLoadTime = 0.0f;
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
// Entry point for the loader thread
|
// Entry point for the loader thread
|
||||||
// The laoder thread loads the asset while the progress dialog displays the
|
// The loader thread loads the asset while the progress dialog displays the
|
||||||
// smart progress bar
|
// smart progress bar
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
DWORD WINAPI LoadThreadProc(LPVOID lpParameter)
|
DWORD WINAPI LoadThreadProc(LPVOID lpParameter)
|
||||||
|
@ -205,9 +205,9 @@ DWORD WINAPI LoadThreadProc(LPVOID lpParameter)
|
||||||
// load the current asset
|
// load the current asset
|
||||||
// THe path to the asset is specified in the global path variable
|
// THe path to the asset is specified in the global path variable
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
int LoadAsset(void)
|
int LoadAsset()
|
||||||
{
|
{
|
||||||
// set the world and world rotation matrices to the identuty
|
// set the world and world rotation matrices to the identity
|
||||||
g_mWorldRotate = aiMatrix4x4();
|
g_mWorldRotate = aiMatrix4x4();
|
||||||
g_mWorld = aiMatrix4x4();
|
g_mWorld = aiMatrix4x4();
|
||||||
|
|
||||||
|
@ -1135,8 +1135,6 @@ int GetProjectionMatrix (aiMatrix4x4& p_mOut)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
aiVector3D GetCameraMatrix (aiMatrix4x4& p_mOut)
|
aiVector3D GetCameraMatrix (aiMatrix4x4& p_mOut)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,13 +15,11 @@
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// German (Germany) resources
|
// Deutsch (Deutschland) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -32,6 +30,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||||
// remains consistent on all systems.
|
// remains consistent on all systems.
|
||||||
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Dialog
|
// Dialog
|
||||||
|
@ -49,104 +48,63 @@ BEGIN
|
||||||
LTEXT "http://assimp.sourceforge.net http://www.zfx.info",IDC_STATIC,31,101,127,22
|
LTEXT "http://assimp.sourceforge.net http://www.zfx.info",IDC_STATIC,31,101,127,22
|
||||||
DEFPUSHBUTTON "Love this library",IDOK,186,110,84,14
|
DEFPUSHBUTTON "Love this library",IDOK,186,110,84,14
|
||||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,148,283,1
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,148,283,1
|
||||||
CONTROL 130,IDC_STATIC,"Static",SS_BITMAP,0,129,514,20
|
CONTROL IDB_BITMAP1,IDC_STATIC,"Static",SS_BITMAP,0,129,514,20
|
||||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,10,281,1
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,10,281,1
|
||||||
END
|
END
|
||||||
|
|
||||||
#define X_GROUP1 7
|
IDD_DIALOGMAIN DIALOGEX 0, 0, 656, 450
|
||||||
#define W_GROUP1 6+160+6
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
#define X_GROUP2 X_GROUP1+W_GROUP1+7
|
|
||||||
#define W_GROUP2 6+150+8
|
|
||||||
#define X_GROUP3 X_GROUP2+W_GROUP2+7
|
|
||||||
#define W_GROUP3 6+60+35+8
|
|
||||||
|
|
||||||
#define W X_GROUP3+W_GROUP3+47
|
|
||||||
#define H 450
|
|
||||||
|
|
||||||
#define Y_PANEL H-12-82-7-7-14-4
|
|
||||||
#define Y_GROUPS Y_PANEL+14+7
|
|
||||||
|
|
||||||
#define TREE_W 143
|
|
||||||
#define COMBO_W 100
|
|
||||||
|
|
||||||
IDD_DIALOGMAIN DIALOGEX 0, 0, W+TREE_W, H
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE
|
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE
|
||||||
CAPTION "Open Asset Import Library - Model Viewer "
|
CAPTION "Open Asset Import Library - Model Viewer "
|
||||||
MENU IDR_MENU1
|
MENU IDR_MENU1
|
||||||
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
|
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
|
CONTROL "",IDC_RT,"Static",SS_OWNERDRAW,0,0,513,324
|
||||||
CONTROL "",IDC_RT,"Static",SS_OWNERDRAW,0,0,W,Y_PANEL
|
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,513,0,143,450
|
||||||
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS|TVS_HASLINES|TVS_SHOWSELALWAYS|WS_BORDER|WS_HSCROLL|WS_TABSTOP, W,0,TREE_W,H
|
CONTROL "<<",IDC_BLUBB,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,471,328,35,14
|
||||||
|
COMBOBOX IDC_COMBO1,367,328,100,14,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||||
#define Y Y_PANEL+4
|
PUSHBUTTON "Play",IDC_PLAY,328,328,35,14
|
||||||
CONTROL "<<",IDC_BLUBB,"Button",BS_AUTOCHECKBOX|BS_PUSHLIKE|WS_TABSTOP, W-7-35,Y,35,14
|
CONTROL "",IDC_SLIDERANIM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,0,328,328,15
|
||||||
COMBOBOX IDC_COMBO1, W-7-35-4-100,Y,100,14, CBS_DROPDOWN|WS_VSCROLL|WS_TABSTOP
|
GROUPBOX "Display",IDC_STATIC,7,345,172,101
|
||||||
PUSHBUTTON "Play",IDC_PLAY, W-7-35-4-100-35-4,Y,35,14
|
CONTROL "Multisampling [M]",IDC_TOGGLEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,357,80,10
|
||||||
CONTROL "",IDC_SLIDERANIM,"msctls_trackbar32",TBS_AUTOTICKS|TBS_BOTH|TBS_NOTICKS|WS_TABSTOP, 0,Y,W-7-35-4-100-35-4,15
|
CONTROL "Wireframe [W]",IDC_TOGGLEWIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,369,80,10
|
||||||
|
CONTROL "No materials [D]",IDC_TOGGLEMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,381,80,10
|
||||||
#undef Y
|
CONTROL "Display normals [N]",IDC_TOGGLENORMALS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,393,80,10
|
||||||
#define Y Y_GROUPS+12
|
CONTROL "Low quality [P]",IDC_LOWQUALITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,405,80,10
|
||||||
#define X X_GROUP1+6
|
CONTROL "No specular [S]",IDC_NOSPECULAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,417,80,10
|
||||||
|
CONTROL "Show skeleton [K]",IDC_SHOWSKELETON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,429,80,10
|
||||||
GROUPBOX "Display",IDC_STATIC, X_GROUP1,Y_GROUPS,W_GROUP1,12+82+7
|
CONTROL "AutoRotate [A]",IDC_AUTOROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,357,80,10
|
||||||
|
CONTROL "Zoom/Rotate [Z]",IDC_ZOOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,369,80,10
|
||||||
CONTROL "Multisampling [M]",IDC_TOGGLEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y,80,10
|
CONTROL "Rotate lights [R]",IDC_LIGHTROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,381,80,10
|
||||||
CONTROL "Wireframe [W]",IDC_TOGGLEWIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+12,80,10
|
CONTROL "Two lights [L]",IDC_3LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,393,80,10
|
||||||
CONTROL "No materials [D]",IDC_TOGGLEMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+24,80,10
|
CONTROL "Backface culling [C]",IDC_BFCULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,405,80,10
|
||||||
CONTROL "Display normals [N]",IDC_TOGGLENORMALS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+36,80,10
|
CONTROL "No transparency [T]",IDC_NOAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,417,80,10
|
||||||
CONTROL "Low quality [P]",IDC_LOWQUALITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+48,80,10
|
GROUPBOX "Statistics",IDC_STATIC,186,345,164,63
|
||||||
CONTROL "No specular [S]",IDC_NOSPECULAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+60,80,10
|
LTEXT "Vertices:",IDC_NUMVERTS,192,357,35,8
|
||||||
CONTROL "Show skeleton [K]",IDC_SHOWSKELETON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+72,80,10
|
LTEXT "Nodes:",IDC_NUMNODES,192,369,35,8
|
||||||
|
LTEXT "Shaders:",IDC_NUMSHADERS,192,381,35,8
|
||||||
CONTROL "AutoRotate [A]",IDC_AUTOROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y,80,10
|
LTEXT "Time:",IDC_LOADTIME,192,393,35,8
|
||||||
CONTROL "Zoom/Rotate [Z]",IDC_ZOOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+12,80,10
|
EDITTEXT IDC_EVERT,227,357,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
CONTROL "Rotate lights [R]",IDC_LIGHTROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+24,80,10
|
EDITTEXT IDC_ENODEWND,227,369,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
CONTROL "Two lights [L]",IDC_3LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+36,80,10
|
EDITTEXT IDC_ESHADER,227,381,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
CONTROL "Backface culling [C]",IDC_BFCULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+48,80,10
|
EDITTEXT IDC_ELOAD,227,393,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
CONTROL "No transparency [T]",IDC_NOAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+60,80,10
|
LTEXT "Faces:",IDC_NUMFACES,272,357,35,8
|
||||||
|
LTEXT "Materials:",IDC_NUMMATS,272,369,35,8
|
||||||
#undef X
|
LTEXT "Meshes:",IDC_NUMMESHES,272,381,35,8
|
||||||
#define X X_GROUP2+6
|
LTEXT "FPS:",IDC_FPS,272,393,35,8
|
||||||
|
EDITTEXT IDC_EFACE,307,357,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
GROUPBOX "Statistics",IDC_STATIC, X_GROUP2,Y_GROUPS,W_GROUP2,12+36+8+7
|
EDITTEXT IDC_EMAT,307,369,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
|
EDITTEXT IDC_EMESH,307,381,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
LTEXT "Vertices:",IDC_NUMVERTS, X,Y,35,8
|
EDITTEXT IDC_EFPS,307,393,35,8,ES_RIGHT | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
LTEXT "Nodes:",IDC_NUMNODES, X,Y+12,35,8
|
EDITTEXT IDC_VIEWMATRIX,192,412,72,44,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE | NOT WS_BORDER
|
||||||
LTEXT "Shaders:",IDC_NUMSHADERS, X,Y+24,35,8
|
GROUPBOX "Colors",IDC_STATIC,357,345,109,87
|
||||||
LTEXT "Time:",IDC_LOADTIME, X,Y+36,35,8
|
LTEXT "Primary:",IDC_STATIC,363,360,48,8
|
||||||
|
LTEXT "Secondary:",IDC_STATIC,363,378,54,8
|
||||||
EDITTEXT IDC_EVERT, X+35,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
LTEXT "Ambient:",IDC_STATIC,363,396,54,8
|
||||||
EDITTEXT IDC_ENODEWND, X+35,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
CONTROL "Button1",IDC_LCOLOR1,"Button",BS_OWNERDRAW | WS_TABSTOP,423,357,35,14
|
||||||
EDITTEXT IDC_ESHADER, X+35,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
CONTROL "Button1",IDC_LCOLOR2,"Button",BS_OWNERDRAW | WS_TABSTOP,423,375,35,14
|
||||||
EDITTEXT IDC_ELOAD, X+35,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
CONTROL "Button1",IDC_LCOLOR3,"Button",BS_OWNERDRAW | WS_TABSTOP,423,393,35,14
|
||||||
|
PUSHBUTTON "Reset",IDC_LRESET,423,411,35,14
|
||||||
LTEXT "Faces:",IDC_NUMFACES, X+80,Y,35,8
|
|
||||||
LTEXT "Materials:",IDC_NUMMATS, X+80,Y+12,35,8
|
|
||||||
LTEXT "Meshes:",IDC_NUMMESHES, X+80,Y+24,35,8
|
|
||||||
LTEXT "FPS:",IDC_FPS, X+80,Y+36,35,8
|
|
||||||
|
|
||||||
EDITTEXT IDC_EFACE, X+115,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
|
||||||
EDITTEXT IDC_EMAT, X+115,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
|
||||||
EDITTEXT IDC_EMESH, X+115,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
|
||||||
EDITTEXT IDC_EFPS, X+115,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
|
||||||
|
|
||||||
EDITTEXT IDC_VIEWMATRIX, X,Y+48+7,72,44, ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_VISIBLE
|
|
||||||
|
|
||||||
#undef X
|
|
||||||
#define X X_GROUP3+6
|
|
||||||
|
|
||||||
GROUPBOX "Colors",IDC_STATIC, X_GROUP3,Y_GROUPS,W_GROUP3,12+54+14+7
|
|
||||||
|
|
||||||
LTEXT "Primary:",IDC_STATIC, X,Y+3,48,8
|
|
||||||
LTEXT "Secondary:",IDC_STATIC, X,Y+3+18,54,8
|
|
||||||
LTEXT "Ambient:",IDC_STATIC, X,Y+3+36,54,8
|
|
||||||
|
|
||||||
CONTROL "Button1",IDC_LCOLOR1,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y,35,14
|
|
||||||
CONTROL "Button1",IDC_LCOLOR2,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+18,35,14
|
|
||||||
CONTROL "Button1",IDC_LCOLOR3,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+36,35,14
|
|
||||||
PUSHBUTTON "Reset",IDC_LRESET, X+60,Y+54,35,14
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_LOADDIALOG DIALOGEX 0, 0, 143, 60
|
IDD_LOADDIALOG DIALOGEX 0, 0, 143, 60
|
||||||
|
@ -279,7 +237,6 @@ BEGIN
|
||||||
IDD_DIALOGMAIN, DIALOG
|
IDD_DIALOGMAIN, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
RIGHTMARGIN, 623
|
RIGHTMARGIN, 623
|
||||||
BOTTOMMARGIN, 484
|
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_LOADDIALOG, DIALOG
|
IDD_LOADDIALOG, DIALOG
|
||||||
|
@ -321,17 +278,28 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
IDB_BITMAP1 BITMAP "banner.bmp"
|
IDB_BITMAP1 BITMAP "banner.bmp"
|
||||||
|
|
||||||
IDB_BANIM BITMAP "base_anim.bmp"
|
IDB_BANIM BITMAP "base_anim.bmp"
|
||||||
|
|
||||||
IDB_BDISPLAY BITMAP "base_display.bmp"
|
IDB_BDISPLAY BITMAP "base_display.bmp"
|
||||||
|
|
||||||
IDB_BINTER BITMAP "base_inter.bmp"
|
IDB_BINTER BITMAP "base_inter.bmp"
|
||||||
|
|
||||||
IDB_BRENDERING BITMAP "base_rendering.bmp"
|
IDB_BRENDERING BITMAP "base_rendering.bmp"
|
||||||
|
|
||||||
IDB_BSTATS BITMAP "base_stats.bmp"
|
IDB_BSTATS BITMAP "base_stats.bmp"
|
||||||
|
|
||||||
IDB_BTX BITMAP "tx.bmp"
|
IDB_BTX BITMAP "tx.bmp"
|
||||||
|
|
||||||
IDB_BFX BITMAP "fx.bmp"
|
IDB_BFX BITMAP "fx.bmp"
|
||||||
|
|
||||||
IDB_BNODE BITMAP "n.bmp"
|
IDB_BNODE BITMAP "n.bmp"
|
||||||
|
|
||||||
IDB_BROOT BITMAP "root.bmp"
|
IDB_BROOT BITMAP "root.bmp"
|
||||||
|
|
||||||
IDB_BTXI BITMAP "txi.bmp"
|
IDB_BTXI BITMAP "txi.bmp"
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Menu
|
// Menu
|
||||||
|
@ -473,14 +441,17 @@ END
|
||||||
|
|
||||||
IDR_TEXT1 TEXT "text1.bin"
|
IDR_TEXT1 TEXT "text1.bin"
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// RCDATA
|
// RCDATA
|
||||||
//
|
//
|
||||||
|
|
||||||
IDR_HUD RCDATA "HUD.png"
|
IDR_HUD RCDATA "HUD.png"
|
||||||
|
|
||||||
IDR_HUDMASK RCDATA "HUDMask.png"
|
IDR_HUDMASK RCDATA "HUDMask.png"
|
||||||
#endif // German (Germany) resources
|
|
||||||
|
#endif // Deutsch (Deutschland) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue