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


C++ IParamBlock2::SetCount方法代码示例

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


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

示例1: IFixOldPB

void plResponderComponent::IFixOldPB()
{
    if (fCompPB)
    {
        if (fCompPB->Count(kResponderState) == 0)
        {
            IParamBlock2 *pb = CreateParameterBlock2(&gStateBlock, nil);
            int idx = fCompPB->Append(kResponderState, 1, (ReferenceTarget**)&pb);
            pb->SetValue(kStateCmdSwitch, 0, idx);
        }
        if (fCompPB->Count(kResponderStateName) == 0)
        {
            char *name = "";
            fCompPB->Append(kResponderStateName, 1, &name);
        }

        // Make sure there is an enabled value for each command in the state
        for (int i = 0; i < fCompPB->Count(kResponderState); i++)
        {
            IParamBlock2* pb = (IParamBlock2*)fCompPB->GetReferenceTarget(kResponderState, 0, i);
            if (pb->Count(kStateCmdEnabled) != pb->Count(kStateCmdParams))
                pb->SetCount(kStateCmdEnabled, pb->Count(kStateCmdParams));
        }
    }
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:25,代码来源:plResponderComponent.cpp

示例2: AppendTarget

BOOL OrientConstRotation::AppendTarget(INode *target, float weight){

	if (target == NULL){
		float var = 50.0f;
		int ct = pblock->Count(orientation_target_list);
		int ctf = pblock->Count(orientation_target_weight);
		theHold.Begin();
		pblock->SetCount(orientation_target_list, ct + 1);
		pblock->SetValue(orientation_target_list, GetCOREInterface()->GetTime(), target, ct);
		pblock->Append(orientation_target_weight, 1, &var, 1);
		theHold.Accept(GetString(IDS_AG_ORIENTATION_LIST));
		return TRUE;
	}
	else if (!(target->TestForLoop(FOREVER,(ReferenceMaker *) this)!=REF_SUCCEED)) 
	{
		for (int i = 0; i < pblock->Count(orientation_target_list); i++){
			if (target == pblock->GetINode(orientation_target_list, GetCOREInterface()->GetTime(), i)){
				return FALSE; // the target is already in the targetlist
			}
		}
			
		theHold.Begin();
		pblock->Append(orientation_target_list, 1, &target, 1);
		pblock->Append(orientation_target_weight, 1, &weight, 1);
		theHold.Accept(GetString(IDS_AG_ORIENTATION_LIST));
		return TRUE;
	}
	return FALSE;


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

示例3: SetSubTexmap

void Composite::SetSubTexmap(int i, Texmap *m) {
	if (i>=subTex.Count()) {
		int n = subTex.Count();
		subTex.SetCount(i+1);
		pblock->SetCount(comptex_tex,i+1);

		for (int j=n; j<=i; j++)
			subTex[j] = NULL;
		}
	ReplaceReference(i+1,m);
	ivalid.SetEmpty();
	if (paramDlg)
		paramDlg->UpdateSubTexNames();
	}
开发者ID:2asoft,项目名称:xray,代码行数:14,代码来源:composit.cpp

示例4: SetNumMaps

void Composite::SetNumMaps(int n)
	{
	int ct = subTex.Count();
	if (n!=ct) {
		if (n<ct) {
			for (int i=n; i<ct; i++) {
				// Tell mtledit to deactivate texture map in UI
				if (subTex[i])
					subTex[i]->DeactivateMapsInTree();
				ReplaceReference(i+1,NULL);
				}
			}
		
		subTex.SetCount(n);
		// [dl | 01oct2003] Bug#525010. Initialize the new elements in the tab or pblock->SetCount()
		// may try to deference an invalid pointer from this tab.
		for(int j = ct; j < n; ++j) {
			subTex[j] = NULL;
		}

//		mapOn.SetCount(n);
		pblock->SetCount(comptex_tex,n);
		macroRec->Disable();  // JBW 4/21/99, only record one count change
		pblock->SetCount(comptex_ons,n);
		macroRec->Enable();

		if (n>ct) {
			for (int i=ct; i<subTex.Count(); i++) {
				subTex[i] = NULL;				
				pblock->SetValue(comptex_ons,0,TRUE,i);
//				mapOn[i] = TRUE;
				}
			}		
		NotifyChanged();
		}
	}
开发者ID:2asoft,项目名称:xray,代码行数:36,代码来源:composit.cpp


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