乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      WPF 3D中多個模型如何設置某一個在最前?

       xyjackxjw 2013-05-09

      WPF 3D中多個模型如何設置某一個在最前?

      分類: WPF 3D488人閱讀評論(0)收藏舉報
       

      問題:我們的模型包括導入的3D solid模型和axis坐標軸模型,當模型旋轉的時候,3D會將axis擋住。

      期望:axis一直在最前面,不會被3D擋住。

      方法:

      (1) 將模型設置為透明,<SolidColorBrush Color="#3333CC" Opacity="0.8"/>,同時,將axis使用EmissiveMaterial。

      這樣實現(xiàn)可以在旋轉后看到axis,但是這種方法并沒有讓axis放在最前,效果并不好,所以需要繼續(xù)找到其他方法。

      (2) 看到有些文章中說到z index,在控件中可以使用它設置層次,但是在模型中沒有找到類似方法,不知道如何使用。

       

      下面是我在微軟論壇上提問獲得的答案:

      Hello,

      It seems that you wants to see through a 3D object (for example, a cube), to see the object behind it. If this is the case, the only solution is to make the cube semi-transparent or fully transparent. This is similar to the real world. If a table is behind the wall of a house, you won't be able to see it. But if it is behind a window, you can still see it.

       

      One thing to note is how WPF 3D handles transparency. In the above sample, if the windows comes before the table in the visual tree, you still won't be able to see through it. You have to put the non-transparent elements before the transparent ones. There is a helper class which can help you to solve this problem. Have a look at http://blogs./pantal/archive/2007/07/23/sorting-for-wpf-3d-transparency.aspx .

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
        轉藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多