next iteration.

pull/2966/head
kimkulling 2020-08-31 16:10:38 +02:00
parent 6d5c388780
commit e62b4e5cce
4 changed files with 10 additions and 6 deletions

View File

@ -134,7 +134,7 @@ public:
std::copy(mMatArray.begin(), mMatArray.end(), scene->mMaterials);
}
// create the scenegraph
// create the scene-graph
scene->mRootNode->mNumChildren = static_cast<unsigned int>(children.size());
scene->mRootNode->mChildren = new aiNode *[scene->mRootNode->mNumChildren]();
std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);

View File

@ -71,7 +71,7 @@ public:
OpcPackageRelationshipReader(XmlParser &parser) {
XmlNode *root = parser.getRootNode();
if (nullptr != root) {
XmlNode node = * root;
XmlNode node = *root;
ParseRootNode(node);
}
}
@ -95,6 +95,10 @@ public:
}
void ParseChildNode(XmlNode &node) {
if (node.empty()) {
return;
}
OpcPackageRelationshipPtr relPtr(new OpcPackageRelationship());
std::string name = node.name();
relPtr->id = node.attribute(XmlTag::RELS_ATTRIB_ID.c_str()).as_string();

View File

@ -926,7 +926,7 @@ void ColladaParser::ReadLight(XmlNode &node, Collada::Light &pLight) {
XmlNodeIterator xmlIt;
xmlIt.collectChildrenPreOrder(node);
XmlNode currentNode;
while (xmlIt.getNext(currentNode)) {
while (xmlIt.getNext(&currentNode)) {
const std::string &currentName = currentNode.name();
if (currentName == "spot") {
pLight.mType = aiLightSource_SPOT;

View File

@ -251,12 +251,12 @@ public:
mNodes.push_back(&node);
}
bool getNext(XmlNode &next) {
bool getNext(XmlNode *next) {
if (mIndex == mNodes.size()) {
return false;
}
mNodes[mIndex];
next = mNodes[mIndex];
++mIndex;
return true;
@ -273,8 +273,8 @@ public:
private:
std::vector<XmlNode *> mNodes;
size_t mIndex;
TraverseOrder mTraverseOrder;
};
} // namespace Assimp
#endif // !! INCLUDED_AI_IRRXML_WRAPPER