• <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) 評(píng)論(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內(nèi)置的高亮算法是每個(gè)模型都有自己的高亮實(shí)體,高亮的一般是模型的TopoDS_Edge,對(duì)于B樣條曲面還會(huì)顯示出一條UIso和VIso線。這種高亮顯示策略不一定符合所有人的需求,而且會(huì)占用額外大量的內(nèi)存。

             

            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.

            因此,為了克服上面的缺點(diǎn),OCCT提供一個(gè)自定義高亮的方式,由交互對(duì)象自己來(lái)實(shí)現(xiàn)高亮顯示,滿足更多個(gè)性化的需求。

             

            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.

            當(dāng)SelectMgr_SelectableObject的所有子類的IsAutoHilight()返回true時(shí),則是由OCCT自動(dòng)實(shí)現(xiàn)高亮選擇效果。當(dāng)IsAutoHilight()返回false時(shí),則交互對(duì)象的高亮顯示交給用戶自己來(lái)實(shí)現(xiàn)。具體實(shí)現(xiàn)步驟為從類SelectMgr_SelectableObject派生出一個(gè)子類,重寫(xiě)三個(gè)虛函數(shù):

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

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

            l  HilightOwnerWithColor():鼠標(biāo)移動(dòng)到交互對(duì)象上時(shí)的高亮效果;

             

            如上圖所示為OCCT自動(dòng)高亮顯示效果,模型的每個(gè)Edge都高亮顯示;

             

            上圖所示為自己實(shí)現(xiàn)模型的高亮效果,只高亮顯示模型的外邊框。這樣高亮顯示的數(shù)據(jù)少,占用內(nèi)存就少,效率更高。


            為了方便大家在移動(dòng)端也能看到我的博文和討論交流,現(xiàn)已注冊(cè)微信公眾號(hào),歡迎大家掃描下方二維碼關(guān)注。
            Shing Liu(eryar@163.com)
            性欧美大战久久久久久久久| 99久久人人爽亚洲精品美女| segui久久国产精品| 久久精品国产影库免费看| av无码久久久久不卡免费网站| 日本久久久久亚洲中字幕| 精品久久久久久国产91| 久久久久国产一级毛片高清板| 亚洲精品成人网久久久久久| 久久亚洲AV成人出白浆无码国产| 久久综合九色综合久99| 亚洲日本va午夜中文字幕久久| 波多野结衣AV无码久久一区| 国产精品99久久不卡| 亚洲国产一成久久精品国产成人综合 | 精品人妻伦九区久久AAA片69| 久久一区二区免费播放| 蜜臀久久99精品久久久久久小说| 99久久久国产精品免费无卡顿| 久久免费99精品国产自在现线 | 国产69精品久久久久久人妻精品| 久久AV高清无码| 久久不见久久见免费影院www日本| 久久午夜夜伦鲁鲁片免费无码影视| 色婷婷久久综合中文久久蜜桃av | aaa级精品久久久国产片| 女人高潮久久久叫人喷水| 99re久久精品国产首页2020| 久久亚洲国产精品成人AV秋霞| 久久91精品久久91综合| 亚洲国产精品无码久久98| 久久久精品国产亚洲成人满18免费网站 | 久久久久成人精品无码| 91久久精品91久久性色| 久久亚洲AV无码精品色午夜 | 久久午夜无码鲁丝片秋霞| 久久精品国产99久久久香蕉| 996久久国产精品线观看| 国产精品久久国产精麻豆99网站| 久久久亚洲AV波多野结衣| 久久久久免费精品国产|