• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            eryar

            PipeCAD - Plant Piping Design Software.
            RvmTranslator - Translate AVEVA RVM to OBJ, glTF, etc.
            posts - 603, comments - 590, trackbacks - 0, articles - 0

            OpenCASCADE Customize Highlighting

            Posted on 2020-02-29 15:01 eryar 閱讀(9108) 評論(0)  編輯 收藏 引用 所屬分類: 2.OpenCASCADE

            OpenCASCADE Customize Highlighting

            eryar@163.com

             

            The traditional way of highlighting selected entity owners adopted by Open CASCADE Technology assumes that each entity owner highlights itself on its own. This approach has two drawbacks:

            l  each entity owner has to maintain its own Prs3d_Presentation object, that results in a considerable memory overhead;

            l  drawing selected owners one by one is not efficient from the visualization point of view.

            OpenCASCADE內置的高亮算法是每個模型都有自己的高亮實體,高亮的一般是模型的TopoDS_Edge,對于B樣條曲面還會顯示出一條UIso和VIso線。這種高亮顯示策略不一定符合所有人的需求,而且會占用額外大量的內存。

             

            Therefore, to overcome these limitations, OCCT has an alternative way to implement the highlighting of a selected presentation. Using this approach, the interactive object itself will be responsible for the highlighting, not the entity owner.

            因此,為了克服上面的缺點,OCCT提供一個自定義高亮的方式,由交互對象自己來實現高亮顯示,滿足更多個性化的需求。

             

            On the basis of SelectMgr_EntityOwner::IsAutoHilight() return value, AIS_InteractiveContext object either uses the traditional way of highlighting (in case if IsAutoHilight() returns TRUE) or groups such owners according to their selectable objects and finally calls SelectMgr_SelectableObject::HilightSelected() or SelectMgr_SelectableObject::ClearSelected(), passing a group of owners as an argument.

            Hence, an application can derive its own interactive object and redefine virtual methods HilightSelected(), ClearSelected() and HilightOwnerWithColor() from SelectMgr_SelectableObject. SelectMgr_SelectableObject::GetHilightPresentation and SelectMgr_SelectableObject::GetSelectPresentation methods can be used to optimize filling of selection and highlight presentations according to the user's needs. The AIS_InteractiveContext::HighlightSelected() method can be used for efficient redrawing of the selection presentation for a given interactive object from an application code.

            當SelectMgr_SelectableObject的所有子類的IsAutoHilight()返回true時,則是由OCCT自動實現高亮選擇效果。當IsAutoHilight()返回false時,則交互對象的高亮顯示交給用戶自己來實現。具體實現步驟為從類SelectMgr_SelectableObject派生出一個子類,重寫三個虛函數:

            l  HilightSelected():交互對象選中時的高亮顯示效果;

            l  ClearSelected():清除對象選中時的高亮效果;

            l  HilightOwnerWithColor():鼠標移動到交互對象上時的高亮效果;

             

            如上圖所示為OCCT自動高亮顯示效果,模型的每個Edge都高亮顯示;

             

            上圖所示為自己實現模型的高亮效果,只高亮顯示模型的外邊框。這樣高亮顯示的數據少,占用內存就少,效率更高。


            為了方便大家在移動端也能看到我的博文和討論交流,現已注冊微信公眾號,歡迎大家掃描下方二維碼關注。
            Shing Liu(eryar@163.com)
            国产精品久久久久国产A级| 中文字幕日本人妻久久久免费| 久久精品国产91久久麻豆自制| 久久亚洲精品中文字幕三区| 久久国产福利免费| 久久夜色精品国产网站| 精品久久8x国产免费观看| 狠狠精品干练久久久无码中文字幕 | 亚洲欧洲精品成人久久奇米网| 色播久久人人爽人人爽人人片AV| 国产精品美女久久久久| 青青草原综合久久大伊人导航| 亚洲精品无码久久久久去q| 精品久久人人妻人人做精品| 久久婷婷五月综合色奶水99啪| 精品久久久久久国产91| 亚洲日本va中文字幕久久| 国产综合精品久久亚洲| 91精品国产91久久综合| 国产美女亚洲精品久久久综合| 激情久久久久久久久久| 一本大道久久a久久精品综合 | 久久精品亚洲精品国产色婷| 久久久久亚洲精品中文字幕| 国产91久久综合| 久久精品国产91久久综合麻豆自制| 一本色道久久88精品综合| 亚洲?V乱码久久精品蜜桃| 久久久WWW成人免费毛片| 青青国产成人久久91网| 久久综合中文字幕| 国产一级做a爰片久久毛片| 国产精品久久久久久吹潮| 乱亲女H秽乱长久久久| 一本一本久久A久久综合精品| 久久久这里有精品| 精品国产99久久久久久麻豆| 亚洲精品无码久久久久去q| 亚洲色欲久久久综合网东京热| 三级三级久久三级久久| 国产成人精品三上悠亚久久|