示例#1
0
        public static ModelVisual3D BuildVisualModel(ModelVisual3D objmesh, double thickness = 1.0, double depthOffset = 0.0)
        {
            WireframeMeshAdapter adp = new WireframeMeshAdapter(objmesh);

            adp._thickness   = thickness;
            adp._depthOffset = depthOffset;
            adp.UpdateTransforms();
            return(adp.MakeVisualModel());
        }
示例#2
0
        protected void BuildWireframeModel(double depthOffset)
        {
            if (_currentWireframe != null && _wireframeDirty == false)
            {
                return;
            }
            _wireframeDirty = false;
            bool isPresent = model.Children.Contains(_currentMesh);

            if (!isPresent)
            {
                model.Children.Add(_currentMesh);
            }
            _currentWireframe = WireframeMeshAdapter.BuildVisualModel(_currentMesh, 1.0, depthOffset);
            if (!isPresent)
            {
                model.Children.Remove(_currentMesh);
            }
        }