当前位置: 首页>>代码示例>>C++>>正文


C++ ObjectList::back方法代码示例

本文整理汇总了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;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:28,代码来源:ESceneSpawnControls.cpp

示例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;
}
开发者ID:2asoft,项目名称:xray,代码行数:24,代码来源:ESceneShapeControls.cpp


注:本文中的ObjectList::back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。