|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
求part1和part2中心的距离
现在就是选择part1和part2的问题
发现现在只有点击树上的名字才能选中,在对话框中显示part1.1和part2.2,如图1
如果直接点击模型,反而不能显示,如图2,似乎点击模型时只选中了面,不知道怎么上传图。。。笨死啦。。。
请问该怎么设置?才能不管是点击树还是模型都能在对话框中显示模型的名字
我现在写的程序是
{
_Body1Agent = new CATPathElementAgent ("Body1Agent");
_Body1Agent -> SetBehavior( CATDlgEngRepeat|CATDlgEngWithPSOHSO
);
_Body2Agent = new CATPathElementAgent ("Body2Agent");
_Body2Agent -> SetBehavior( CATDlgEngRepeat|CATDlgEngWithPSOHSO
);
_OKAgent=
new CATDialogAgent("OK Agent");
_OKAgent->AcceptOnNotify ( _Panel, _Panel->GetDiaOKNotification());
_CancelAgent=
new CATDialogAgent("Cancel Agent");
_CancelAgent->AcceptOnNotify ( _Panel, _Panel->GetDiaCANCELNotification());
// Define State
CATDialogState * FirstState = GetInitialState(" Select a Body1 ");
CATDialogState * SecState = AddDialogState(" Select a Body2 ");
// Plug Agent to the State
FirstState -> AddDialogAgent (_Body1Agent);
FirstState -> AddDialogAgent (_Body2Agent);
FirstState -> AddDialogAgent (_CancelAgent);
SecState -> AddDialogAgent (_Body2Agent);
SecState -> AddDialogAgent (_OKAgent);
SecState -> AddDialogAgent (_CancelAgent);
// Define transiton with condition and Action( optional)
AddTransition( FirstState, SecState,
IsOutputSetCondition (_Body1Agent),
Action ((ActionMethod) &FirstSpringBpdCmd::ActionOne));
AddTransition( SecState,SecState,
IsOutputSetCondition (_Body2Agent),
Action ((ActionMethod) &FirstSpringBpdCmd::ActionTwo));
AddTransition(SecState, NULL,
IsOutputSetCondition (_OKAgent),
Action ((ActionMethod) &FirstSpringBpdCmd::OKAction));
AddTransition( SecState, NULL,
IsOutputSetCondition (_CancelAgent),
Action ((ActionMethod) &FirstSpringBpdCmd::CancelAction));
}
ActionOne 函数里是这样写的:
ActionOne( void *data )
{
cout<< " Action one "<<endl;
//retrieve new selected
CATBaseUnknown *piUnknown = _Body1Agent->GetElementValue();
_spBody1 = NULL_var;
_spBody1 = piUnknown;
CATISpecObject_var spSpecOnBody1 =_spBody1;
_SelectorList003->SetLine(spSpecOnBody1->GetName(),0,CATDlgDataModify);
// Initiliase the acquisition
_Body1Agent->InitializeAcquisition();
return TRUE;
}
|
|