public GeometryModel(GeometryData geometry, Material material) : this() { var mesh = new GeometryMesh(geometry, material, Matrix.Identity); this.Add(mesh); }
public void Add(GeometryMesh mesh) { this.MeshList.Add(mesh); var bounds = mesh.Geometry.Bounds; bounds.Transform(mesh.Offset); if (this.Meshes.Count == 0) { this.Bounds = bounds; } else { this.Bounds = BoundingSphere.CreateMerged(this.Bounds, bounds); } }