本文整理汇总了C++中IDerivedObject::SuperClassID方法的典型用法代码示例。如果您正苦于以下问题:C++ IDerivedObject::SuperClassID方法的具体用法?C++ IDerivedObject::SuperClassID怎么用?C++ IDerivedObject::SuperClassID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDerivedObject
的用法示例。
在下文中一共展示了IDerivedObject::SuperClassID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RecursePipeAndMatch
BOOL RecursePipeAndMatch(LocalPatchData *smd, Object *obj)
{
SClass_ID sc;
IDerivedObject* dobj;
Object *currentObject = obj;
if ((sc = obj->SuperClassID()) == GEN_DERIVOB_CLASS_ID)
{
dobj = (IDerivedObject*)obj;
while (sc == GEN_DERIVOB_CLASS_ID)
{
for (int j = 0; j < dobj->NumModifiers(); j++)
{
ModContext *mc = dobj->GetModContext(j);
if (mc->localData == smd)
{
return TRUE;
}
}
dobj = (IDerivedObject*)dobj->GetObjRef();
currentObject = (Object*) dobj;
sc = dobj->SuperClassID();
}
}
int bct = currentObject->NumPipeBranches(FALSE);
if (bct > 0)
{
for (int bi = 0; bi < bct; bi++)
{
Object* bobj = currentObject->GetPipeBranch(bi,FALSE);
if (RecursePipeAndMatch(smd, bobj)) return TRUE;
}
}
return FALSE;
}
示例2: resolveControllers
//---------------------------------------------------------------
void ControllerList::resolveControllers( const ExportNode& exportNode )
{
Object* object = exportNode.getINode()->GetObjectRef();
if ( !object )
return;
if ( exportNode.getIsXRefObject() )
object = XRefFunctions::getXRefItemSource(object);
if ( !object )
return;
SClass_ID superClassId;
IDerivedObject* derivedObject;
Object *currentObject = object;
//int modIdx = 0;
superClassId = object->SuperClassID();
if (superClassId == GEN_DERIVOB_CLASS_ID || superClassId == DERIVOB_CLASS_ID || superClassId == WSM_DERIVOB_CLASS_ID)
{
derivedObject = (IDerivedObject*)object;
while (superClassId == GEN_DERIVOB_CLASS_ID || superClassId == DERIVOB_CLASS_ID || superClassId == WSM_DERIVOB_CLASS_ID)
{
for (int modifierIndex = 0; modifierIndex < derivedObject->NumModifiers(); ++modifierIndex)
{
Modifier* modifier = derivedObject->GetModifier(modifierIndex);
//no iskin support for xrefs
// TODO needs further investigation...
if ( SkinController::isSkinController(modifier) /*&& !exportNode.getIsXRefObject() */)
{
SkinController * skinController = new SkinController(derivedObject, modifierIndex, modifier->IsEnabled() != false);
mControllers.push_back(skinController);
}
else if ( MorphController::isMorphController(modifier) )
{
MorphController * morphController = new MorphController(derivedObject, modifierIndex, modifier->IsEnabled() != false);
mControllers.push_back(morphController);
}
else
return;
}
derivedObject = (IDerivedObject*) derivedObject->GetObjRef();
currentObject = (Object*) derivedObject;
superClassId = derivedObject->SuperClassID();
}
}
/* int bct = currentObject->NumPipeBranches(FALSE);
if (bct > 0)
{
for (int bi = 0; bi < bct; bi++)
{
Object* bobj = currentObject->GetPipeBranch(bi,FALSE);
Resolve(bobj);
return;
}
}
*/
}
示例3: UVStripDlgProc
static INT_PTR CALLBACK UVStripDlgProc(
HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
theUVStrip.Init(hWnd);
TCHAR s[50]; _stprintf(s,GetString(IDS_OBJ_SELECTED),theUVStrip.ip->GetSelNodeCount());
SetWindowText(GetDlgItem(hWnd,IDC_SEL),s);
break;
case WM_DESTROY:
theUVStrip.Destroy(hWnd);
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_R1:
{
int cn = theUVStrip.ip->GetSelNodeCount();
Interval valid=FOREVER;
if(cn>0)
{
for(int x=0;x<cn;x++)
{
// then osm stack
Object* obj = theUVStrip.ip->GetSelNode(x)->GetObjectRef();
//check to make sure no modifiers on the object
int ct = 0;
SClass_ID sc;
IDerivedObject* dobj;
if ((sc = obj->SuperClassID()) == GEN_DERIVOB_CLASS_ID)
{
dobj = (IDerivedObject*)obj;
while (sc == GEN_DERIVOB_CLASS_ID)
{
ct += dobj->NumModifiers();
dobj = (IDerivedObject*)dobj->GetObjRef();
sc = dobj->SuperClassID();
}
}
if ((dobj = theUVStrip.ip->GetSelNode(x)->GetWSMDerivedObject()) != NULL)
{
ct += dobj->NumModifiers();
}
if (ct != 0)
{
//error message here
TSTR buf2 = GetString(IDS_ERROR);
TSTR buf1 = GetString(IDS_ERROR_MESH);
MessageBox(hWnd,buf1,buf2,MB_ICONEXCLAMATION);
}
else
{
ObjectState os = theUVStrip.ip->GetSelNode(x)->EvalWorldState(theUVStrip.ip->GetTime());
if (os.obj && os.obj->SuperClassID() == GEOMOBJECT_CLASS_ID && os.obj->IsSubClassOf(triObjectClassID))
{
Object *bobj = os.obj->FindBaseObject();
if (bobj->ClassID() ==Class_ID(EDITTRIOBJ_CLASS_ID,0))
{
TriObject *T1 = (TriObject *)os.obj;
T1->GetMesh().setNumTVerts(0);
T1->GetMesh().setNumTVFaces(0);
}
else
{
//error message here
TSTR buf2 = GetString(IDS_ERROR);
TSTR buf1 = GetString(IDS_ERROR_MESH);
MessageBox(hWnd,buf1,buf2,MB_ICONEXCLAMATION);
}
}
else
{
//error message here
TSTR buf2 = GetString(IDS_ERROR);
TSTR buf1 = GetString(IDS_ERROR_MESH);
MessageBox(hWnd,buf1,buf2,MB_ICONEXCLAMATION);
}
}
theUVStrip.ip->ForceCompleteRedraw();
}
}
break;
}
case IDC_R2:{
int cn = theUVStrip.ip->GetSelNodeCount();
if(cn>0){
for(int x=0;x<cn;x++){
INode *tmp=theUVStrip.ip->GetSelNode(x);
tmp->SetMtl(NULL);
if(GetCheckBox(hWnd, IDC_BLANK)) tmp->SetWireColor(RGB(160,160,160));
}
//.........这里部分代码省略.........