protected override void duplicateTo(ref Object3D ret) { base.duplicateTo(ref ret); SkinnedMesh that = (SkinnedMesh)ret; Group skeleton1 = this.getSkeleton(); Group skeleton2 = (Group)skeleton1.duplicate(); that.setSkeleton(skeleton2); this.duplicateToAddWeight(that, (Node)skeleton1, (Node)skeleton2); }
private static object loadSkinnedMesh( ref DataInputStream @in, ref List <Object3D> objectList, ref List <Object3D> rootObjectList) { SkinnedMesh skinnedMesh = new SkinnedMesh(); Loader.loadMesh((Mesh)skinnedMesh, ref @in, ref objectList, ref rootObjectList); Group reference1 = (Group)Loader.getReference(ref @in, ref objectList, ref rootObjectList); skinnedMesh.setSkeleton(reference1); bool flag = true; if (flag) { skinnedMesh.setLegacy(true); } int length = Loader.readIntLE(ref @in); if (flag) { for (int index = 0; index < length; ++index) { Node reference2 = (Node)Loader.getReference(ref @in, ref objectList, ref rootObjectList); int firstVertex = Loader.readIntLE(ref @in); int numVertices = Loader.readIntLE(ref @in); int weight = Loader.readIntLE(ref @in); skinnedMesh.addTransform(reference2, weight, firstVertex, numVertices); } } else { Node[] bones = new Node[length]; for (int index = 0; index < length; ++index) { bones[index] = (Node)Loader.getReference(ref @in, ref objectList, ref rootObjectList); } skinnedMesh.setBones(bones); } return((object)skinnedMesh); }