Exemplo n.º 1
0
        private void Explode()
        {
            var pos = Mouse.GetPosition(view1);
            var hits = Viewport3DHelper.FindHits(view1.Viewport, pos);
            if (hits.Count > 0)
            {
                var mesh = hits[0].Mesh;
                var model = hits[0].Model as GeometryModel3D;
                var hitpos = hits[0].Position;

                var explodingMesh = new ExplodingMesh(mesh, hitpos);
                model.Geometry = explodingMesh.Mesh;
                explodingMeshes.Add(explodingMesh);
            }
        }
Exemplo n.º 2
0
        private void Explode()
        {
            var pos  = Mouse.GetPosition(view1);
            var hits = Viewport3DHelper.FindHits(view1.Viewport, pos);

            if (hits.Count > 0)
            {
                var mesh   = hits[0].Mesh;
                var model  = hits[0].Model as GeometryModel3D;
                var hitpos = hits[0].Position;

                var explodingMesh = new ExplodingMesh(mesh, hitpos);
                model.Geometry = explodingMesh.Mesh;
                explodingMeshes.Add(explodingMesh);
            }
        }