private static BzMeshSliceResult GetItemResult(SliceTryItem sliceTryItem, Renderer rendererNeg, Renderer rendererPos) { BzMeshSliceResult itemResult = new BzMeshSliceResult(); itemResult.rendererNeg = rendererNeg; itemResult.rendererPos = rendererPos; var sliceEdgeNegResult = new BzSliceEdgeResult[sliceTryItem.meshDissector.CapsNeg.Count]; for (int i = 0; i < sliceEdgeNegResult.Length; i++) { var edgeResult = new BzSliceEdgeResult(); sliceEdgeNegResult[i] = edgeResult; edgeResult.capsData = sliceTryItem.meshDissector.CapsNeg[i]; } itemResult.sliceEdgesNeg = sliceEdgeNegResult; var sliceEdgePosResult = new BzSliceEdgeResult[sliceTryItem.meshDissector.CapsPos.Count]; for (int i = 0; i < sliceEdgePosResult.Length; i++) { var edgeResult = new BzSliceEdgeResult(); sliceEdgePosResult[i] = edgeResult; edgeResult.capsData = sliceTryItem.meshDissector.CapsPos[i]; } itemResult.sliceEdgesPos = sliceEdgePosResult; return(itemResult); }
private static BzSliceEdgeResult MakeEdgeResult(PolyMeshData polyMeshData) { var result = new BzSliceEdgeResult(); result.vertices = polyMeshData.vertices; result.normals = polyMeshData.normals; result.boneWeights = polyMeshData.boneWeights; return(result); }