您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetCOREInterface函数代码示例

51自学网 2021-06-01 21:04:36
  C++
这篇教程C++ GetCOREInterface函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetCOREInterface函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCOREInterface函数的具体用法?C++ GetCOREInterface怎么用?C++ GetCOREInterface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetCOREInterface函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ResetDXStates

bool DxStdMtl2::CreateAndLoadEffectData(){	ResetDXStates();	if(IsDxMaterialEnabled(map))	{		bool useLPRT;		TCHAR filename[MAX_PATH];		_tcscpy(filename,GetCOREInterface()->GetDir(APP_PLUGCFG_DIR));		_tcscat(filename,"//DXDisplay.ini");		useLPRT = GetPrivateProfileInt(_T("Settings"),_T("LPRTEnabled"),0,filename) ? true : false;					if(!pd3dDevice)			pd3dDevice = GetDevice();		if(!pd3dDevice)			return false;		if(pEffectParser)		{			pEffectParser->DestroyParser();			pEffectParser = NULL;		}		elementContainer.DeleteAllElements();		UpdateSceneLights();		DWORD numberOfPSinst = 0;				//lets make sure we get the correct code for the GFX card..		IHLSLCodeGenerator::CodeVersion code = GetPixelShaderSupport(pd3dDevice,numberOfPSinst);		if(code == IHLSLCodeGenerator::PS_1_X)			return false;		IHLSLCodeGenerator * codeGen = IHLSLCodeGenerator::GetHLSLCodeGenerator();		Tab<INode*> lights;		for(int j=0;j<sceneLights.Count();j++){			INode * Light = sceneLights[j]->GetLightNode();			lights.Append(1, &Light);		}		TCHAR * effectString = codeGen->GenerateEffectFile(map,lights,code,bTransparency,numberOfPSinst,useLPRT);		if(!pEffectParser)			CreateEffectParser();		if(pEffectParser && effectString){			pEffectParser->SetUseLPRT(useLPRT);			pEffectParser->LoadEffect(pd3dDevice,this,effectString,false,true);			pEffectParser->ParseEffectFile(pd3dDevice,NULL,this);			PatchInLightNodes();			LoadTextureData(codeGen);		}		delete codeGen;		IRenderMesh * rm = mpMeshCache->GetActiveRenderMesh(m_CurCache);		if(rm) rm->Invalidate();		GetCOREInterface()->ForceCompleteRedraw(FALSE);	}	return true;}
开发者ID:whztt07,项目名称:OgreGameProject,代码行数:66,


示例2: plCreateMenu

void plCreateMenu(){#if MAX_VERSION_MAJOR <= 11    AddPlasmaExportMenu();#endif    IMenuManager* pMenuMan = GetCOREInterface()->GetMenuManager();    bool newlyRegistered = pMenuMan->RegisterMenuBarContext(kMyMenuContextId, kMenuName);    // Is the Max menu version the most recent?    bool wrongVersion = GetPrivateProfileIntW(L"Menu", L"Version", 0, plMaxConfig::GetPluginIni().WideString().data()) < kMenuVersion;    if (wrongVersion)    {        // Delete the old version of the menu        IMenu *oldMenu = pMenuMan->FindMenu(kMenuName);        if (oldMenu)            pMenuMan->UnRegisterMenu(oldMenu);        // Update the menu version        wchar_t buf[12];        snwprintf(buf, arrsize(buf), L"%d", kMenuVersion);        WritePrivateProfileStringW(L"Menu", L"Version", buf, plMaxConfig::GetPluginIni().WideString().data());    }        if (wrongVersion || newlyRegistered)    {        IMenu *pMainMenu = pMenuMan->GetMainMenuBar();        if (!pMainMenu)        {            hsAssert(0, "Main menu not found");            return;        }        // Get our action table        ActionTable* pActionTable = GetCOREInterface()->GetActionManager()->FindTable(kActionId);        if (!pActionTable)        {            hsAssert(0, "Action table not found");            return;        }        // Create the Plasma menu        IMenu* pPlasmaMenu = GetIMenu();        pPlasmaMenu->SetTitle(kMenuName);        // Register the new menu with the system        pMenuMan->RegisterMenu(pPlasmaMenu, 0);        /////////////////////////////////////////////////        // Add the menu items        //        IMenuItem* pMenuItem; #if MAX_VERSION_MAJOR >= 12        // Add the export action to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionExport));        pPlasmaMenu->AddItem(pMenuItem);#endif        // Add the save selected action to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionSaveSel));        pPlasmaMenu->AddItem(pMenuItem);        // Add the merge action to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionMerge));        pPlasmaMenu->AddItem(pMenuItem);        // Add the component copy action to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionCompCopy));        pPlasmaMenu->AddItem(pMenuItem);        // Add a separator        pMenuItem = GetIMenuItem();        pMenuItem->ActAsSeparator();        pPlasmaMenu->AddItem(pMenuItem);            // Add the component manager to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionComponent));        pPlasmaMenu->AddItem(pMenuItem);        // Add the resource collector to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionResCollect));        pPlasmaMenu->AddItem(pMenuItem);        // Add the texture search to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionTexSearch));        pPlasmaMenu->AddItem(pMenuItem);        // Add the age description to the menu        pMenuItem = GetIMenuItem();        pMenuItem->SetActionItem(pActionTable->GetAction(kActionAgeDesc));        pPlasmaMenu->AddItem(pMenuItem);//.........这里部分代码省略.........
开发者ID:Mirphak,项目名称:Plasma,代码行数:101,


示例3: buildFromNode

// Generate all the optimzation and geometry datavoid morphChannel::buildFromNode( INode *node , BOOL resetTime, TimeValue t, BOOL picked ){	// fix for defect 1346773 - Crash deleting progressive morph target	if (NULL == node ) {		return;	}	if(resetTime) t = GetCOREInterface()->GetTime();	ObjectState os = node->EvalWorldState(t);	int tPc = os.obj->NumPoints();	int x,id = 0;	Point3 DeltP;	double wtmp;	Point3 tVert;	if(tPc!=mp->MC_Local.Count) {		mNumPoints = 0;		mActive = FALSE;		mInvalid = TRUE;		goto CantLoadThis;	}	if(!mp->MC_Local.CacheValid) goto CantLoadThis;	mInvalid = FALSE;	// if the channel hasn't been edited yet, change the 'empty'	// name to that of the chosen object.	if( !mModded || picked) mName = node->GetName();	// Set the data into the morphChannel	mActive = TRUE;	mModded = TRUE;		// Prepare the channel	AllocBuffers(tPc, tPc);	mSel.SetSize(tPc);	mSel.ClearAll();	mNumPoints = 0;	for(x=0;x<tPc;x++)	{		tVert = os.obj->GetPoint(x);		wtmp = os.obj->GetWeight(x);		// calculate the delta cache		DeltP.x=(tVert.x-mp->MC_Local.oPoints[x].x)/100.0f;		DeltP.y=(tVert.y-mp->MC_Local.oPoints[x].y)/100.0f;		DeltP.z=(tVert.z-mp->MC_Local.oPoints[x].z)/100.0f;		mDeltas[x] = DeltP;		mWeights[x] = os.obj->GetWeight(x);		mSel.Set( x, os.obj->IsPointSelected(x)?1:0);		mPoints[x] = tVert;		mNumPoints++;	}	// Update *everything*	mp->NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE);	mp->NotifyDependents(FOREVER,PART_ALL,REFMSG_SUBANIM_STRUCTURE_CHANGED);	mp->Update_channelFULL();	mp->Update_channelParams();	CantLoadThis:	tPc=0;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:74,


示例4: GetPBBitmap

BOOL plPlasmaMAXLayer::HandleBitmapSelection(int index /* = 0 */){    static ICustButton* bmSelectBtn;    PBBitmap *pbbm = GetPBBitmap( index );#ifdef MAXASS_AVAILABLE    MaxAssInterface* maxAssInterface = GetMaxAssInterface();#endif        // If the control key is held, we want to get rid of this texture    if ((GetKeyState(VK_CONTROL) & 0x8000) && pbbm != nil)    {        char msg[512];        sprintf(msg, "Are you sure you want to change this bitmap from %s to (none)?", pbbm->bi.Name());        if (hsMessageBox(msg, "Remove texture?", hsMessageBoxYesNo) == hsMBoxYes)        {            SetBitmap(nil, index);            return TRUE;        }        return FALSE;    }    // if we have the assetman plug-in, then try to use it, unless shift is held down#ifdef MAXASS_AVAILABLE    else if(maxAssInterface && !(GetKeyState(VK_SHIFT) & 0x8000))    {        jvUniqueId assetId;        GetBitmapAssetId(assetId, index);        char filename[MAX_PATH];        if (maxAssInterface->OpenBitmapDlg(assetId, filename, sizeof(filename)))        {            SetBitmapAssetId(assetId, index);            BitmapInfo bi;            bi.SetName(filename);            SetBitmap(&bi, index);            return TRUE;        }    }#endif    else    {        BitmapInfo bi;        if( pbbm != NULL )            bi.SetName( pbbm->bi.Name() );        BOOL selectedNewBitmap = TheManager->SelectFileInput(&bi,                                                            GetCOREInterface()->GetMAXHWnd(),                                                            _T("Select Bitmap Image File"));        if (selectedNewBitmap)        {#ifdef MAXASS_AVAILABLE            // Set the assetId to empty so our new, unmanaged texture will take            jvUniqueId emptyId;            SetBitmapAssetId(emptyId, index);#endif            SetBitmap(&bi, index);            return TRUE;        }    }    return FALSE;}
开发者ID:Drakesinger,项目名称:Plasma,代码行数:65,


示例5: switch

//.........这里部分代码省略.........			iret = TRUE;			break;			}		case IDC_NAMELISTGLOBAL_DROP :			{			if (GetAffectSelectedOnly())				SetAffectSelectedOnly(FALSE);			else SetAffectSelectedOnly(TRUE);			iret = TRUE;			break;			}		case IDC_JBUIMETHOD :			{			if (GetJBMethod())				SetJBMethod(FALSE);			else SetJBMethod(TRUE);			iret = TRUE;			break;			}		case IDC_SHOWMENU :			{			if (GetShowMenu())				SetShowMenu(FALSE);			else SetShowMenu(TRUE);			iret = TRUE;			break;			}		case IDC_SHOWSETUI :			{			if (GetShowSetUI())				SetShowSetUI(FALSE);			else SetShowSetUI(TRUE);			iret = TRUE;			break;			}		case IDC_SHOWOPTIONSUI :			{			if (GetShowOptionsUI())				SetShowOptionsUI(FALSE);			else SetShowOptionsUI(TRUE);			iret = TRUE;			break;			}		case IDC_SHOWCOPYPASTEUI :			{			if (GetShowCopyPasteUI())				SetShowCopyPasteUI(FALSE);			else SetShowCopyPasteUI(TRUE);			iret = TRUE;			break;			}		case IDC_DRAGMODE :			{			if (GetDragLeftMode())				SetDragLeftMode(FALSE);			else SetDragLeftMode(TRUE);			iret = TRUE;			break;			}		case IDC_DEBUGMODE :			{			if (GetDebugMode())				SetDebugMode(FALSE);			else SetDebugMode(TRUE);			iret = TRUE;			break;			}		case IDC_SHOWMARKER :			{			if (GetShowMarker())				SetShowMarker(FALSE);			else SetShowMarker(TRUE);			iret = TRUE;			break;			}//5.1.01		case IDC_RIGHTJUSTIFY: 			{			if (GetRightJustify())				SetRightJustify(FALSE);			else SetRightJustify(TRUE);			break;			}		}		IMenuBarContext* pContext = (IMenuBarContext*) GetCOREInterface()->GetMenuManager()->GetContext(kWeightTableMenuBar);	if (pContext)		pContext->UpdateWindowsMenu();	return iret;	}
开发者ID:2asoft,项目名称:xray,代码行数:101,


示例6: switch

INT_PTR CALLBACK RigidBodyWorld::Proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){	RigidBodyWorld* const world = (RigidBodyWorld *)GetWindowLong (hWnd, GWLP_USERDATA);	RigidBodyWorldDesc* const desc = (RigidBodyWorldDesc*) RigidBodyWorldDesc::GetDescriptor();	switch (msg) 	{		case WM_INITDIALOG:		{						RigidBodyWorld* const world = (RigidBodyWorld *)lParam;			SetWindowLong(hWnd, GWLP_USERDATA, (LONG)world);			world->m_myWindow = hWnd;			world->RigidBodyWorld::InitUI(hWnd);			break;		}		case WM_DESTROY:		{			world->StopsSimulation ();			world->RigidBodyWorld::DestroyUI(hWnd);			break;		}		case WM_ENABLE:		{			//EnableWindow(obj->m_worldPaneHandle, (BOOL) wParam);			break;		}		case WM_TIMER:		{			world->UpdatePhysics ();			break;		}		case WM_COMMAND:		{			switch (LOWORD(wParam)) 			{				case IDC_MAKE_RIGIDBODY:				{					world->StopsSimulation ();					Interface* const ip = GetCOREInterface();					int selectionCount = ip->GetSelNodeCount();					for (int i = 0; i < selectionCount; i ++) {						INode* const node = ip->GetSelNode(i);						Object* const obj = node->GetObjOrWSMRef();						if (obj) {							world->AttachRigiBodyController (node);						}					}					world->UpdateViewPorts();					break;				}				case IDC_DELETE_RIGIDBODY:				{					world->StopsSimulation ();					Interface* const ip = GetCOREInterface();					int selectionCount = ip->GetSelNodeCount();					for (int i = 0; i < selectionCount; i ++) {						INode* const node = ip->GetSelNode(i);						world->DetachRigiBodyController (node);					}					world->UpdateViewPorts ();					break;				}				case IDC_SHOW_GIZMOS:				{					world->StopsSimulation ();					for (NewtonBody* body = NewtonWorldGetFirstBody(desc->m_newton); body; body = NewtonWorldGetNextBody(desc->m_newton, body)) {						INode* const node = (INode*)NewtonBodyGetUserData(body);						RigidBodyController* const bodyInfo = (RigidBodyController*)desc->GetRigidBodyControl(node);						_ASSERTE (bodyInfo);						bodyInfo->m_hideGizmos = FALSE;					}					world->UpdateViewPorts();					break;				}				case IDC_HIDE_GIZMOS:				{					world->StopsSimulation ();					for (NewtonBody* body = NewtonWorldGetFirstBody(desc->m_newton); body; body = NewtonWorldGetNextBody(desc->m_newton, body)) {						INode* const node = (INode*)NewtonBodyGetUserData(body);						RigidBodyController* const bodyInfo = (RigidBodyController*)desc->GetRigidBodyControl(node);						_ASSERTE (bodyInfo);						bodyInfo->m_hideGizmos = TRUE;					}					world->UpdateViewPorts();					break;				}				case IDC_SELECT_ALL:				{//.........这里部分代码省略.........
开发者ID:Hurleyworks,项目名称:newton-dynamics,代码行数:101,


示例7: ClearPolyShapes

voidConeAngleManipulator::GenerateShapes(TimeValue t){    Point3 direction;    float distance, angle, aspect;    BOOL  useSquare;    mValid = FOREVER;    mpPblock->GetValue(kConeAngleAngle,     t, angle, mValid);    mpPblock->GetValue(kConeAngleDistance,  t, distance, mValid);    mpPblock->GetValue(kConeAngleDirection, t, direction, mValid);    mpPblock->GetValue(kConeAngleUseSquare, t, useSquare, mValid);    mpPblock->GetValue(kConeAngleAspect,    t, aspect, mValid);    ClearPolyShapes();    // Create the circle at the base of the cone    float ta = (float)tan(0.5 * angle);       float rad = distance * ta;    IManipulatorMgr* pMM = (IManipulatorMgr*) GetCOREInterface(MANIP_MGR_INTERFACE);    assert(pMM);    if (!useSquare) {        // Use a circle gizmo        GizmoShape* pGizmo = pMM->MakeCircle(Point3(0.0f, 0.0f, -distance), rad, 28);                AppendGizmo(pGizmo, 0, GetUnselectedColor());                delete pGizmo;        // if a stand-alone manip, draw the struts        if (!mhTarget) {            pGizmo = pMM->MakeGizmoShape();            pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3(rad, 0.0f, -distance));            pGizmo->StartNewLine();            pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3(-rad, 0.0f, -distance));            pGizmo->StartNewLine();            pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3(0.0f, rad, -distance));            pGizmo->StartNewLine();            pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3(0.0f, -rad, -distance));                        AppendGizmo(pGizmo, 0, GetUnselectedColor(), GetUnselectedColor());            delete pGizmo;        }    } else {        // Use a square gizmo        float radAspect = rad * (float) sqrt(aspect);        float radInvAspect = radAspect / aspect;        GizmoShape* pGizmo = pMM->MakeGizmoShape();        pGizmo->AppendPoint(Point3(-radAspect, -radInvAspect, -distance));        pGizmo->AppendPoint(Point3(-radAspect,  radInvAspect, -distance));        pGizmo->StartNewLine();        pGizmo->AppendPoint(Point3( radAspect, -radInvAspect, -distance));        pGizmo->AppendPoint(Point3( radAspect,  radInvAspect, -distance));                AppendGizmo(pGizmo, 0, GetUnselectedColor());        delete pGizmo;                pGizmo = pMM->MakeGizmoShape();        pGizmo->AppendPoint(Point3(-radAspect,  radInvAspect, -distance));        pGizmo->AppendPoint(Point3( radAspect,  radInvAspect, -distance));        pGizmo->StartNewLine();        pGizmo->AppendPoint(Point3(-radAspect, -radInvAspect, -distance));        pGizmo->AppendPoint(Point3( radAspect, -radInvAspect, -distance));        AppendGizmo(pGizmo, 0, GetUnselectedColor());        delete pGizmo;        // if a stand-alone manip, draw the struts        if (!mhTarget) {            pGizmo = pMM->MakeGizmoShape();            pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3(-radAspect, -radInvAspect, -distance));            pGizmo->StartNewLine();                        pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3(-radAspect,  radInvAspect, -distance));            pGizmo->StartNewLine();                        pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3( radAspect, -radInvAspect, -distance));            pGizmo->StartNewLine();                        pGizmo->AppendPoint(Point3(0,0,0));            pGizmo->AppendPoint(Point3( radAspect,  radInvAspect, -distance));                        AppendGizmo(pGizmo, 0, GetUnselectedColor(), GetUnselectedColor());            delete pGizmo;        }    }}
开发者ID:2asoft,项目名称:xray,代码行数:100,


示例8: GetCOREInterface

//From MtlBasevoid BerconTile::Reset() {	TimeValue t = GetCOREInterface()->GetTime();	if (texout) texout->Reset();	else ReplaceReference( OUTPUT_REF, GetNewDefaultTextureOutput());									   	for (int i=0; i<TILE_NSUBTEX; i++) 		DeleteReference(i+2);		pblock->SetValue( noise_color1, t, Color(1.f, 1.f, 1.f));	pblock->SetValue( noise_color2, t, Color(0.f, 0.f, 0.f));	pblock->SetValue( noise_color3, t, Color(.5f, .5f, .5f));	pblock->SetValue( noise_map1_on, t, TRUE);	pblock->SetValue( noise_map2_on, t,	TRUE);	pblock->SetValue( noise_map2_on, t,	TRUE);	pblock->SetValue( distortion_str, t, .1f);	pblock->SetValue( use_distortion, t, FALSE);	pblock->SetValue( lock_edge, t, TRUE);	pblock->SetValue( tile_style,    t, 3);	pblock->SetValue( tile_size,     t, 1.0f);	pblock->SetValue( tile_width,    t, 4.f);	pblock->SetValue( tile_height,   t, 2.f);	pblock->SetValue( edge_width,    t, .1f);	pblock->SetValue( edge_height,   t, .1f);	pblock->SetValue( tile_width2,   t, 0.f);	pblock->SetValue( tile_height2,  t, 0.f);	pblock->SetValue( edge_width2,   t, 0.f);	pblock->SetValue( edge_height2,  t, 0.f);	pblock->SetValue( soften, t, 2);	pblock->SetValue( soften_rad, t, .1f);	pblock->SetValue( pb_round, t,	TRUE);	pblock->SetValue( round_rad, t, .1f);	pblock->SetValue( pb_map_uv, t, FALSE);		pblock->SetValue( pb_uv_channel, t, 1);	pblock->SetValue( pb_auto, t, 2);		pblock->SetValue( pb_randX,   t, 0.f);	pblock->SetValue( pb_randY,   t, 0.f);	pblock->SetValue( pb_randSX,  t, 0.f);	pblock->SetValue( pb_randSY,  t, 0.f);	pblock->SetValue( pb_lock,  t, 1);		pblock->SetValue( pb_rotUV,  t, 0);		pblock->SetValue( pb_randRot,  t, 180.f);	pblock->SetValue( pb_center,  t, 0);	pblock->SetValue( pb_center_channel,  t, 2);	pblock->SetValue( pb_flipX,  t, 1);	pblock->SetValue( pb_flipY,  t, 1);	pblock->SetValue( pb_randZ,  t, 1);		pblock->SetValue(pb_pattern, t, L"0,1,1/.5,.5,1");	// Maps	for (int i=2; i<4; i++)		pbMap->SetValue(i, t, TRUE);		berconXYZ.reset(pbXYZ, ivalid, 1, 0, 0, 0);	ivalid.SetEmpty();}
开发者ID:Bercon,项目名称:BerconMaps,代码行数:67,


示例9: SetThing

		void SetThing(ReferenceTarget *m) {			tile = (BerconTile*)m;			tile->EnableStuff(GetCOREInterface()->GetTime());		}
开发者ID:Bercon,项目名称:BerconMaps,代码行数:4,


示例10: assert

int TapeHelpCreationManager::proc(    HWND hwnd,    int msg,    int point,    int flag,    IPoint2 m ){    int res = TRUE;    TSTR targName;    ViewExp& vpx = createInterface->GetViewExp(hwnd);    assert( vpx.IsAlive() );    DWORD hideflags;    switch ( msg ) {    case MOUSE_POINT:        switch ( point ) {        case 0: {            pt0 = m;            assert( tapeObject );            if ( createInterface->SetActiveViewport(hwnd) ) {                return FALSE;            }            if (createInterface->IsCPEdgeOnInView()) {                res = FALSE;                goto done;            }            // if helpers were hidden by category, re-display them            hideflags = GetCOREInterface()->GetHideByCategoryFlags();            if(hideflags & (HIDE_HELPERS))            {                hideflags = hideflags & ~(HIDE_HELPERS);                GetCOREInterface()->SetHideByCategoryFlags(hideflags);                hideflags = GetCOREInterface()->GetHideByCategoryFlags();            }            if ( attachedToNode ) {                // send this one on its way                tapeObject->EndEditParams( (IObjParam*)createInterface, 0, NULL);                macroRec->EmitScript();                // Get rid of the reference.                if (tapeNode)                    DeleteReference(0);                // new object                CreateNewObject();   // creates tapeObject            }            needToss = theHold.GetGlobalPutCount()!=lastPutCount;            theHold.Begin();   // begin hold for undo            mat.IdentityMatrix();            // link it up            INode *l_tapeNode = createInterface->CreateObjectNode( tapeObject);            attachedToNode = TRUE;            assert( l_tapeNode );            createCB = tapeObject->GetCreateMouseCallBack();            createInterface->SelectNode( l_tapeNode );            // Create target object and node            targObject = (Object*) createInterface->CreateInstance(GEOMOBJECT_CLASS_ID,Class_ID(TARGET_CLASS_ID,0));            targObject->SetAFlag(A_OBJ_LONG_CREATE);            assert(targObject);            targNode = createInterface->CreateObjectNode( targObject);            assert(targNode);            targName = l_tapeNode->GetName();            targName += GetString(IDS_DB_DOT_TARGET);            macroRec->Disable();            targNode->SetName(targName);            macroRec->Enable();            // hook up camera to target using lookat controller.            createInterface->BindToTarget(l_tapeNode,targNode);            // Reference the new node so we'll get notifications.            theHold.Suspend();            ReplaceReference( 0, l_tapeNode);            theHold.Resume();            // Position camera and target at first point then drag.            mat.IdentityMatrix();            //mat[3] = vpx.GetPointOnCP(m);#ifdef _3D_CREATE            mat.SetTrans( vpx.SnapPoint(m,m,NULL,SNAP_IN_3D) );#else            mat.SetTrans(vpx.SnapPoint(m,m,NULL,SNAP_IN_PLANE));#endif            createInterface->SetNodeTMRelConstPlane(tapeNode, mat);            createInterface->SetNodeTMRelConstPlane(targNode, mat);            tapeObject->Enable(1);            ignoreSelectionChange = TRUE;            createInterface->SelectNode( targNode,0);            ignoreSelectionChange = FALSE;            res = TRUE;        }        break;//.........这里部分代码省略.........
开发者ID:artemeliy,项目名称:inf4715,代码行数:101,


示例11: MakeTestPoint

//.........这里部分代码省略.........	Object *obj = CreateNURBSObject(mpIp, &nset, mat);	INode *node = mpIp->CreateObjectNode(obj);	node->SetName(GetString(IDS_TEST_OBJECT));	NURBSSet addNset;	// build a point surface	int addptSurf = AddTestPointSurface(addNset);	// add an iso curve to the previously created CV Surface	NURBSId id = nset.GetNURBSObject(cvSurf)->GetId();	int addIsoCrv = AddTestIsoCurve(addNset, id);	AddNURBSObjects(obj, mpIp, &addNset);	// now test some changing functionality	// Let's change the name of the CVSurface	NURBSObject* nObj = nset.GetNURBSObject(cvSurf);	nObj->SetName(_T("New CVSurf Name"));  // testing only, no need to localize	// now let's change the position of one of the points in the point curve	NURBSPointCurve* ptCrvObj = (NURBSPointCurve*)nset.GetNURBSObject(ptCrv);	ptCrvObj->GetPoint(0)->SetPosition(0, Point3(10, 160, 0)); // moved from 0,150,0	// now let's change the position and weight of one of the CVs	// in the CV Surface	NURBSCVSurface* cvSurfObj = (NURBSCVSurface*)nset.GetNURBSObject(cvSurf);	cvSurfObj->GetCV(0, 0)->SetPosition(0, Point3(-150.0, -100.0, 20.0)); // moved from 0,0,0	cvSurfObj->GetCV(0, 0)->SetWeight(0, 2.0); // from 1.0	// now let's do a transform of a curve.	NURBSIdTab xfmTab;	NURBSId nid = nset.GetNURBSObject(jc1)->GetId();	xfmTab.Append(1, &nid);	Matrix3 xfmMat;	xfmMat = TransMatrix(Point3(10, 10, -10));	SetXFormPacket xPack(xfmMat);	NURBSResult res = Transform(obj, xfmTab, xPack, xfmMat, 0);	// Now let's Join two curves	NURBSId jc1id = nset.GetNURBSObject(jc1)->GetId(),			jc2id = nset.GetNURBSObject(jc2)->GetId();	JoinCurves(obj, jc1id, jc2id, FALSE, TRUE, 20.0, 1.0f, 1.0f, 0);	// Now let's Join two surfaces	NURBSId js1id = nset.GetNURBSObject(js1)->GetId(),			js2id = nset.GetNURBSObject(js2)->GetId();	JoinSurfaces(obj, js1id, js2id, 1, 0, 20.0, 1.0f, 1.0f, 0);	// Break a Curve	NURBSId bcid = nset.GetNURBSObject(bc)->GetId();	BreakCurve(obj, bcid, .5, 0);	// Break a Surface	NURBSId bsid = nset.GetNURBSObject(bs)->GetId();	BreakSurface(obj, bsid, TRUE, .5, 0);	mpIp->RedrawViews(mpIp->GetTime());	nset.DeleteObjects();	addNset.DeleteObjects();	// now do a detach	NURBSSet detset;	Matrix3 detmat;	detmat.IdentityMatrix();	// build a cv curve	int detcvCrv = MakeTestCVCurve(detset, detmat);	// now a point curve	int detptCrv = MakeTestPointCurve(detset, detmat);	// Blend the two curves	int detblendCrv = MakeTestBlendCurve(detset, detcvCrv, detptCrv);	Object *detobj = CreateNURBSObject(mpIp, &detset, detmat);	INode *detnode = mpIp->CreateObjectNode(detobj);	detnode->SetName("Detach From");	BOOL copy = TRUE;	BOOL relational = TRUE;	NURBSIdList detlist;	NURBSId oid = detset.GetNURBSObject(detblendCrv)->GetId();	detlist.Append(1, &oid);	DetachObjects(GetCOREInterface()->GetTime(), detnode, detobj,					detlist, "Detach Test", copy, relational);	mpIp->RedrawViews(mpIp->GetTime());}
开发者ID:DimondTheCat,项目名称:xray,代码行数:101,


示例12: GetCOREInterface

DisplayState BendManip::MouseLeavesObject(TimeValue t, ViewExp* pVpt, IPoint2& m, ManipHitData* pHitData){	mouseWithin = FALSE;	GetCOREInterface()->NodeInvalidateRect(node);	return kFullRedrawNeeded;}
开发者ID:2asoft,项目名称:xray,代码行数:6,


示例13: GetCOREInterface

void DxStdMtl2::LoadTextureData(IHLSLCodeGenerator * codeGen){	Bitmap * bmap;	BitmapInfo stBI;	TimeValue t = GetCOREInterface()->GetTime();	int nWidth,nHeight;	int numberOfTextures = elementContainer.NumberofElementsByType(EffectElements::kEleTex);	for(int i=0; i<numberOfTextures;i++)	{		bool bBump;		TextureElement * texEle = static_cast<TextureElement*>(elementContainer.GetElementByType(i,EffectElements::kEleTex));		TSTR mapType = texEle->GetMapName();		Texmap *texmap = codeGen->GetShaderDefinedTexmap(map,mapType.data(),bBump);		if(texmap)		{			BMM_Color_64 *p;			nWidth = nHeight = DIMDEFAULT;			BitmapDimensions(nWidth,nHeight,texmap);			// load and create the D3D texture;/*			if(texmap->ClassID() == Class_ID(BMTEX_CLASS_ID, 0))			{				BitmapTex *pBT;				Bitmap *pTex;				pBT = (BitmapTex *)texmap;				pTex = pBT->GetBitmap(t);				if (pTex)				{					nWidth = getClosestPowerOf2(pTex->Width());					nHeight = getClosestPowerOf2(pTex->Height());				}			}*/							stBI.SetType(BMM_TRUE_32);			stBI.SetWidth(nWidth);			stBI.SetHeight(nHeight);        			bmap = TheManager->Create(&stBI);			if (bmap)			{//				LPDIRECT3DTEXTURE9 pRenderTex = texEle->GetD3DTexture();				texmap->RenderBitmap(t, bmap, MAPSCALE3D * 2.0f);				p = new BMM_Color_64[nWidth*nHeight];				for (int y = 0; y < nHeight; y++)					bmap->GetLinearPixels(0, y, nWidth, p + y * nWidth);							if(texEle->pTex)				{					D3DSURFACE_DESC stLD;					texEle->pTex->GetLevelDesc(0, &stLD);					if (stLD.Width != nWidth || stLD.Height != nHeight)					{						SAFE_RELEASE(texEle->pTex);					}				}				if(!texEle->pTex)					pd3dDevice->CreateTexture(nWidth,nHeight, 0,D3DUSAGE_AUTOGENMIPMAP,	D3DFMT_A8R8G8B8,D3DPOOL_MANAGED,&texEle->pTex, NULL);				if(texEle->pTex)				{					PIXELFMT *pT;					D3DLOCKED_RECT stLR;					texEle->pTex->LockRect(0, &stLR, 0, 0);					pT = (PIXELFMT *)stLR.pBits;					for (int i = 0; i < nWidth * nHeight; i++)					{						pT[i].r = p[i].r >> 8;						pT[i].g = p[i].g >> 8;						pT[i].b = p[i].b >> 8;						pT[i].a = p[i].a >> 8;					}					texEle->pTex->UnlockRect(0);									if(bBump && texmap->ClassID() != GNORMAL_CLASS_ID)					{//						LPDIRECT3DTEXTURE9 normalTex = texEle->GetD3DBumpTexture();												if(texEle->pBumpTex)						{							D3DSURFACE_DESC stLD;							texEle->pBumpTex->GetLevelDesc(0, &stLD);							if (stLD.Width != nWidth || stLD.Height != nHeight)							{								SAFE_RELEASE(texEle->pBumpTex);							}						}						if(!texEle->pBumpTex)							pd3dDevice->CreateTexture(nWidth,nHeight, 0,D3DUSAGE_AUTOGENMIPMAP,	D3DFMT_A8R8G8B8,D3DPOOL_MANAGED,&texEle->pBumpTex, NULL);						D3DXComputeNormalMap(texEle->pBumpTex,texEle->pTex,NULL, NULL, D3DX_CHANNEL_RED,30.0f);						if(texEle->GetParamHandle())//.........这里部分代码省略.........
开发者ID:whztt07,项目名称:OgreGameProject,代码行数:101,


示例14: GetCOREInterface

void SideBarUI::Setup(HINSTANCE hInstance, HWND rollupHWND, const MCHAR *iniFile){	//setup rollup	mRollupHwnd = rollupHWND;	GetCOREInterface()->RegisterDlgWnd ( mRollupHwnd );	IRollupWindow *irollup = GetIRollup(rollupHWND);	if(NULL == irollup)	{		return;	}	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP1),SideBar1RollupDialogProc, GetString(IDS_QUICKTRANSFORM),(LPARAM)mMod );	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP2),SideBar1RollupDialogProc, GetString(IDS_RESHAPEELEMENTS),(LPARAM)mMod );	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP3),SideBar1RollupDialogProc, GetString(IDS_STITCH),(LPARAM)mMod );	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP4),SideBar1RollupDialogProc, GetString(IDS_EXPLODE),(LPARAM)mMod );	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP5),SideBar1RollupDialogProc, GetString(IDS_PEEL),(LPARAM)mMod );	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP6),SideBar1RollupDialogProc, GetString(IDS_ARRANGEELEMENTS),(LPARAM)mMod );	irollup->AppendRollup(hInstance,MAKEINTRESOURCE(IDD_SIDEBAR_ROLLUP7),SideBar1RollupDialogProc, GetString(IDS_ELEMENTPROPERTIES),(LPARAM)mMod );	for (int i = 0; i < 7; i++)		irollup->Show(i);	UnwrapCustomUI* pUIManager = mMod->GetUIManager();	if(NULL == pUIManager)	{		return;	}	bool bResult = pUIManager->GetIniFileCache().InitCacheFromIniFile(TSTR(iniFile));	//quick transform	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,100,irollup->GetPanelDlg(0),GetDlgItem(irollup->GetPanelDlg(0),IDC_S1_1_TOOLBAR)) > 0)		LoadInActions(100);	else		SetDefaults(100,irollup->GetPanelDlg(0));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,101,irollup->GetPanelDlg(0),GetDlgItem(irollup->GetPanelDlg(0),IDC_S1_2_TOOLBAR)) > 0)		LoadInActions(101);	else		SetDefaults(101,irollup->GetPanelDlg(0));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,102,irollup->GetPanelDlg(0),GetDlgItem(irollup->GetPanelDlg(0),IDC_S1_3_TOOLBAR)) > 0)		LoadInActions(102);	else		SetDefaults(102,irollup->GetPanelDlg(0));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,103,irollup->GetPanelDlg(0),GetDlgItem(irollup->GetPanelDlg(0),IDC_S1_4_TOOLBAR)) > 0)		LoadInActions(103);	else		SetDefaults(103,irollup->GetPanelDlg(0));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,104,irollup->GetPanelDlg(0),GetDlgItem(irollup->GetPanelDlg(0),IDC_S1_5_TOOLBAR)) > 0)		LoadInActions(104);	else		SetDefaults(104,irollup->GetPanelDlg(0));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,110,irollup->GetPanelDlg(1),GetDlgItem(irollup->GetPanelDlg(1),IDC_S2_1_TOOLBAR)) > 0)		LoadInActions(110);	else		SetDefaults(110,irollup->GetPanelDlg(1));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,120,irollup->GetPanelDlg(2),GetDlgItem(irollup->GetPanelDlg(2),IDC_S3_1_TOOLBAR)) > 0)		LoadInActions(120);	else		SetDefaults(120,irollup->GetPanelDlg(2));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,130,irollup->GetPanelDlg(3),GetDlgItem(irollup->GetPanelDlg(3),IDC_S4_1_TOOLBAR)) > 0)		LoadInActions(130);	else		SetDefaults(130,irollup->GetPanelDlg(3));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,131,irollup->GetPanelDlg(3),GetDlgItem(irollup->GetPanelDlg(3),IDC_S4_2_TOOLBAR)) > 0)		LoadInActions(131);	else		SetDefaults(131,irollup->GetPanelDlg(3));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,132,irollup->GetPanelDlg(3),GetDlgItem(irollup->GetPanelDlg(3),IDC_S4_3_TOOLBAR)) > 0)		LoadInActions(132);	else		SetDefaults(132,irollup->GetPanelDlg(3));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,140,irollup->GetPanelDlg(4),GetDlgItem(irollup->GetPanelDlg(4),IDC_S5_1_TOOLBAR)) > 0)		LoadInActions(140);	else		SetDefaults(140,irollup->GetPanelDlg(4));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,141,irollup->GetPanelDlg(4),GetDlgItem(irollup->GetPanelDlg(4),IDC_S5_2_TOOLBAR)) > 0)		LoadInActions(141);	else		SetDefaults(141,irollup->GetPanelDlg(4));	if (bResult && pUIManager->LoadSingleFromIniFile(iniFile,142,irollup->GetPanelDlg(4),GetDlgItem(irollup->GetPanelDlg(4),IDC_S5_0_TOOLBAR)) > 0)		LoadInActions(142);	else		SetDefaults(142,irollup->GetPanelDlg(4));//.........这里部分代码省略.........
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:101,


示例15: LocalRequirements

      ULONG LocalRequirements(int subMtlNum) {  #if 1         ULONG flags  =  fogBG  ?  ( fogObjDepth ? 0 : MTLREQ_NOATMOS )  :  MTLREQ_NOATMOS;         // > 10/9/02 - 2:38pm --MQM--          // if the tone operator is active, we need to match it's         // "process background" flag for our material requirements.           // otherwise we will have a matte-plane that gets tone-op'd          // hovering over a background plane that doesn't.         ToneOperatorInterface* toneOpInterface = static_cast<ToneOperatorInterface*>( GetCOREInterface(TONE_OPERATOR_INTERFACE) );         if ( toneOpInterface )         {            ToneOperator *pToneOp = toneOpInterface->GetToneOperator();            if ( pToneOp )            {               if ( !pToneOp->GetProcessBackground() )                  flags |= MTLREQ_NOEXPOSURE;   // <-- new MTLREQ flag to disable toneop            }         }                  return flags;#else         return fogBG  ?  ( fogObjDepth ? 0 : MTLREQ_NOATMOS )  :  MTLREQ_NOATMOS;#endif         }
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:25,


示例16: GetCOREInterface

BOOL plDistribComponent_old::Distribute(plDistribInstTab& replicants, plExportProgressBar& bar, plDistTree* distTree){    return false;    BOOL retVal = true;    GetCOREInterface()->DisableSceneRedraw();    Clear();    plDistributor distrib;    distrib.SetTheInterface(GetCOREInterface());    distrib.SetSpacing(fCompPB->GetFloat(kSpacing));    distrib.SetSpacingRange(fCompPB->GetFloat(kRndPosRadius) * 0.01f * distrib.GetSpacing() * 0.5f);    Point3 align(fCompPB->GetFloat(kAlignVecX), fCompPB->GetFloat(kAlignVecY), fCompPB->GetFloat(kAlignVecZ));    align.FNormalize();    distrib.SetAlignmentVec(align);    distrib.SetAlignmentWeight(fCompPB->GetFloat(kAlignWgt));    distrib.SetPolarRange(fCompPB->GetFloat(kPolarRange));    distrib.SetAzimuthRange(fCompPB->GetFloat(kAzimuthRange));    distrib.SetOverallProb(fCompPB->GetFloat(kOverallProb));    distrib.SetPolarBunch(fCompPB->GetFloat(kPolarBunch));    Point3 scaleLo(fCompPB->GetFloat(kScaleLoX), fCompPB->GetFloat(kScaleLoY), fCompPB->GetFloat(kScaleLoZ));    Point3 scaleHi(fCompPB->GetFloat(kScaleHiX), fCompPB->GetFloat(kScaleHiY), fCompPB->GetFloat(kScaleHiZ));    distrib.SetScaleRange(scaleLo, scaleHi);    ULONG scaleLock = plDistributor::kLockNone;    if( fCompPB->GetInt(kLockScaleXYZ) )        scaleLock = plDistributor::kLockX | plDistributor::kLockY | plDistributor::kLockZ;    else if( fCompPB->GetInt(kLockScaleXY) )        scaleLock = plDistributor::kLockX | plDistributor::kLockY;    distrib.SetScaleLock(scaleLock);    distrib.SetProbabilityChan(kProbColorChanStrings[fCompPB->GetInt(kProbColorChan)].fValue);    ISetProbTexmap(distrib);    // Setup the new params here. FISH...    Point3 probVec(fCompPB->GetFloat(kAngProbX), fCompPB->GetFloat(kAngProbY), fCompPB->GetFloat(kAngProbZ));    distrib.SetAngleProbVec(probVec);    distrib.SetAngleProbHi(fCompPB->GetFloat(kAngProbHi));    distrib.SetAngleProbLo(fCompPB->GetFloat(kAngProbLo));    distrib.SetProbabilityRemapFromLo(fCompPB->GetFloat(kRemapFromLo));    distrib.SetProbabilityRemapFromHi(fCompPB->GetFloat(kRemapFromHi));    distrib.SetProbabilityRemapToLo(fCompPB->GetFloat(kRemapToLo));    distrib.SetProbabilityRemapToHi(fCompPB->GetFloat(kRemapToHi));    if( !fCompPB->GetInt(kSeedLocked) )        fCompPB->SetValue(kSeed, TimeValue(0), fCompPB->GetInt(kNextSeed));    distrib.SetRandSeed(fCompPB->GetInt(kSeed));    distrib.SetFade(GetFade());    if( fCompPB->GetInt(kWindBoneActive) )        distrib.SetBone(fCompPB->GetINode(kWindBone));    distrib.SetRigid(!IsFlexible());    // FISH HACK, get this passed in from Cluster    distrib.SetDistTree(distTree);    distrib.SetIsolation(GetIsolation());    int numReps = fCompPB->Count(kTemplates);    int i;    for( i = 0; i < numReps; i++ )    {        INode* temp = fCompPB->GetINode(kTemplates, TimeValue(0), i);        if( temp )            distrib.AddReplicateNode(temp);    }    int numTarg = NumTargets();    for( i = 0; i < numTarg; i++ )    {        if( GetTarget(i) )        {            if( !distrib.Distribute(GetTarget(i), replicants, fDistCache, bar) )            {                retVal = false;                break;            }        }    }    fCompPB->SetValue(kNextSeed, TimeValue(0), int(distrib.GetRandSeed()));    BOOL redrawDissed = GetCOREInterface()->IsSceneRedrawDisabled();    GetCOREInterface()->EnableSceneRedraw();//.........这里部分代码省略.........
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:101,


示例17: GetCOREInterface

void PlugMgrUtility::LoadClass(ClassDesc* cd)			// ensure deferred plugin class is loaded - JBW 7.4.00{	ClassDirectory& cdir = GetCOREInterface()->GetDllDir().ClassDir();	cdir.FindClassEntry(cd->SuperClassID(), cd->ClassID())->FullCD();}
开发者ID:2asoft,项目名称:xray,代码行数:5,


示例18: AlembicImport_SetupVisControl

///////////////////////////////////////////////////////////////////////////////////////////////////// AlembicImport_vis///////////////////////////////////////////////////////////////////////////////////////////////////void AlembicImport_SetupVisControl(std::string const &file,                                   std::string const &identifier,                                   AbcG::IObject &obj, INode *pNode,                                   alembic_importoptions &options){  if (!pNode) {    return;  }  AbcG::IVisibilityProperty visibilityProperty = getAbcVisibilityProperty(obj);  bool isConstant = true;  if (visibilityProperty.valid()) {    isConstant = visibilityProperty.isConstant();  }  if (isConstant) {    Animatable *pAnimatable = pNode->SubAnim(0);    if (pAnimatable &&        pAnimatable->ClassID() == ALEMBIC_VISIBILITY_CONTROLLER_CLASSID) {      pNode->DeleteSubAnim(0);    }    alembic_fillvis_options visFillOptions;    visFillOptions.pIObj = &obj;    visFillOptions.dTicks = 0;    visFillOptions.bOldVisibility = true;    AlembicImport_FillInVis(visFillOptions);    BOOL bVis = visFillOptions.bVisibility ? TRUE : FALSE;    float fBool = bVis ? 1.0f : 0.0f;    pNode->SetVisibility(0, fBool);  }  else {    // Create the xform modifier    AlembicVisibilityController *pControl =        static_cast<AlembicVisibilityController *>(            GetCOREInterface()->CreateInstance(                CTRL_FLOAT_CLASS_ID, ALEMBIC_VISIBILITY_CONTROLLER_CLASSID));    // Set the alembic id    TimeValue t = GET_MAX_INTERFACE()->GetTime();    TimeValue zero(0);    // Set the alembic id    pControl->GetParamBlockByID(0)->SetValue(        GetParamIdByName(pControl, 0, "path"), zero,        EC_UTF8_to_TCHAR(file.c_str()));    pControl->GetParamBlockByID(0)->SetValue(        GetParamIdByName(pControl, 0, "identifier"), zero,        EC_UTF8_to_TCHAR(identifier.c_str()));    pControl->GetParamBlockByID(0)->SetValue(        GetParamIdByName(pControl, 0, "time"), zero, 0.0f);    pControl->GetParamBlockByID(0)->SetValue(        GetParamIdByName(pControl, 0, "muted"), zero, FALSE);    // Add the modifier to the node    pNode->SetVisController(pControl);    if (!isConstant) {      std::stringstream controllerName;      controllerName << GET_MAXSCRIPT_NODE(pNode);      controllerName << "mynode2113.visibility.controller.time";      AlembicImport_ConnectTimeControl(controllerName.str().c_str(), options);    }  }}
开发者ID:BlackGinger,项目名称:ExocortexCrate,代码行数:71,


示例19: GetCOREInterface

void RigidBodyWorld::UpdateViewPorts (){	//GetCOREInterface()->RedrawViews(GetCOREInterface()->GetTime());	GetCOREInterface()->ForceCompleteRedraw(); }
开发者ID:Hurleyworks,项目名称:newton-dynamics,代码行数:5,


示例20: ExportScene

HRESULT ExportScene(const TCHAR* name, bool showPrompts, bool exportSelected){	HRESULT hr = S_OK;	Interface* ip = GetCOREInterface();	TCHAR* msg = exportSelected?						_T("Exporting selected via Microsoft Extensions for Max ...") :						_T("Exporting via Microsoft Extensions for Max ...");	ip->ProgressStart(msg, TRUE, ProgressCb, NULL);		TCHAR OutPath[512];		if (SUCCEEDED(hr = MassageOutputPath(name, OutPath, sizeof(OutPath)/sizeof(OutPath[0]))))	{		//TODO: if (!showPrompts || SUCCEEDED(hr = DoExportOptionsDlg()))		{			CPipelineLock lock;			ThePipeline.SceneWriteLock(true, lock);			try			{                ThePipeline.ResetData();				ThePipeline.SyncData(false, exportSelected);                DXCCSaveSceneArgs options =                {	                TRUE, //NoAddRefs;		                FALSE, //NoAnimation;		                FALSE, //NoFrameNames;			                FALSE, //NoMeshNames;			                FALSE, //NoMeshes;			                FALSE, //NoMeshAdjacencies;		                FALSE, //NoMeshSkins;		                FALSE, //NoMeshMaterials;		                FALSE, //ReplaceEffectPaths;	                "", //ReplacementEffectPath[MAX_PATH];	                FALSE, //ReplaceTexturePaths;	                "", //ReplacementTexturePath[MAX_PATH];	                FALSE, //RelativePaths;	                "", //RelativeToPath[MAX_PATH];                };                DumpFrameCounts(ThePipeline.AccessRoot());                hr = DXCCSaveScene(OutPath, D3DXF_FILEFORMAT_TEXT, ThePipeline.AccessManager(), ThePipeline.AccessRoot(), NULL, &options);                DumpFrameCounts(ThePipeline.AccessRoot());                if (FAILED(hr))				{					// print message				}			}			catch (...)			{				ThePipeline.SceneWriteUnlock(lock);				throw;			}			ThePipeline.SceneWriteUnlock(lock);		}	}	ip->ProgressEnd();		return hr;}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:70,


示例21: QueryPerformanceFrequency

IGeometryChecker::ReturnVal OverlappedUVWFacesChecker::GeometryCheckWithUVMesh(UVWChannel &uvmesh,TimeValue t,INode *nodeToCheck, BitArray &arrayOfFaces){	LARGE_INTEGER	ups,startTime;	QueryPerformanceFrequency(&ups);	QueryPerformanceCounter(&startTime); //used to see if we need to pop up a dialog 	bool checkTime = GetIGeometryCheckerManager()->GetAutoUpdate();//only check time for the dialog if auto update is active!	//get our bounding box	Box3 bounds;	bounds.Init();	int numVerts = uvmesh.GetNumTVVerts();	int i;	for (i = 0; i < numVerts; ++i)	{		Point3 tv = uvmesh.GetTVVert(i);		if(_isnan(tv.x) || !_finite(tv.x)||_isnan(tv.y) || !_finite(tv.y)||_isnan(tv.z) || !_finite(tv.z))			return IGeometryChecker::eFail; //if we have a bad tvert bail out...		bounds += uvmesh.GetTVVert(i);	}	//put a small fudge to keep faces off the edge	bounds.EnlargeBy(0.05f);	//build our transform	float xScale = bounds.pmax.x - bounds.pmin.x;	float yScale = bounds.pmax.y - bounds.pmin.y;	Point3 offset = bounds.pmin;	//create our buffer	OverlapMap overlapMap;	overlapMap.Init();		Interface *ip = GetCOREInterface();	int numProcsToUse = omp_get_num_procs()-1;	if(numProcsToUse<0)		numProcsToUse = 1;	TCHAR buf[256];	TCHAR tmpBuf[64];	_tcscpy(tmpBuf,GetString(IDS_CHECK_TIME_USED));	_tcscpy(buf,GetString(IDS_RUNNING_GEOMETRY_CHECKER));	ip->PushPrompt(buf);	int total = 0;	bool compute = true;	EscapeChecker::theEscapeChecker.Setup();	for (int i = 0; i < uvmesh.GetNumOfFaces(); ++i)	{		if(compute==true)		{			//loop through the faces			int deg = uvmesh.GetFaceDegree(i);			int index[4];			index[0] = uvmesh.GetFaceTVVert(i,0);			Point3 pa = uvmesh.GetTVVert(index[0]);			pa.x -= offset.x;			pa.x /= xScale;			pa.y -= offset.y;			pa.y /= yScale;			for (int j = 0; j < deg -2; j++)			{				index[1] = uvmesh.GetFaceTVVert(i,j+1);				index[2] = uvmesh.GetFaceTVVert(i,j+2);				Point3 pb = uvmesh.GetTVVert(index[1]);				Point3 pc = uvmesh.GetTVVert(index[2]);				pb.x -= offset.x;				pb.x /= xScale;				pb.y -= offset.y;				pb.y /= yScale;				pc.x -= offset.x;				pc.x /= xScale;				pc.y -= offset.y;				pc.y /= yScale;				//add face to buffer				//select anything that overlaps				overlapMap.Map(uvmesh,i,pa,pb,pc,arrayOfFaces);			}		}		total += 1;				if(compute==true)		{			if(EscapeChecker::theEscapeChecker.Check())			{				compute = false;				_tcscpy(buf,GetString(IDS_EXITING_GEOMETRY_CHECKER));				ip->ReplacePrompt(buf);				break; //can now break, no omp			}					if((total%100)==0)			{				{					float percent = (float)total/(float)uvmesh.GetNumOfFaces()*100.0f;					_stprintf(buf,tmpBuf,percent);					ip->ReplacePrompt(buf);				}     			}//.........这里部分代码省略.........
开发者ID:artemeliy,项目名称:inf4715,代码行数:101,


示例22: DbgAssert

void TweakMouseProc::ComputeNewUVW(ViewExp& vpt, IPoint2 m){	if ( ! vpt.IsAlive() )	{		// why are we here		DbgAssert(!_T("Invalid viewport!"));		return;	}	Ray r;	vpt.MapScreenToWorldRay ((float) m.x, (float) m.y, r);	TimeValue t = GetCOREInterface()->GetTime();	Matrix3 tm = mod->GetMeshTopoDataNode(mHitLDIndex)->GetObjectTM(t);	Matrix3 itm = Inverse(tm);	r.p = r.p * itm;	r.dir = VectorTransform(r.dir,itm);	//intersect our ray with that face and get our new bary coords	Point3 n = mHitLD->GetGeomFaceNormal(mHitFace);	Point3 p1, p2, p3;	p1 = mHitP[0];	p2 = mHitP[1];	p3 = mHitP[2];	Point3  p, bry;	float d, rn, a; 	// See if the ray intersects the plane (backfaced)	rn = DotProd(r.dir,n);	if (rn > -0.0001) return;	// Use a point on the plane to find d	Point3 v1 = p1;	d = DotProd(v1,n);	// Find the point on the ray that intersects the plane	a = (d - DotProd(r.p,n)) / rn;	// Must be positive...	if (a < 0.0f) return ;	// The point on the ray and in the plane.	p = r.p + a*r.dir;	// Compute barycentric coords.	bry = BaryCoords(p1,p2,p3,p);  // DbgAssert(bry.x + bry.y+ bry.z = 1.0) 	Point3 uvw = mHitUVW[0] * bry.x + mHitUVW[1] * bry.y + mHitUVW[2] * bry.z;	Point3 v = uvw - mSourceUVW;	v *= -1.0f;	mFinalUVW = mSourceUVW + v;	mHitLD->SetTVVert(GetCOREInterface()->GetTime(),mHitTVVert,mFinalUVW,mod);	mod->NotifyDependents(FOREVER, PART_TEXMAP, REFMSG_CHANGE);	mod->InvalidateView();	if (mod->ip) 		mod->ip->RedrawViews(mod->ip->GetTime());}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:65,


示例23: GetCOREInterface

void XModifier::NotifyPreCollapse(INode *node, IDerivedObject *derObj, int index){	bModDisabled = true;	TimeValue t = GetCOREInterface()->GetTime();	NotifyDependents(Interval(t,t),PART_ALL,REFMSG_CHANGE);}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:6,


示例24: ICreateControls

BOOL plAutoUIBase::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam){    if (msg == WM_INITDIALOG)    {        fhDlg = hDlg;        ICreateControls();        PostMessage(fhDlg, WM_SIZE_PANEL, 0, 0);    }    uint32_t count = fParams.size();    for (uint32_t i = 0; i < count; i++)    {        if (fParams[i]->IsMyMessage(msg, wParam, lParam, fPBlock))        {            if (fParams[i]->GetParamType() == plAutoUIParam::kTypeDropDownList && HIWORD(wParam) == CBN_SELENDOK)            {                plDropDownListParam* ddl = (plDropDownListParam*)fParams[i];                ParamID id = ddl->GetID();                std::string str = ddl->GetString(fPBlock);                int yOffset = 10;                // We now have the id and current state of the drop-down list that changed                // so now we need to update the visible state of the controls                for (uint32_t idx = 0; idx < fParams.size(); idx++)                {                    plAutoUIParam* par = fParams[idx];                    if (par->CheckVisibility(id, str))                    {                        par->Show(yOffset);                        yOffset += par->GetHeight() + 5;                    }                    else                    {                        par->Hide();                    }                }                IRollupWindow *rollup = GetCOREInterface()->GetCommandPanelRollup();                int index = rollup->GetPanelIndex(fhDlg);                                if (index >= 0)                    rollup->SetPageDlgHeight(index, yOffset);                                InvalidateRect(fhDlg, NULL, TRUE);            }            return TRUE;        }    }    // During init but after everything else we want to update the visibility    if (msg == WM_SIZE_PANEL)    {        // Ok, this sucks but I don't know of a better way at this point        // We need to intialize the visible state of the controls, and the only way to do this        // is by looping through and finding all of the drop-down lists        for (uint32_t i = 0; i < fParams.size(); i++)        {            if (fParams[i]->GetParamType() == plAutoUIParam::kTypeDropDownList)            {                plDropDownListParam* ddl = (plDropDownListParam*)fParams[i];                ParamID id = ddl->GetID();                std::string str = "";                const char* cstr = ddl->GetString(fPBlock);                int yOffset = 10;                if (cstr)                    str = cstr;                // We now have the id and current state of the drop-down list that changed                // so now we need to update the visible state of the controls                for (uint32_t idx = 0; idx < fParams.size(); idx++)                {                    if (fParams[idx]->CheckVisibility(id, str))                    {                        fParams[idx]->Show(yOffset);                        yOffset += fParams[idx]->GetHeight() + 5;                    }                    else                    {                        fParams[idx]->Hide();                    }                }                IRollupWindow *rollup = GetCOREInterface()->GetCommandPanelRollup();                int index = rollup->GetPanelIndex(fhDlg);                                if (index >= 0)                    rollup->SetPageDlgHeight(index, yOffset);                InvalidateRect(fhDlg, NULL, TRUE);            }        }        return TRUE;    }        return FALSE;}
开发者ID:Asteral,项目名称:Plasma,代码行数:100,


示例25: GetCOREInterface

void	BlobMesh::fnAddMode(){	GetCOREInterface()->DoHitByNameDialog(new DumpHitDialog(this));}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:4,


示例26: GetCOREInterface

bool SplineData::AddNode(INode *node){	//see if the node is a shape object	if (node != NULL) 	{		TimeValue t  = GetCOREInterface()->GetTime();		Interval valid;		Matrix3 tm = node->GetObjectTM(t,&valid);		ObjectState nos = node->EvalWorldState(t);		if (nos.obj->IsShapeObject()) 		{			ShapeObject *pathOb = (ShapeObject*)nos.obj;			int numberOfCurves = pathOb->NumberOfCurves();			//get number of splines			if (numberOfCurves != 0) 			{				pathOb->MakePolyShape(t, mShapeCache,32,FALSE);				mShapeCache.Transform(tm);				mSplineElementData.SetCount(numberOfCurves);				for (int i = 0; i < numberOfCurves; i++)					mSplineElementData[i] = NULL;				for (int i = 0; i < numberOfCurves; i++)				{					Box3 bounds;					bounds.Init();					//sample the shape object					int numberOfCurves = pathOb->NumberOfPieces(t, i);					if (numberOfCurves != 0)					{						mSplineElementData[i] = new SplineElementData();												mSplineElementData[i]->ResetBoundingBox();						mSplineElementData[i]->SetLineCache(&mShapeCache.lines[i]);						mSplineElementData[i]->ComputePlanarUp(mPlanarMapUp);						mSplineElementData[i]->SetNumCurves(numberOfCurves);						mSplineElementData[i]->SetNumberOfCrossSections(numberOfCurves+1);						if (pathOb->CurveClosed(t,i))							mSplineElementData[i]->SetClosed(true);						else mSplineElementData[i]->SetClosed(false);						float curveLength = pathOb->LengthOfCurve(t,i);						float runningLength = 0.0f;						Quat q;						q.Identity();						mSplineElementData[i]->SetCrossSection(0,Point3(0.0f,0.0f,0.0f),Point2(20.0f,20.0f),q);						for (int j = 0; j < numberOfCurves; j++)						{							float u = runningLength/curveLength;							mSplineElementData[i]->SetCrossSection(j,Point3(0.0f,0.0f,u),Point2(20.0f,20.0f),q);							Point3 lastPoint = pathOb->InterpPiece3D(t,i,j,0.0f,PARAM_NORMALIZED);							bounds += lastPoint;							float runningU = 0.0f;							float inc = 1.0f/(float)(mSampleRate-1);							for (int k = 1; k < mSampleRate; k++)							{																runningU += inc;								Point3 p = pathOb->InterpPiece3D(t,i,j,runningU,PARAM_NORMALIZED);								runningLength += Length(p-lastPoint);								lastPoint = p;								bounds += lastPoint;							}						}						mSplineElementData[i]->SetCrossSection(numberOfCurves,Point3(0.0f,0.0f,1.0f),Point2(20.0f,20.0f),q);						mSplineElementData[i]->Select(FALSE);					}				}				if (mActiveSpline >= numberOfCurves)					mActiveSpline = 0;				mSplineElementData[mActiveSpline]->Select(TRUE);				//build our bounding box				RecomputeCrossSections();				return true;			}		}	}	return false;}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:90,


示例27: GetCOREInterface

VertexHideRestore::VertexHideRestore (EditMeshData* md, EditMeshMod* mod) {	hide = md->mdelta.vhide;	meshData = md;	this->mod = mod;	t = GetCOREInterface()->GetTime(); // LAM - defect 289808}
开发者ID:2asoft,项目名称:xray,代码行数:6,



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


C++ GetCacheViewAuthenticIndexQueue函数代码示例
C++ GetCOD函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。