// highlight the selection
        public override void HighlightSelection(System.Windows.Media.Media3D.MeshGeometry3D meshGeometry, System.Windows.Media.Color selectColor)
        {
            int nDotNo = GetDataNo();

            if (nDotNo == 0)
            {
                return;
            }

            Point mapPt;

            for (int i = 0; i < nDotNo; i++)
            {
                if (m_vertices[i].selected)
                {
                    mapPt = TextureMapping.GetMappingPosition(selectColor, false);
                }
                else
                {
                    mapPt = TextureMapping.GetMappingPosition(m_vertices[i].color, false);
                }
                int nMin = m_vertices[i].nMinI;
                int nMax = m_vertices[i].nMaxI;
                for (int j = nMin; j <= nMax; j++)
                {
                    meshGeometry.TextureCoordinates[j] = mapPt;
                }
            }
        }
예제 #2
0
        public override void HighlightSelection(MeshGeometry3D meshGeometry, Color selectColor)
        {
            var nDotNo = GetDataNo();

            if (nDotNo != 0)
            {
                for (var i = 0; i < nDotNo; i++)
                {
                    var color = _vertices[i].IsSelected ? selectColor : _vertices[i].Color;
                    var mapPt = TextureMapping.GetMappingPosition(color, true);
                    var nMin  = _vertices[i].MinI;
                    meshGeometry.TextureCoordinates[nMin] = mapPt;
                }
            }
        }
예제 #3
0
        // highlight the selection
        public override void HighlightSelection(MeshGeometry3D meshGeometry, System.Windows.Media.Color selectColor)
        {
            var nDotNo = GetDataNo();

            if (nDotNo == 0)
            {
                return;
            }

            for (var i = 0; i < nDotNo; i++)
            {
                var mapPt = TextureMapping.GetMappingPosition(MVertices[i].selected ? selectColor
                    : MVertices[i].color, false);
                var nMin = MVertices[i].nMinI;
                var nMax = MVertices[i].nMaxI;
                for (var j = nMin; j <= nMax; j++)
                {
                    meshGeometry.TextureCoordinates[j] = mapPt;
                }
            }
        }
예제 #4
0
 public Model3D()
 {
     _mapping = new TextureMapping();
 }