本文整理汇总了C++中HeeksObj::SetClickMarkPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ HeeksObj::SetClickMarkPoint方法的具体用法?C++ HeeksObj::SetClickMarkPoint怎么用?C++ HeeksObj::SetClickMarkPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HeeksObj
的用法示例。
在下文中一共展示了HeeksObj::SetClickMarkPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnMouse
//.........这里部分代码省略.........
if(o == previously_marked)
{
object = o;
break;
}
o = marked_object.Increment();
if(o)
{
// prefer highest order objects
if(o->GetType() < object->GetType())object = o;
}
}
if(!event.ShiftDown() && !event.ControlDown())
{
wxGetApp().m_marked_list->Clear(true);
}
if (wxGetApp().m_marked_list->ObjectMarked(object))
{
if (!event.ShiftDown())
{
wxGetApp().m_marked_list->Remove(object, true);
}
}
else
{
wxGetApp().m_marked_list->Add(object, true);
m_last_click_point = CClickPoint(wxPoint(event.GetX(), event.GetY()), depth);
gp_Lin ray = wxGetApp().m_current_viewport->m_view_point.SightLine(wxPoint(event.GetX(), event.GetY()));
double ray_start[3], ray_direction[3];
extract(ray.Location(), ray_start);
extract(ray.Direction(), ray_direction);
object->SetClickMarkPoint(&marked_object, ray_start, ray_direction);
}
}
else
{
wxGetApp().m_marked_list->Clear(true);
}
}
if(m_just_one && m_doing_a_main_loop && (wxGetApp().m_marked_list->size() > 0))
{
wxGetApp().ExitMainLoop();
}
else
{
wxGetApp().m_current_viewport->m_need_refresh = true;
}
}
else if(event.RightUp())
{
MarkedObjectOneOfEach marked_object;
wxGetApp().FindMarkedObject(wxPoint(event.GetX(), event.GetY()), &marked_object);
wxGetApp().DoDropDownMenu(wxGetApp().m_frame->m_graphics, wxPoint(event.GetX(), event.GetY()), &marked_object, false, event.ControlDown());
}
else if(event.Dragging())
{
if(event.MiddleIsDown())
{
wxPoint dm;
dm.x = event.GetX() - CurrentPoint.x;
dm.y = event.GetY() - CurrentPoint.y;
if(wxGetApp().ctrl_does_rotate == event.ControlDown())
{
示例2: OnLeftUp
void CSelectMode::OnLeftUp( wxMouseEvent& event )
{
if(wxGetApp().drag_gripper)
{
double to[3], from[3];
wxGetApp().m_digitizing->digitize(wxPoint(event.GetX(), event.GetY()));
extract(wxGetApp().m_digitizing->digitized_point.m_point, to);
wxGetApp().grip_to = wxGetApp().m_digitizing->digitized_point.m_point;
extract(wxGetApp().grip_from, from);
wxGetApp().drag_gripper->OnGripperReleased(from, to);
wxGetApp().m_digitizing->SetOnlyCoords(wxGetApp().drag_gripper, false);
wxGetApp().drag_gripper = NULL;
}
else if(window_box_exists)
{
if(!event.ControlDown())wxGetApp().m_marked_list->Clear(true);
std::list<HeeksObj*> obj_list;
GetObjectsInWindow(event, obj_list);
wxGetApp().m_marked_list->Add(obj_list, true);
wxGetApp().m_current_viewport->DrawWindow(window_box, true); // undraw the window
window_box_exists = false;
}
else
{
// select one object
m_last_click_point = CClickPoint();
MarkedObjectOneOfEach marked_object;
wxGetApp().FindMarkedObject(wxPoint(event.GetX(), event.GetY()), &marked_object);
if(marked_object.m_map.size()>0){
HeeksObj* previously_marked = NULL;
if(wxGetApp().m_marked_list->size() == 1)
{
previously_marked = *(wxGetApp().m_marked_list->list().begin());
}
HeeksObj* o = marked_object.GetFirstOfTopOnly();
unsigned long depth = marked_object.GetDepth();
HeeksObj* object = o;
while(o)
{
if(o == previously_marked)
{
object = o;
break;
}
o = marked_object.Increment();
if(o)
{
// prefer highest order objects
if(o->GetType() < object->GetType())object = o;
}
}
if(!event.ShiftDown() && !event.ControlDown())
{
wxGetApp().m_marked_list->Clear(true);
}
if (wxGetApp().m_marked_list->ObjectMarked(object))
{
if (!event.ShiftDown())
{
wxGetApp().m_marked_list->Remove(object, true);
}
}
else
{
wxGetApp().m_marked_list->Add(object, true);
m_last_click_point = CClickPoint(wxPoint(event.GetX(), event.GetY()), depth);
gp_Lin ray = wxGetApp().m_current_viewport->m_view_point.SightLine(wxPoint(event.GetX(), event.GetY()));
double ray_start[3], ray_direction[3];
extract(ray.Location(), ray_start);
extract(ray.Direction(), ray_direction);
marked_object.GetFirstOfTopOnly();
object->SetClickMarkPoint(marked_object.GetCurrent(), ray_start, ray_direction);
}
}
else
{
if(!event.ShiftDown() && !event.ControlDown())
{
wxGetApp().m_marked_list->Clear(true);
}
}
}
if(m_just_one && m_doing_a_main_loop && (wxGetApp().m_marked_list->size() > 0))
{
ExitMainLoop();
}
else
{
wxGetApp().m_current_viewport->m_need_refresh = true;
}
}