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


C++ ParamBlockDesc2类代码示例

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


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

示例1: ConvertFRGBAAttrib

//----------------------------------------------------------------------------
bool SceneBuilder::ConvertFRGBAAttrib(IParamBlock2* paramBlock, int index,
									  std::string &name, PX2::Float4 &value)
{
	ParamBlockDesc2 *paramDesc = paramBlock->GetDesc();

	if (!paramDesc)
		return false;

	ParamDef &paramDef = paramDesc->GetParamDef(paramDesc->IndextoID(index));

	Point4 vectorValue;
	Interval validInterval;
	BOOL retrieved = false;	

	retrieved =  paramBlock->GetValue((ParamID)index, 0 , vectorValue, validInterval);
	if(retrieved)
	{
		TCHAR* valueName = paramDef.int_name;
		if (!IsValidName(valueName)) 
			valueName = paramBlock->GetLocalName((ParamID)index );
		assertion(IsValidName(valueName), "valueName must be valuable.");
		name = std::string(valueName);

		value = PX2::Float4(vectorValue.x, vectorValue.y, vectorValue.z, 
			vectorValue.w);

		if(HasAnimation(paramBlock, index))
		{
		}
	}

	return true;
}
开发者ID:manyxu,项目名称:Phoenix3D_2.0,代码行数:34,代码来源:PX2SceneBuilderMtl.cpp

示例2: GetCOREInterface

IParamMap2 *plResponderProc::ICreateMap(IParamBlock2 *pb)
{
    ParamBlockDesc2 *pd = pb->GetDesc();

    // Don't show anything if there isn't a UI
    if (pd->Count() < 1)
    {
        pb->ReleaseDesc();
        return nil;
    }

    // Create the rollout
    IParamMap2 *map = CreateCPParamMap2(0,
                                        pb,
                                        GetCOREInterface(),
                                        hInstance,
                                        MAKEINTRESOURCE(pd->dlg_template),
                                        GetString(pd->title),
                                        pd->flags,
                                        pd->dlgProc,
                                        NULL,
                                        ROLLUP_CAT_STANDARD);

    // Save the rollout in the paramblock
    pb->SetMap(map);
    pb->ReleaseDesc();

    return map;
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:29,代码来源:plResponderComponent.cpp

示例3: ConvertIntListBoxAttrib

//----------------------------------------------------------------------------
bool SceneBuilder::ConvertIntListBoxAttrib (IParamBlock2* paramBlock,
											int index, std::string &name, 
											int &value)
{
	ParamBlockDesc2 *paramDesc = paramBlock->GetDesc();

	if (!paramDesc)
		return false;

	ParamDef& paramDef = paramDesc->GetParamDef(paramDesc->IndextoID(index));

	int intValue;
	Interval validInverval;
	BOOL retrieved = false;

	retrieved = paramBlock->GetValue((ParamID)index, 0, intValue,
		validInverval);

	if (retrieved)
	{
		char* valueName = paramDef.int_name;
		if (!IsValidName(valueName))
		{
			valueName = paramBlock->GetLocalName((ParamID)index);
			assertion(IsValidName(valueName), "valueName must be valuable.");
		}
		name = std::string(valueName);

		//3ds Max中数组从1开始,这里的index要减1
		value = (intValue==-1) ? -1 : (intValue-1);
	}

	return true;
}
开发者ID:manyxu,项目名称:Phoenix3D_2.0,代码行数:35,代码来源:PX2SceneBuilderMtl.cpp

示例4: ConvertFloatAttrib

//----------------------------------------------------------------------------
bool SceneBuilder::ConvertFloatAttrib (IParamBlock2* paramBlock, int index, 
									   std::string &name, float &value)
{
	ParamBlockDesc2 *paramDesc = paramBlock->GetDesc();

	if(!paramDesc)
		return false;

	ParamDef &paramDef = paramDesc->GetParamDef(paramDesc->IndextoID(index));

	float floatValue;
	Interval validInverval;
	BOOL retrieved = paramBlock->GetValue((ParamID)index, 0, floatValue, validInverval);
	if(!retrieved)
	{
		return false;
	}

	char *valueName = paramDef.int_name;
	if (!IsValidName(valueName))
	{
		valueName = paramBlock->GetLocalName((ParamID)index);
		assertion(IsValidName(valueName), "valueName must be valuable.");
	}
	name = std::string(valueName);

	//if (!HasAnimation(paramBlock, index))
	{
		value = floatValue;

		return true;
	}

	return true;
}
开发者ID:manyxu,项目名称:Phoenix3D_2.0,代码行数:36,代码来源:PX2SceneBuilderMtl.cpp

示例5: ValidateReturnType

bool mrShaderFilter::ValidateReturnType(ParamBlockDesc2& pbDesc) {

	// Go through all the parameters of the block
	int count = pbDesc.Count();
	for(int i = 0; i < count; ++i) {
		const ParamDef& paramDef = pbDesc.GetParamDef(pbDesc.IndextoID(i));
		
		if(ValidType(paramDef.type))
			return true;
	}

	return false;
}
开发者ID:568210356,项目名称:fancy2d,代码行数:13,代码来源:mrShaderFilter.cpp

示例6: ConvertBitMapAttrib

//----------------------------------------------------------------------------
bool SceneBuilder::ConvertBitMapAttrib(IParamBlock2* paramBlock, int index,
									   std::string &name, 
									   PX2::Texture2D *&tex2d)
{
	ParamBlockDesc2 *paramDesc = paramBlock->GetDesc();

	if (!paramDesc)
		return false;

	ParamDef &paramDef = paramDesc->GetParamDef(paramDesc->IndextoID(index));
	PX2_UNUSED(paramDef);

	PBBitmap *pb;
	Interval validInterval;
	char *valueName = 0;
	PX2_UNUSED(valueName);
	BOOL retrieved = false;	
	retrieved = paramBlock->GetValue((ParamID)index, 0, pb, validInterval);

	char strBitMapName[256];
	memset(strBitMapName, 0, 256*sizeof(char));
	if (pb)
	{
		if (BMMGetFullFilename(&pb->bi) == TRUE)
		{
			strcpy(strBitMapName, pb->bi.Name());

			std::string resourcePath;
			std::string fullName = std::string(strBitMapName);
			std::string::size_type sizeT = fullName.find_first_not_of(mSettings->SrcRootDir);
			resourcePath = std::string(strBitMapName).substr(sizeT);

			tex2d = PX2::DynamicCast<PX2::Texture2D>(
				PX2::ResourceManager::GetSingleton().BlockLoad(strBitMapName));
			tex2d->SetResourcePath(resourcePath);
		}
	}

	if (retrieved)
	{
		valueName = paramDef.int_name;
		if (!IsValidName(valueName))
			valueName = paramBlock->GetLocalName((ParamID)index);
		assertion(IsValidName(valueName), "valueName must be valuable.");
		name = valueName;
	}

	return true;
}
开发者ID:manyxu,项目名称:Phoenix3D_2.0,代码行数:50,代码来源:PX2SceneBuilderMtl.cpp

示例7: BeginEditParams

void MorphByBone::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	this->ip = ip;
	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);	


	moveMode    = new MoveModBoxCMode(this,ip);

	rotMode = new RotateModBoxCMode(this,ip);
	uscaleMode     = new UScaleModBoxCMode(this,ip);
	nuscaleMode    = new NUScaleModBoxCMode(this,ip);
	squashMode     = new SquashModBoxCMode(this,ip);
	selectMode     = new SelectModBoxCMode(this,ip);



	MorphByBoneDesc.BeginEditParams(ip, this, flags, prev);
	morphbybone_param_blk.SetUserDlgProc(morphbybone_mapparams, new MorphByBoneParamsMapDlgProc(this));
	morphbybone_param_blk.SetUserDlgProc(morphbybone_mapparamsprop, new MorphByBoneParamsMapDlgProcProp(this));
	morphbybone_param_blk.SetUserDlgProc(morphbybone_mapparamscopy, new MorphByBoneParamsMapDlgProcCopy(this));

	morphbybone_param_blk.SetUserDlgProc(morphbybone_mapparamsselection, new MorphByBoneParamsMapDlgProcSoftSelection(this));


}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:28,代码来源:MorphByBonePublishedFunctions.cpp

示例8: DlgProc

INT_PTR EllipseTypeInDlgProc::DlgProc(TimeValue t,IParamMap2 *map,HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
	switch (msg) 
	{
		case WM_COMMAND:
			switch (LOWORD(wParam))
			{
				case IDC_TI_CREATE: 
				{
					Matrix3 tm(1);
					Point3 pos = theEllispeTypeInBlock.GetPoint3(PB_TI_POS);
					float length = theEllispeTypeInBlock.GetFloat(PB_TI_LENGTH);
					float width = theEllispeTypeInBlock.GetFloat(PB_TI_WIDTH);
					float thickness = theEllispeTypeInBlock.GetFloat(PB_TI_THICKNESS);
					tm.SetTrans(pos);

					ro->suspendSnap = FALSE;

					EllipseObject* new_object = dynamic_cast<EllipseObject*>(ro->ip->NonMouseCreate(tm));
					if(new_object)
					{
						new_object->GetParamBlockByID(ellipse_params)->SetValue(PB_LENGTH, t, length);
						new_object->GetParamBlockByID(ellipse_params)->SetValue(PB_WIDTH, t, width);
						new_object->GetParamBlockByID(ellipse_params)->SetValue(PB_THICKNESS, t, thickness);
					}

					return TRUE;	
				}
			}
			break;	
	}
	return FALSE;
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:33,代码来源:ellipse.cpp

示例9: NotifyRefChanged

RefResult FormationBhvr::NotifyRefChanged(const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) 
{

	switch (message) 
	{		
	
		case REFMSG_CHANGE:
			//something changed perhaps a name?.. reset the text.
			SetFollowerNodeText();
			SetLeaderNodeText();
			formation_pblk.InvalidateUI();	
		break;

		case REFMSG_CONTAINER_ELEMENT_NULLED:
			 if (hTarget == pblock)
			 {
				 //was is something in the formation?
				 if (pblock->LastNotifyParamID() == follower)
				 {
					 ///okay somebody in the formation was deleted..
	                 INode *n;
                 	 int i;
                 	 int start = 0;
                 	 while (TRUE)
                 	 {
         	             for(i=start; i<pblock->Count(follower); i++)
                 	     {
                 	    	 pblock->GetValue(follower, 0, n, FOREVER, i);
         	            	 if(!n) 
							 { 
								 //This one was NULLed so remove from Tabs.
								 pblock->Delete(follower,i,1); 
								 pblock->Delete(follower_matrix1,i,1); 
								 pblock->Delete(follower_matrix2,i,1); 
								 pblock->Delete(follower_matrix3,i,1); 
								 pblock->Delete(follower_matrix4,i,1); 
								 
								 start = i; 
								 break;
							 }

         		         }
                 		 if (i >= pblock->Count(follower)) break;
                 	 }
				 }
				
			}		

			 //set up the button text due to possible changes.
			 SetFollowerNodeText();
			 SetLeaderNodeText();
			 formation_pblk.InvalidateUI();	
		 break;

	
	}
	return REF_SUCCEED;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:58,代码来源:formation.cpp

示例10: BeginEditParams

void EllipseObject::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev)
{
	SimpleSpline::BeginEditParams(ip, flags, prev);
	this->ip = ip;
	
	ellipseObjDesc.BeginEditParams(ip, this, flags, prev);
	theEllipseParamBlock.SetUserDlgProc( new EllipseParamDlgProc(this) );
	theEllispeTypeInBlock.SetUserDlgProc( new EllipseTypeInDlgProc(this) );
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:9,代码来源:ellipse.cpp

示例11: CreateParamDlg

ParamDlg* BerconNoise::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) {	
	IAutoMParamDlg* masterDlg = BerconNoiseDesc.CreateParamDlgs(hwMtlEdit, imp, this);
	texoutDlg = texout->CreateParamDlg(hwMtlEdit, imp);
	masterDlg->AddDlg(texoutDlg);
	berconnoise_param_blk.SetUserDlgProc(new BerconNoiseDlgProc(this));
	BerconCurve_param_blk.SetUserDlgProc(new BerconCurveDlgProcNOISE(this));
	xyz_blk.SetUserDlgProc(new BerconXYZDlgProc(this));	
	EnableStuff();
	return masterDlg;	
}
开发者ID:GeorgeR,项目名称:BerconMaps,代码行数:10,代码来源:BerconNoise.cpp

示例12: SetSubTexmap

void BerconGradient::SetSubTexmap(int i, Texmap *m) {	
	if (i >= SUBMAPCOUNT+gradient->numKeys()) return;
	ReplaceReference(i+REF_OFFSET, m);		
	if (i == MAPTEX_NUM)
		gradientmap_param_blk.InvalidateUI(pb_maptex);
	else if (i == KEYTEX_NUM)
		gradientmap_param_blk.InvalidateUI(pb_keyTex);
	else if (i == DISTEX_NUM)
		gradientmap_param_blk.InvalidateUI(pb_distex);
	ivalid.SetEmpty();
}
开发者ID:GeorgeR,项目名称:BerconMaps,代码行数:11,代码来源:BerconGradient.cpp

示例13: SwapInputs

void Noise::SwapInputs() {
	Color t = col[0]; col[0] = col[1]; col[1] = t;
	Texmap *x = subTex[0];  subTex[0] = subTex[1];  subTex[1] = x;
	pblock->SwapControllers(noise_color1,0,noise_color2,0);
	noise_param_blk.InvalidateUI(noise_color1);
	noise_param_blk.InvalidateUI(noise_color2);
	noise_param_blk.InvalidateUI(noise_map1);
	noise_param_blk.InvalidateUI(noise_map2);
	macroRecorder->FunctionCall(_T("swap"), 2, 0, mr_prop, _T("color1"), mr_reftarg, this, mr_prop, _T("color2"), mr_reftarg, this);
	macroRecorder->FunctionCall(_T("swap"), 2, 0, mr_prop, _T("map1"), mr_reftarg, this, mr_prop, _T("map2"), mr_reftarg, this);
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:11,代码来源:noise.cpp

示例14: CreateParamDlg

ParamDlg* BerconGradient::CreateParamDlg(HWND hwMtlEdit, IMtlParams *imp) {
	//xyzGenDlg = xyzGen->CreateParamDlg(hwMtlEdit, imp);
	IAutoMParamDlg* masterDlg = BerconGradientDesc.CreateParamDlgs(hwMtlEdit, imp, this);
	texoutDlg = texout->CreateParamDlg(hwMtlEdit, imp);
	//masterDlg->AddDlg(xyzGenDlg);	
	masterDlg->AddDlg(texoutDlg);
	gradientmap_param_blk.SetUserDlgProc(new BerconGradientDlgProc(this));
	BerconCurve_param_blk.SetUserDlgProc(new BerconCurveDlgProcGRADIENT(this));
	xyz_blk.SetUserDlgProc(new BerconXYZDlgProc(this));
	EnableStuff();
	return masterDlg;
}						
开发者ID:GeorgeR,项目名称:BerconMaps,代码行数:12,代码来源:BerconGradient.cpp

示例15: SwapInputs

void Speckle::SwapInputs() {
	Color t = col[0]; col[0] = col[1]; col[1] = t;
	Texmap *x = subTex[0];  subTex[0] = subTex[1];  subTex[1] = x;
//	pblock->SwapControllers(PB_COL1, PB_COL2);
	pblock->SwapControllers(speckle_color1,0, speckle_color2,0);
	speckle_param_blk.InvalidateUI(speckle_color1);
	speckle_param_blk.InvalidateUI(speckle_color2);
	speckle_param_blk.InvalidateUI(speckle_map1);
	speckle_param_blk.InvalidateUI(speckle_map2);
	macroRec->FunctionCall(_T("swap"), 2, 0, mr_prop, _T("color1"), mr_reftarg, this, mr_prop, _T("color2"), mr_reftarg, this);
	macroRec->FunctionCall(_T("swap"), 2, 0, mr_prop, _T("map1"), mr_reftarg, this, mr_prop, _T("map2"), mr_reftarg, this);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:12,代码来源:speckle.cpp


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