本文整理汇总了C++中ViewExp::TrackImplicitGrid方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewExp::TrackImplicitGrid方法的具体用法?C++ ViewExp::TrackImplicitGrid怎么用?C++ ViewExp::TrackImplicitGrid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewExp
的用法示例。
在下文中一共展示了ViewExp::TrackImplicitGrid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proc
//.........这里部分代码省略.........
SWrapObj->ClearAFlag(A_OBJ_LONG_CREATE);
#endif
SWrapObj->EndEditParams( (IObjParam*)createInterface, 0, NULL);
if (SWrapNode) {
theHold.Suspend();
DeleteReference(0);
theHold.Resume();
}
// new object
CreateNewObject(); // creates SWrapObj
}
theHold.Begin(); // begin hold for undo
mat.IdentityMatrix();
// link it up
SWrapNode = createInterface->CreateObjectNode( SWrapObj);
attachedToNode = TRUE;
assert( SWrapNode );
createCB = NULL;
createInterface->SelectNode( SWrapNode );
// Reference the new node so we'll get notifications.
theHold.Suspend();
MakeRefByID( FOREVER, 0, SWrapNode);
theHold.Resume();
mat.IdentityMatrix();
default:
res = createmethod(vpx,msg,point,flag,m,mat);
createInterface->SetNodeTMRelConstPlane(SWrapNode, mat);
if (res==CREATE_ABORT)
goto abort;
if (res==CREATE_STOP){
#ifdef _OSNAP
SWrapObj->ClearAFlag(A_OBJ_LONG_CREATE);
#endif
theHold.Accept(GetString(IDS_AP_CREATE));
}
createInterface->RedrawViews(createInterface->GetTime());
break;
}
break;
case MOUSE_MOVE:
res = createmethod(vpx,msg,point,flag,m,mat);
createInterface->SetNodeTMRelConstPlane(SWrapNode, mat);
if (res==CREATE_ABORT)
goto abort;
if (res==CREATE_STOP){
#ifdef _OSNAP
SWrapObj->ClearAFlag(A_OBJ_LONG_CREATE);
#endif
theHold.Accept(GetString(IDS_AP_CREATE));
}
createInterface->RedrawViews(createInterface->GetTime());
break;
/* res = createmethod(vpx,msg,point,flag,m,mat);
createInterface->SetNodeTMRelConstPlane(SWrapNode, mat);
if (res==CREATE_ABORT)
goto abort;
if (res==CREATE_STOP)
theHold.Accept(GetString(IDS_AP_CREATE));
createInterface->RedrawViews(createInterface->GetTime());
break;*/
case MOUSE_PROPCLICK:
createInterface->SetStdCommandMode(CID_OBJMOVE);
break;
case MOUSE_ABORT:
abort:
assert( SWrapObj );
#ifdef _OSNAP
SWrapObj->ClearAFlag(A_OBJ_LONG_CREATE);
#endif
SWrapObj->EndEditParams( (IObjParam*)createInterface,0,NULL);
theHold.Cancel(); // deletes both the object and target.
if (theHold.GetGlobalPutCount()!=lastPutCount)
GetSystemSetting(SYSSET_CLEAR_UNDO);
SWrapNode = NULL;
createInterface->RedrawViews(createInterface->GetTime());
CreateNewObject();
attachedToNode = FALSE;
res = FALSE;
break;
case MOUSE_FREEMOVE:
SetCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDC_CROSS_HAIR)));
#ifdef _OSNAP //PREVIEW SNAP
res = createmethod(vpx,msg,point,flag,m,mat);
#endif
vpx->TrackImplicitGrid(m);
break;
}
done:
if ((res == CREATE_STOP)||(res==CREATE_ABORT))
vpx->ReleaseImplicitGrid();
createInterface->ReleaseViewport(vpx);
return res;
}