示例#1
0
        public GeometryModel(GeometryData geometry, Material material)
            : this()
        {
            var mesh = new GeometryMesh(geometry, material, Matrix.Identity);

            this.Add(mesh);
        }
示例#2
0
        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);
            }
        }