本文整理汇总了C++中ViewExp::CommitImplicitGrid方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewExp::CommitImplicitGrid方法的具体用法?C++ ViewExp::CommitImplicitGrid怎么用?C++ ViewExp::CommitImplicitGrid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewExp
的用法示例。
在下文中一共展示了ViewExp::CommitImplicitGrid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proc
int CreateSWrapObjectProc::proc(HWND hwnd,int msg,int point,int flag,
IPoint2 m )
{ int res=TRUE;
ViewExp *vpx = createInterface->GetViewport(hwnd);
assert( vpx );
#ifdef _3D_CREATE
DWORD snapdim = SNAP_IN_3D;
#else
DWORD snapdim = SNAP_IN_PLANE;
#endif
switch ( msg ) {
case MOUSE_POINT:
switch ( point ) {
case 0:
assert( SWrapObj );
vpx->CommitImplicitGrid(m, flag );
if ( createInterface->SetActiveViewport(hwnd) ) {
return FALSE;
}
if (createInterface->IsCPEdgeOnInView()) {
res = FALSE;
goto done;
}
if ( attachedToNode ) {
// send this one on its way
#ifdef _OSNAP
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:
//.........这里部分代码省略.........