OpenCASCADE 显示对象设置不可选中

原有的选中模式代码:

static Standard_Integer SelectionMode (const TopAbs_ShapeEnum theShapeType)
{
    switch (theShapeType)
    {
    case TopAbs_VERTEX:    return 1;
    case TopAbs_EDGE:      return 2;
    case TopAbs_WIRE:      return 3;
    case TopAbs_FACE:      return 4;
    case TopAbs_SHELL:     return 5;
    case TopAbs_SOLID:     return 6;
    case TopAbs_COMPSOLID: return 7;
    case TopAbs_COMPOUND:  return 8;
    case TopAbs_SHAPE:     return 0;
    }
    return 0;
}

例如: AIS_Shape::SelectionMode(TopAbs_EDGE) 选中模式为边线

调用 AIS_InteractiveContext::Display 时设置 -1 ,则对象无法选中

myContext->Display(theObjects,
                    AIS_Shaded,
                    selectable ? AIS_Shape::SelectionMode(TopAbs_EDGE) : -1,
                    Standard_True);
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇