// Mesh data (vertices + textures) are stored in the 3rd chunk of a FAM file public Mesh GetMesh(int index) { if (_meshCache[index] == null) { var meshChunk = _root.HeaderChunks[MESH_CHUNK].HeaderChunks[index].MeshChunks[0]; var bmpChunk = _root.HeaderChunks[MESH_CHUNK].HeaderChunks[index].BitmapChunks[0]; _meshCache[index] = new Mesh(meshChunk, bmpChunk); } return _meshCache[index]; }
public ModelSceneryItem(Mesh mesh) { _mesh = mesh; }