osg fbx模型删除模型中的某几个节点,实现编辑模型的功能

fbx model element count:8
0 三维视图: {三维} 4294967295 osg::MatrixTransform
1 基本墙 wall_240 [361750] 4294967295 osg::MatrixTransform
2 基本墙 wall_240 [361813] 4294967295 osg::MatrixTransform
3 基本墙 wall_240 [361889] 4294967295 osg::MatrixTransform
4 基本墙 wall_240 [361993] 4294967295 osg::MatrixTransform
5 基本墙 wall_240 [362170] 4294967295 osg::MatrixTransform
6 基本墙 wall_240 [362246] 4294967295 osg::MatrixTransform
7 基本墙 wall_240 [362332] 4294967295 osg::MatrixTransform

osg delete fbx model node

group1->removeChild(sg->getChild(1));
group1->removeChild(sg->getChild(2));


fbx model element count:6
0 三维视图: {三维} 4294967295 osg::MatrixTransform
1 基本墙 wall_240 [361889] 4294967295 osg::MatrixTransform
2 基本墙 wall_240 [361993] 4294967295 osg::MatrixTransform
3 基本墙 wall_240 [362170] 4294967295 osg::MatrixTransform
4 基本墙 wall_240 [362246] 4294967295 osg::MatrixTransform
5 基本墙 wall_240 [362332] 4294967295 osg::MatrixTransform

3dMax导出的部分fbx模型删除模型中某几个节点好像还是有问题,但大多数fbx模型中的节点都能够正常删除。

原文地址:https://www.cnblogs.com/herd/p/11146466.html