Merge branch 'master' into integrate-tinyusdz-br-rendermesh-refactor
commit
1e410113ee
|
@ -247,7 +247,9 @@ aiNode *ColladaLoader::BuildHierarchy(const ColladaParser &pParser, const Collad
|
|||
|
||||
// add children. first the *real* ones
|
||||
node->mNumChildren = static_cast<unsigned int>(pNode->mChildren.size() + instances.size());
|
||||
node->mChildren = new aiNode *[node->mNumChildren];
|
||||
if (node->mNumChildren != 0) {
|
||||
node->mChildren = new aiNode * [node->mNumChildren];
|
||||
}
|
||||
|
||||
for (size_t a = 0; a < pNode->mChildren.size(); ++a) {
|
||||
node->mChildren[a] = BuildHierarchy(pParser, pNode->mChildren[a]);
|
||||
|
|
|
@ -635,7 +635,8 @@ void ColladaParser::ReadController(XmlNode &node, Collada::Controller &controlle
|
|||
const std::string ¤tName = currentNode.name();
|
||||
if (currentName == "morph") {
|
||||
controller.mType = Morph;
|
||||
controller.mMeshId = currentNode.attribute("source").as_string();
|
||||
std::string id = currentNode.attribute("source").as_string();
|
||||
controller.mMeshId = id.substr(1, id.size() - 1);
|
||||
int methodIndex = currentNode.attribute("method").as_int();
|
||||
if (methodIndex > 0) {
|
||||
std::string method;
|
||||
|
|
|
@ -250,6 +250,10 @@ void Q3DImporter::InternReadFile(const std::string &pFile,
|
|||
c = stream.GetI1();
|
||||
while (c) {
|
||||
mat.name.data[mat.name.length++] = c;
|
||||
if (mat.name.length == MAXLEN) {
|
||||
ASSIMP_LOG_ERROR("String ouverflow detected, skipped material name parsing.");
|
||||
break;
|
||||
}
|
||||
c = stream.GetI1();
|
||||
}
|
||||
|
||||
|
|
|
@ -185,9 +185,9 @@ bool CalcTangentsProcess::ProcessMesh(aiMesh *pMesh, unsigned int meshIndex) {
|
|||
tangent.x = (w.x * sy - v.x * ty) * dirCorrection;
|
||||
tangent.y = (w.y * sy - v.y * ty) * dirCorrection;
|
||||
tangent.z = (w.z * sy - v.z * ty) * dirCorrection;
|
||||
bitangent.x = (- w.x * sx + v.x * tx) * dirCorrection;
|
||||
bitangent.y = (- w.y * sx + v.y * tx) * dirCorrection;
|
||||
bitangent.z = (- w.z * sx + v.z * tx) * dirCorrection;
|
||||
bitangent.x = (w.x * sx - v.x * tx) * dirCorrection;
|
||||
bitangent.y = (w.y * sx - v.y * tx) * dirCorrection;
|
||||
bitangent.z = (w.z * sx - v.z * tx) * dirCorrection;
|
||||
|
||||
// store for every vertex of that face
|
||||
for (unsigned int b = 0; b < face.mNumIndices; ++b) {
|
||||
|
@ -195,7 +195,7 @@ bool CalcTangentsProcess::ProcessMesh(aiMesh *pMesh, unsigned int meshIndex) {
|
|||
|
||||
// project tangent and bitangent into the plane formed by the vertex' normal
|
||||
aiVector3D localTangent = tangent - meshNorm[p] * (tangent * meshNorm[p]);
|
||||
aiVector3D localBitangent = bitangent - meshNorm[p] * (bitangent * meshNorm[p]) - localTangent * (bitangent * localTangent);
|
||||
aiVector3D localBitangent = bitangent - meshNorm[p] * (bitangent * meshNorm[p]);
|
||||
localTangent.NormalizeSafe();
|
||||
localBitangent.NormalizeSafe();
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
|
|||
// Recursively updates the node's mesh list to account for the changed mesh list
|
||||
void SplitByBoneCountProcess::UpdateNode( aiNode* pNode) const {
|
||||
// rebuild the node's mesh index list
|
||||
if( pNode->mNumMeshes == 0 ) {
|
||||
if( pNode->mNumMeshes != 0 ) {
|
||||
IndexArray newMeshList;
|
||||
for( unsigned int a = 0; a < pNode->mNumMeshes; ++a) {
|
||||
unsigned int srcIndex = pNode->mMeshes[a];
|
||||
|
|
|
@ -28,6 +28,7 @@ __Importers__:
|
|||
+ KHR_texture_transform ( 5.1 under test )
|
||||
- HMB
|
||||
- IFC-STEP
|
||||
- IQM
|
||||
- IRR / IRRMESH
|
||||
- [LWO](https://en.wikipedia.org/wiki/LightWave_3D)
|
||||
- LWS
|
||||
|
|
Loading…
Reference in New Issue