本文整理汇总了C++中Selection::Update方法的典型用法代码示例。如果您正苦于以下问题:C++ Selection::Update方法的具体用法?C++ Selection::Update怎么用?C++ Selection::Update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Selection
的用法示例。
在下文中一共展示了Selection::Update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateManipulator
Manipulator* ScaleTool::CreateManipulator (
Viewer* v, Event& e, Transformer* rel
) {
GraphicView* views = v->GetGraphicView();
Selection* s = v->GetSelection(), *newSel;
GraphicView* gv;
Manipulator* m = nil;
Iterator i;
newSel = views->ViewIntersecting(e.x-SLOP, e.y-SLOP, e.x+SLOP, e.y+SLOP);
if (newSel->IsEmpty()) {
s->Clear();
} else {
newSel->First(i);
gv = newSel->GetView(i);
if (s->Includes(gv)) {
s->Remove(gv);
s->Prepend(gv);
} else {
s->Clear();
s->Append(gv);
s->Update();
}
m = gv->CreateManipulator(v, e, rel, this);
}
delete newSel;
return m;
}
示例2: CreateManipulator
Manipulator* ExamineTool::CreateManipulator (
Viewer* v, Event& e, Transformer* t
){
GraphicView* views = v->GetGraphicView();
Selection* s = v->GetSelection();
_selPath = new Selection;
Manipulator* m = nil;
s->Clear();
ComputeViewPath(e, views, _selPath);
_shift = e.shift_is_down();
if (!_selPath->IsEmpty()) {
Iterator i;
_selPath->First(i);
GraphicView* gv = _selPath->GetView(i);
s->Append(gv);
s->Update();
_selPath->Last(i);
gv = _selPath->GetView(i);
m = gv->CreateManipulator(v, e, t, this);
}
delete _selPath;
return m;
}
示例3: InterpretManipulator
Command* ReshapeTool::InterpretManipulator (Manipulator* m) {
Selection* s;
Command* cmd = nil;
Iterator i;
if (m != nil) {
s = m->GetViewer()->GetSelection();
s->First(i);
cmd = s->GetView(i)->InterpretManipulator(m);
s->Update();
}
return cmd;
}