next iteration.
parent
6d5c388780
commit
e62b4e5cce
|
@ -134,7 +134,7 @@ public:
|
||||||
std::copy(mMatArray.begin(), mMatArray.end(), scene->mMaterials);
|
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->mNumChildren = static_cast<unsigned int>(children.size());
|
||||||
scene->mRootNode->mChildren = new aiNode *[scene->mRootNode->mNumChildren]();
|
scene->mRootNode->mChildren = new aiNode *[scene->mRootNode->mNumChildren]();
|
||||||
std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);
|
std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
OpcPackageRelationshipReader(XmlParser &parser) {
|
OpcPackageRelationshipReader(XmlParser &parser) {
|
||||||
XmlNode *root = parser.getRootNode();
|
XmlNode *root = parser.getRootNode();
|
||||||
if (nullptr != root) {
|
if (nullptr != root) {
|
||||||
XmlNode node = * root;
|
XmlNode node = *root;
|
||||||
ParseRootNode(node);
|
ParseRootNode(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParseChildNode(XmlNode &node) {
|
void ParseChildNode(XmlNode &node) {
|
||||||
|
if (node.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
OpcPackageRelationshipPtr relPtr(new OpcPackageRelationship());
|
OpcPackageRelationshipPtr relPtr(new OpcPackageRelationship());
|
||||||
std::string name = node.name();
|
std::string name = node.name();
|
||||||
relPtr->id = node.attribute(XmlTag::RELS_ATTRIB_ID.c_str()).as_string();
|
relPtr->id = node.attribute(XmlTag::RELS_ATTRIB_ID.c_str()).as_string();
|
||||||
|
|
|
@ -926,7 +926,7 @@ void ColladaParser::ReadLight(XmlNode &node, Collada::Light &pLight) {
|
||||||
XmlNodeIterator xmlIt;
|
XmlNodeIterator xmlIt;
|
||||||
xmlIt.collectChildrenPreOrder(node);
|
xmlIt.collectChildrenPreOrder(node);
|
||||||
XmlNode currentNode;
|
XmlNode currentNode;
|
||||||
while (xmlIt.getNext(currentNode)) {
|
while (xmlIt.getNext(¤tNode)) {
|
||||||
const std::string ¤tName = currentNode.name();
|
const std::string ¤tName = currentNode.name();
|
||||||
if (currentName == "spot") {
|
if (currentName == "spot") {
|
||||||
pLight.mType = aiLightSource_SPOT;
|
pLight.mType = aiLightSource_SPOT;
|
||||||
|
|
|
@ -251,12 +251,12 @@ public:
|
||||||
mNodes.push_back(&node);
|
mNodes.push_back(&node);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool getNext(XmlNode &next) {
|
bool getNext(XmlNode *next) {
|
||||||
if (mIndex == mNodes.size()) {
|
if (mIndex == mNodes.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mNodes[mIndex];
|
next = mNodes[mIndex];
|
||||||
++mIndex;
|
++mIndex;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -273,8 +273,8 @@ public:
|
||||||
private:
|
private:
|
||||||
std::vector<XmlNode *> mNodes;
|
std::vector<XmlNode *> mNodes;
|
||||||
size_t mIndex;
|
size_t mIndex;
|
||||||
TraverseOrder mTraverseOrder;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Assimp
|
} // namespace Assimp
|
||||||
|
|
||||||
#endif // !! INCLUDED_AI_IRRXML_WRAPPER
|
#endif // !! INCLUDED_AI_IRRXML_WRAPPER
|
||||||
|
|
Loading…
Reference in New Issue