public void Add(byte[] mesh, short productTypeId, int productLabel, int geometryLabel, XbimMatrix3D? transform = null, short modelId = 0, ITextureMapping textureMappingMethod = null) { var frag = new XbimMeshFragment(PositionCount, TriangleIndexCount, productTypeId, productLabel, geometryLabel, modelId); Read(mesh, transform); if (textureMappingMethod != null) { AddTextureMapping(textureMappingMethod.GetTextureMap(this._unfrozenPositions, this._unfrozenNormals, this._unfrozenTriangleIndices)); } frag.EndPosition = PositionCount - 1; frag.EndTriangleIndex = TriangleIndexCount - 1; _meshes.Add(frag); }