occ代码分析

临时变量就是local里面的变量
擦除变量就是把模型改成擦除标记

void SelectMgr_SelectionManager
::LoadMode (const Handle(SelectMgr_SelectableObject)& anObject,
const Standard_Integer amode)
{
if(amode==-1) return;
if(!anObject->HasSelection(amode))
{
Handle(SelectMgr_Selection) NewSel = new SelectMgr_Selection(amode);
anObject->AddSelection (NewSel,amode);
}
}
一个模式对应一个SelectMgr_Selection, 也对应一个过滤器模式

myCTX->SelectionManager()->Activate(anObject,itl.Value(),myMainVS,WithProj);

SelectionManager对应的管理类

void Ais_TanShape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
const Standard_Integer aMode)
在显示的时候,生成的是默认的模式,也可以随时打开生成
挑选模式包括原生的模式和随时打开的模式

void StdSelect_BRepSelectionTool
::ComputeSensitive (const TopoDS_Shape& theShape,
const Handle(StdSelect_BRepOwner)& theOwner,
const Handle(SelectMgr_Selection)& theSelection,
const Standard_Real theDeflection,
const Standard_Real theDeviationAngle,
const Standard_Integer theNbPOnEdge,
const Standard_Real theMaxParam,
const Standard_Boolean isAutoTriangulation)
动态加入一个拾取点

收取少量费用,可以提供三维引擎osg,ogre, vtk, opengl等图形库, occ, qt等还有三维框架的技术咨询服务,有意者请加我QQ 1578175270

原文地址:https://www.cnblogs.com/lizhengjin/p/4806556.html