本文整理汇总了C++中ObjectList::back方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectList::back方法的具体用法?C++ ObjectList::back怎么用?C++ ObjectList::back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectList
的用法示例。
在下文中一共展示了ObjectList::back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Start
bool __fastcall TUI_ControlSpawnAdd::Start(TShiftState Shift)
{
TfraSpawn* F = (TfraSpawn*)parent_tool->pFrame;
if (F->ebAttachObject->Down){
CCustomObject* from = Scene->RayPickObject(UI->ZFar(), UI->m_CurrentRStart, UI->m_CurrentRDir, OBJCLASS_DUMMY, 0, 0);
if (from->ClassID!=OBJCLASS_SPAWNPOINT){
ObjectList lst;
int cnt = Scene->GetQueryObjects(lst,OBJCLASS_SPAWNPOINT,1,1,0);
if (1!=cnt) ELog.DlgMsg(mtError,"Select one shape.");
else{
CSpawnPoint* base = dynamic_cast<CSpawnPoint*>(lst.back()); R_ASSERT(base);
if (base->AttachObject(from)){
if (!Shift.Contains(ssAlt)){
F->ebAttachObject->Down = false;
ResetActionToSelect ();
}
}else{
ELog.DlgMsg(mtError,"Attach impossible.");
}
}
}else{
ELog.DlgMsg(mtError,"Attach impossible.");
}
}else{
DefaultAddObject(Shift,AppendCallback);
}
return false;
}
示例2: Start
bool __fastcall TUI_ControlShapeAdd::Start(TShiftState Shift)
{
TfraShape* F = (TfraShape*)parent_tool->pFrame;
if (F->ebAttachShape->Down){
CEditShape* from = dynamic_cast<CEditShape*>(Scene->RayPickObject(UI->ZFar(),UI->m_CurrentRStart, UI->m_CurrentRNorm, OBJCLASS_SHAPE, 0, 0));
if (from){
ObjectList lst;
int cnt = Scene->GetQueryObjects(lst,OBJCLASS_SHAPE,1,1,0);
if (1!=cnt) ELog.DlgMsg(mtError,"Select one shape.");
else{
CEditShape* base = dynamic_cast<CEditShape*>(lst.back()); R_ASSERT(base);
if (base!=from){
base->Attach(from);
if (!Shift.Contains(ssAlt)){
F->ebAttachShape->Down = false;
ResetActionToSelect ();
}
}
}
}
}else
DefaultAddObject(Shift,0,AfterAppendCallback);
return false;
}