本文整理汇总了C++中BaseObject::GetMl方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseObject::GetMl方法的具体用法?C++ BaseObject::GetMl怎么用?C++ BaseObject::GetMl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseObject
的用法示例。
在下文中一共展示了BaseObject::GetMl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// main routine: build virtual atom objects
BaseObject *AtomObject::GetVirtualObjects(BaseObject *op, HierarchyHelp *hh)
{
BaseObject *orig = op->GetDown();
// return if no input object is available
if (!orig) return NULL;
Bool dirty = FALSE;
// generate polygonalized clone of input object
BaseObject *main=NULL,*res=op->GetAndCheckHierarchyClone(hh,orig,HIERARCHYCLONEFLAGS_ASPOLY,&dirty,NULL,FALSE);
// if !dirty object is already cached and doesn't need to be rebuilt
if (!dirty) return res;
if (!res) return NULL;
LONG sub;
Bool single;
Real srad,crad;
// get object container
BaseContainer *bc=op->GetDataInstance();
BaseThread *bt=hh->GetThread();
// group all further objects with this null object
main = BaseObject::Alloc(Onull);
if (!main) goto Error;
// get object settings
srad = bc->GetReal(ATOMOBJECT_SRAD);
crad = bc->GetReal(ATOMOBJECT_CRAD);
sub = bc->GetLong(ATOMOBJECT_SUB);
single = bc->GetBool(ATOMOBJECT_SINGLE);
// go through all child hierarchies
if (!Recurse(hh,bt,main,res,orig->GetMl(),srad,crad,sub,single)) goto Error;
blDelete(res);
return main;
Error:
blDelete(res);
blDelete(main);
return NULL;
}