This commit is contained in:
Wei Lisi 2019-03-26 22:37:50 +08:00 committed by Robert Osfield
parent 82cae6daf4
commit 0cbf839425

View File

@ -648,15 +648,7 @@ void WriterNodeVisitor::createListTriangle(const osg::Geometry* geo,
void WriterNodeVisitor::apply(osg::Geometry& geometry) void WriterNodeVisitor::apply(osg::Geometry& geometry)
{ {
// here we simply create a single fbx node to assign it the mesh
// retrieved from the geometry. // retrieved from the geometry.
// create fbx node to contain the single geometry
//FbxNode* parent = _curFbxNode;
//FbxNode* nodeFBX = FbxNode::Create(_pSdkManager, geometry.getName().empty() ? "Geometry" : geometry.getName().c_str());
//_curFbxNode->AddChild(nodeFBX);
//_curFbxNode = nodeFBX;
_geometryList.push_back(&geometry); _geometryList.push_back(&geometry);
pushStateSet(geometry.getStateSet()); pushStateSet(geometry.getStateSet());
@ -668,8 +660,6 @@ void WriterNodeVisitor::apply(osg::Geometry& geometry)
if (getNodePath().size() == 1) if (getNodePath().size() == 1)
buildFaces(geometry.getName(), _geometryList, _listTriangles, _texcoords); buildFaces(geometry.getName(), _geometryList, _listTriangles, _texcoords);
// return to parent fbx node
//_curFbxNode = parent;
} }
void WriterNodeVisitor::apply(osg::Group& node) void WriterNodeVisitor::apply(osg::Group& node)
@ -691,10 +681,9 @@ void WriterNodeVisitor::apply(osg::Group& node)
} }
else else
{ {
//ignore the root node to maintain same hierarchy
_firstNodeProcessed = true; _firstNodeProcessed = true;
traverse(node); traverse(node);
} }
} }