Merge branch 'master' into zlib-nobuild
commit
ce2f947eb1
|
@ -1455,7 +1455,9 @@ static void copyBoneToSkeletonBone(aiMesh *mesh, aiBone *bone, aiSkeletonBone *s
|
||||||
skeletonBone->mWeights = bone->mWeights;
|
skeletonBone->mWeights = bone->mWeights;
|
||||||
skeletonBone->mOffsetMatrix = bone->mOffsetMatrix;
|
skeletonBone->mOffsetMatrix = bone->mOffsetMatrix;
|
||||||
skeletonBone->mMeshId = mesh;
|
skeletonBone->mMeshId = mesh;
|
||||||
|
#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
|
||||||
skeletonBone->mNode = bone->mNode;
|
skeletonBone->mNode = bone->mNode;
|
||||||
|
#endif
|
||||||
skeletonBone->mParent = -1;
|
skeletonBone->mParent = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,12 +264,12 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) {
|
||||||
// We should care only about used vertices, not all of them
|
// We should care only about used vertices, not all of them
|
||||||
// (this can happen due to original file vertices buffer being used by
|
// (this can happen due to original file vertices buffer being used by
|
||||||
// multiple meshes)
|
// multiple meshes)
|
||||||
std::unordered_set<unsigned int> usedVertexIndices;
|
std::vector<bool> usedVertexIndicesMask;
|
||||||
usedVertexIndices.reserve(pMesh->mNumVertices);
|
usedVertexIndicesMask.resize(pMesh->mNumVertices, false);
|
||||||
for( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
|
for (unsigned int a = 0; a < pMesh->mNumFaces; a++) {
|
||||||
aiFace& face = pMesh->mFaces[a];
|
aiFace& face = pMesh->mFaces[a];
|
||||||
for( unsigned int b = 0; b < face.mNumIndices; b++) {
|
for (unsigned int b = 0; b < face.mNumIndices; b++) {
|
||||||
usedVertexIndices.insert(face.mIndices[b]);
|
usedVertexIndicesMask[face.mIndices[b]] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) {
|
||||||
int newIndex = 0;
|
int newIndex = 0;
|
||||||
for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
|
for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
|
||||||
// if the vertex is unused Do nothing
|
// if the vertex is unused Do nothing
|
||||||
if (usedVertexIndices.find(a) == usedVertexIndices.end()) {
|
if (!usedVertexIndicesMask[a]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// collect the vertex data
|
// collect the vertex data
|
||||||
|
|
|
@ -198,7 +198,10 @@ struct aiMeshMorphKey {
|
||||||
/** The time of this key */
|
/** The time of this key */
|
||||||
double mTime;
|
double mTime;
|
||||||
|
|
||||||
/** The values and weights at the time of this key */
|
/** The values and weights at the time of this key
|
||||||
|
* - mValues: index of attachment mesh to apply weight at the same position in mWeights
|
||||||
|
* - mWeights: weight to apply to the blend shape index at the same position in mValues
|
||||||
|
*/
|
||||||
unsigned int *mValues;
|
unsigned int *mValues;
|
||||||
double *mWeights;
|
double *mWeights;
|
||||||
|
|
||||||
|
|
|
@ -737,13 +737,20 @@ struct aiMesh {
|
||||||
**/
|
**/
|
||||||
C_STRUCT aiString mName;
|
C_STRUCT aiString mName;
|
||||||
|
|
||||||
/** The number of attachment meshes. Note! Currently only works with Collada loader. */
|
/** The number of attachment meshes.
|
||||||
|
* Currently known to work with loaders:
|
||||||
|
* - Collada
|
||||||
|
* - gltf
|
||||||
|
*/
|
||||||
unsigned int mNumAnimMeshes;
|
unsigned int mNumAnimMeshes;
|
||||||
|
|
||||||
/** Attachment meshes for this mesh, for vertex-based animation.
|
/** Attachment meshes for this mesh, for vertex-based animation.
|
||||||
* Attachment meshes carry replacement data for some of the
|
* Attachment meshes carry replacement data for some of the
|
||||||
* mesh'es vertex components (usually positions, normals).
|
* mesh'es vertex components (usually positions, normals).
|
||||||
* Note! Currently only works with Collada loader.*/
|
* Currently known to work with loaders:
|
||||||
|
* - Collada
|
||||||
|
* - gltf
|
||||||
|
*/
|
||||||
C_STRUCT aiAnimMesh **mAnimMeshes;
|
C_STRUCT aiAnimMesh **mAnimMeshes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -988,8 +995,10 @@ struct aiSkeletonBone {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
aiSkeletonBone() :
|
aiSkeletonBone() :
|
||||||
mParent(-1),
|
mParent(-1),
|
||||||
|
#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
|
||||||
mArmature(nullptr),
|
mArmature(nullptr),
|
||||||
mNode(nullptr),
|
mNode(nullptr),
|
||||||
|
#endif
|
||||||
mNumnWeights(0),
|
mNumnWeights(0),
|
||||||
mMeshId(nullptr),
|
mMeshId(nullptr),
|
||||||
mWeights(nullptr),
|
mWeights(nullptr),
|
||||||
|
|
|
@ -748,13 +748,18 @@ class Mesh(Structure):
|
||||||
# - Vertex animations refer to meshes by their names.
|
# - Vertex animations refer to meshes by their names.
|
||||||
("mName", String),
|
("mName", String),
|
||||||
|
|
||||||
# The number of attachment meshes. Note! Currently only works with Collada loader.
|
# The number of attachment meshes.
|
||||||
|
# Currently known to work with loaders:
|
||||||
|
# - Collada
|
||||||
|
# - gltf
|
||||||
("mNumAnimMeshes", c_uint),
|
("mNumAnimMeshes", c_uint),
|
||||||
|
|
||||||
# Attachment meshes for this mesh, for vertex-based animation.
|
# Attachment meshes for this mesh, for vertex-based animation.
|
||||||
# Attachment meshes carry replacement data for some of the
|
# Attachment meshes carry replacement data for some of the
|
||||||
# mesh'es vertex components (usually positions, normals).
|
# mesh'es vertex components (usually positions, normals).
|
||||||
# Note! Currently only works with Collada loader.
|
# Currently known to work with loaders:
|
||||||
|
# - Collada
|
||||||
|
# - gltf
|
||||||
("mAnimMeshes", POINTER(POINTER(AnimMesh))),
|
("mAnimMeshes", POINTER(POINTER(AnimMesh))),
|
||||||
|
|
||||||
# Method of morphing when animeshes are specified.
|
# Method of morphing when animeshes are specified.
|
||||||
|
|
|
@ -76,7 +76,7 @@ build_arch()
|
||||||
|
|
||||||
rm CMakeCache.txt
|
rm CMakeCache.txt
|
||||||
|
|
||||||
CMAKE_CLI_INPUT="-DCMAKE_C_COMPILER=$CMAKE_C_COMPILER -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_BOOST_WORKAROUND=ON -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS"
|
CMAKE_CLI_INPUT="-DCMAKE_C_COMPILER=$CMAKE_C_COMPILER -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS"
|
||||||
|
|
||||||
echo "[!] Running CMake with -G 'Unix Makefiles' $CMAKE_CLI_INPUT"
|
echo "[!] Running CMake with -G 'Unix Makefiles' $CMAKE_CLI_INPUT"
|
||||||
|
|
||||||
|
@ -190,12 +190,8 @@ if [[ "$DEPLOY_FAT" -eq 1 ]]; then
|
||||||
|
|
||||||
if [[ "$BUILD_TYPE" =~ "Debug" ]]; then
|
if [[ "$BUILD_TYPE" =~ "Debug" ]]; then
|
||||||
make_fat_static_or_shared_binary 'libassimpd'
|
make_fat_static_or_shared_binary 'libassimpd'
|
||||||
make_fat_static_binary 'libIrrXMLd'
|
|
||||||
make_fat_static_binary 'libzlibstaticd'
|
|
||||||
else
|
else
|
||||||
make_fat_static_or_shared_binary 'libassimp'
|
make_fat_static_or_shared_binary 'libassimp'
|
||||||
make_fat_static_binary 'libIrrXML'
|
|
||||||
make_fat_static_binary 'libzlibstatic'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[!] Done! The fat binaries can be found at $BUILD_DIR"
|
echo "[!] Done! The fat binaries can be found at $BUILD_DIR"
|
||||||
|
|
Loading…
Reference in New Issue