本文整理汇总了C++中CGroupObject::GetObjects方法的典型用法代码示例。如果您正苦于以下问题:C++ CGroupObject::GetObjects方法的具体用法?C++ CGroupObject::GetObjects怎么用?C++ CGroupObject::GetObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroupObject
的用法示例。
在下文中一共展示了CGroupObject::GetObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillGroupItems
void __stdcall FillGroupItems(ChooseItemVec& items, void* param)
{
CGroupObject* group = (CGroupObject*)param;
for (ObjectIt it=group->GetObjects().begin(); it!=group->GetObjects().end(); it++) {
items.push_back (SChooseItem((*it)->Name,""));
}
}
示例2: FillGroupItems
void __stdcall FillGroupItems(ChooseItemVec& items, void* param)
{
CGroupObject* group = (CGroupObject*)param;
ObjectList grp_lst;
group->GetObjects (grp_lst);
for (ObjectIt it=grp_lst.begin(); it!=grp_lst.end(); ++it)
items.push_back (SChooseItem((*it)->Name,""));
}
示例3: MakeThumbnail
void ESceneGroupTools::MakeThumbnail()
{
if (SelectionCount(true)==1) {
CGroupObject* object = 0;
for (ObjectIt it=m_Objects.begin(); it!=m_Objects.end(); it++) {
if ((*it)->Selected()) {
object = dynamic_cast<CGroupObject*>(*it);
break;
}
}
VERIFY (object);
object->Select (false);
// save render params
Flags32 old_flag = psDeviceFlags;
// set render params
psDeviceFlags.set (rsStatistic|rsDrawGrid,FALSE);
U32Vec pixels;
u32 w=512,h=512;
if (Device.MakeScreenshot (pixels,w,h)) {
AnsiString tex_name = ChangeFileExt(object->Name,".thm");
SStringVec lst;
for (ObjectIt it=object->GetObjects().begin(); it!=object->GetObjects().end(); it++)
lst.push_back ((*it)->Name);
EGroupThumbnail tex (tex_name.c_str(),false);
tex.CreateFromData (pixels.begin(),w,h,lst);
string_path fn;
FS.update_path (fn,_groups_,object->RefName());
strcat (fn,".group");
tex.Save (FS.get_file_age(fn));
} else {
ELog.DlgMsg (mtError,"Can't make screenshot.");
}
object->Select (true);
// restore render params
psDeviceFlags = old_flag;
} else {
ELog.DlgMsg (mtError,"Select 1 GroupObject.");
}
}