public MeshDto ToDto() { return(new MeshDto { Name = Name, Id = Id, Adjacency = _adjacency?.ToList(), FaceCount = FaceCount, Primitive = (Models.MeshPrimitive)Primitive, VertexCount = VertexCount, MaterialSlots = _materialSlotsNames?.ToList(), Layers = _layers.Select(x => x.ToDto()).ToList(), VertexDeclaration = VertexDescriptor?.ToDto(), IndexBuffer = IndexBuffer?.ToArray(), VertexBuffer = VertexBuffer?.ToArray(), SixteenBitsIndices = IndexBuffer?.Is16BitsIndices ?? false }); }