From b2f0c5ff295feddbeb73a4754a3acda938bb41df Mon Sep 17 00:00:00 2001 From: YoheiKakiuchi Date: Wed, 22 Jul 2015 15:14:17 +0900 Subject: [PATCH] fix for reducing CORBA communication --- server/ModelLoader/ColladaWriter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/ModelLoader/ColladaWriter.h b/server/ModelLoader/ColladaWriter.h index 7e0016753..5a9d201d3 100644 --- a/server/ModelLoader/ColladaWriter.h +++ b/server/ModelLoader/ColladaWriter.h @@ -1216,6 +1216,7 @@ class ColladaWriter : public daeErrorHandler string nodesid = str(boost::format("node%d")%ilink); pnode->setSid(nodesid.c_str()); pnode->setName(plink.segments[0].name); + ShapeInfoSequence* curShapeInfoSeq = bodyInfo->shapes(); for(int igeom = 0; igeom < plink.shapeIndices.length(); ++igeom) { string geomid = _GetGeometryId(bodyInfo, ilink,igeom); @@ -1225,8 +1226,7 @@ class ColladaWriter : public daeErrorHandler for(int i = 0; i < 12; ++i) { transformMatrix[i] = tsi.transformMatrix[i]; } - - domGeometryRef pdomgeom = WriteGeometry(bodyInfo,(*bodyInfo->shapes())[tsi.shapeIndex], transformMatrix, geomid); + domGeometryRef pdomgeom = WriteGeometry(bodyInfo,(*curShapeInfoSeq)[tsi.shapeIndex], transformMatrix, geomid); domInstance_geometryRef pinstgeom = daeSafeCast(pnode->add(COLLADA_ELEMENT_INSTANCE_GEOMETRY)); pinstgeom->setUrl((string("#")+geomid).c_str());