當前位置: 首頁>>代碼示例>>C++>>正文


C++ Interval::SetEmpty方法代碼示例

本文整理匯總了C++中Interval::SetEmpty方法的典型用法代碼示例。如果您正苦於以下問題:C++ Interval::SetEmpty方法的具體用法?C++ Interval::SetEmpty怎麽用?C++ Interval::SetEmpty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Interval的用法示例。


在下文中一共展示了Interval::SetEmpty方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: Init

void CellTex::Init()
	{
	if (xyzGen) xyzGen->Reset();
	else ReplaceReference(1, GetNewDefaultXYZGen());

	if (texout) texout->Reset();
	else ReplaceReference(2, GetNewDefaultTextureOutput());

    RegisterDistanceDefault(_T("Cellular Params"), _T("Size"), 5.0f, IN_TO_M(5.0f));
    float size = GetDistanceDefault(_T("Cellular Params"), _T("Size"));
	pblock->SetValue(cellular_size,0,size);

/*
	pblock->SetValue(PB_CELLCOL,0,Point3(1,1,1));
	pblock->SetValue(PB_DIVCOL1,0,Point3(.5f,.5f,.5f));
	pblock->SetValue(PB_DIVCOL2,0,Point3(0,0,0));
	pblock->SetValue(PB_SIZE,0,5.0f);
	pblock->SetValue(PB_SPREAD,0,0.5f);
	pblock->SetValue(PB_LOW,0,0.0f);
	pblock->SetValue(PB_MID,0,0.5f);
	pblock->SetValue(PB_HIGH,0,1.0f);
	pblock->SetValue(PB_FRACT,0,0);
	pblock->SetValue(PB_ITER,0,3.0f);
	pblock->SetValue(PB_USECELLMAP,0,1);
	pblock->SetValue(PB_USEDIV1MAP,0,1);
	pblock->SetValue(PB_USEDIV2MAP,0,1);
	pblock->SetValue(PB_SMOOTH,0,0.1f);	
	pblock->SetValue(PB_ADAPT,0,1);	
	if (paramDlg)  
		paramDlg->pmap->SetParamBlock(pblock);
*/
	fract = 0;
	ivalid.SetEmpty();
	mapValid.SetEmpty();
	}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:35,代碼來源:celltex.cpp

示例2: NotifyRefChanged

RefResult Noise::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, 
   PartID& partID, RefMessage message ) {
	switch (message) {
		case REFMSG_CHANGE:
			ivalid.SetEmpty();
			cacheValid.SetEmpty();
			if (hTarget == pblock)
				{
			// see if this message came from a changing parameter in the pblock,
			// if so, limit rollout update to the changing item and update any active viewport texture
				ParamID changing_param = pblock->LastNotifyParamID();
//				if (hTarget != xyzGen && hTarget != texout ) 
				noise_param_blk.InvalidateUI(changing_param);
				// notify our dependents that we've changed
				// NotifyChanged();  //DS this is redundant
#ifdef SHOW_3DMAPS_WITH_2D
				if (changing_param != -1)
					DiscardTexHandle();
#endif
				}
#ifdef SHOW_3DMAPS_WITH_2D
			else if (hTarget == xyzGen) 
				{
				DiscardTexHandle();
				}
#endif

			break;
		}
	return(REF_SUCCEED);
	}
開發者ID:artemeliy,項目名稱:inf4715,代碼行數:31,代碼來源:noise.cpp

示例3: Init

void Noise::Init() {
	if (xyzGen) xyzGen->Reset();
	else ReplaceReference( XYZGEN_REF, GetNewDefaultXYZGen());	
	if (texout) texout->Reset();
	else ReplaceReference( TEXOUT_REF, GetNewDefaultTextureOutput());		
	ivalid.SetEmpty();
	cacheValid.SetEmpty();
	macroRecorder->Disable();  // disable macrorecorder during reset
		SetColor(0, Color(0.0f,0.0f,0.0f), TimeValue(0));
		SetColor(1, Color(1.0f,1.0f,1.0f), TimeValue(0));
		noiseType = NOISE_REGULAR;
#ifndef RENDER_VER
        RegisterDistanceDefault(_T("Noise Params"), _T("Size"), DEFAULT_NOISE_SIZE, IN_TO_M(DEFAULT_NOISE_SIZE));
        float size = GetDistanceDefault(_T("Noise Params"), _T("Size"));
		SetSize(size, TimeValue(0));
#else
		SetSize(DEFAULT_NOISE_SIZE, TimeValue(0));
#endif
		SetPhase(.0f,TimeValue(0));
		SetLevels(3.0f,TimeValue(0));
		pblock->SetValue(noise_hithresh,0,1.0f);
        
	macroRecorder->Enable();
	for (int i=0; i<NSUBTEX; i++) 
		mapOn[i] = 1;
	}
開發者ID:artemeliy,項目名稱:inf4715,代碼行數:26,代碼來源:noise.cpp

示例4: NotifyRefChanged

// This method is responsible for responding to the change notification
// messages sent by the texmap dependants.
RefResult Smoke::NotifyRefChanged(const Interval& changeInt, 
	RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate ) {
	switch (message) {
		case REFMSG_CHANGE:
			mapValid.SetEmpty();
			texValidity.SetEmpty();
			if (hTarget == pblock)
				{
				ParamID changing_param = pblock->LastNotifyParamID();
				smoke_param_blk.InvalidateUI(changing_param);
#ifdef SHOW_3DMAPS_WITH_2D
				if (changing_param != -1)
					DiscardTexHandle();
#endif
				}
#ifdef SHOW_3DMAPS_WITH_2D
			else if (hTarget == xyzGen) 
				{
				DiscardTexHandle();
				}
#endif

			// One of the texmap dependants have changed.  We set our
			// validity interval to empty and invalidate the dialog
			// so it gets redrawn.
//			texValidity.SetEmpty();
//			if (hTarget != xyzGen) {
//				if (paramDlg) 
//					paramDlg->pmap->Invalidate();
//			}
			break;
/*
		case REFMSG_GET_PARAM_DIM: {
			// This returns the 'dimension' of the parameter.  This is 
			// the type and order of magnitude of the parameter.
			GetParamDim *gpd = (GetParamDim *)partID;
			switch (gpd->index) {
				case PB_SIZE: gpd->dim =  stdWorldDim; 	break;
				case PB_ITER:
				case PB_EXP:
				case PB_PHASE:
					gpd->dim = defaultDim; break;
				case PB_COL1: 
				case PB_COL2: gpd->dim = stdColor255Dim; break;
			}
			return REF_STOP; 
		}

		case REFMSG_GET_PARAM_NAME: {
			// This returns the name that will appear in track view
			// of the parameter.
			GetParamName *gpn = (GetParamName *)partID;
			gpn->name = GetString(nameIDs[gpn->index]);
			return REF_STOP; 
		}
*/
	}
	return(REF_SUCCEED);
}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:61,代碼來源:smoke.cpp

示例5: SetSubTexmap

void Mask::SetSubTexmap(int i, Texmap *m) {
	ReplaceReference(i,m);
	if (i==0)
		{
		mask_param_blk.InvalidateUI(mask_map1);
		mapValid.SetEmpty();
		}	
	else if (i==1)
		{
		mask_param_blk.InvalidateUI(mask_map2);
		mapValid.SetEmpty();
		}	

	}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:14,代碼來源:mask.cpp

示例6: NotifyRefChanged

RefResult CompositeMat::NotifyRefChanged(
		Interval changeInt, 
		RefTargetHandle hTarget, 
		PartID& partID, 
		RefMessage message)
	{
	switch (message) {
 		case REFMSG_CHANGE:
			if (hTarget == pblock2)	{
				ivalid.SetEmpty();
//				compmat_param_blk.InvalidateUI();
				ParamID changing_param = pblock2->LastNotifyParamID();
				compmat_param_blk.InvalidateUI(changing_param);
				if( (changing_param == compmat_amount )
					||(changing_param == compmat_map_on )
					||(changing_param == compmat_type ))
				{
					mReshadeRQ = RR_NeedReshade;
				} else if( changing_param == compmat_mtls ) {
					mReshadeRQ = RR_NeedPreshade; // really want to get from mtl, but dont have it
//					NotifyChanged();
				}
			} else {
				ivalid.SetEmpty();
				NotifyChanged();
			}

			if (hTarget != NULL) {
				switch (hTarget->SuperClassID()) {
					case MATERIAL_CLASS_ID: {
						// never hit for this mtl ????
						IReshading* r = static_cast<IReshading*>(hTarget->GetInterface(IID_IReshading));
						mReshadeRQ = r == NULL ? RR_None : r->GetReshadeRequirements();
					} break;
				}
			}
			break;
		case REFMSG_SUBANIM_STRUCTURE_CHANGED:
			if ((hTarget!=this))
				return REF_SUCCEED;

			mReshadeRQ = RR_NeedPreshade;
			NotifyChanged();
			break;
			
	}
	return REF_SUCCEED;
}
開發者ID:artemeliy,項目名稱:inf4715,代碼行數:48,代碼來源:composite_material.cpp

示例7: NotifyRefChanged

RefResult Gradient::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, 
   PartID& partID, RefMessage message ) 
{
	switch (message) 
	{
		case REFMSG_CHANGE:
		{
			ivalid.SetEmpty();
			if (hTarget == pblock) {
				// see if this message came from a changing parameter in the pblock,
				// if so, limit rollout update to the changing item and update any active viewport texture
				ParamID changing_param = pblock->LastNotifyParamID();
				if (hTarget != uvGen && hTarget != texout) 
					grad_param_blk.InvalidateUI(changing_param);
				if (changing_param != -1)
					DiscardTexHandle();
				}
			// notify our dependents that we've changed
			// NotifyChanged();  //DS this is redundant
			break;
		}

		case REFMSG_UV_SYM_CHANGE:
			DiscardTexHandle();  
			break;
	}
	return(REF_SUCCEED);
}
開發者ID:artemeliy,項目名稱:inf4715,代碼行數:28,代碼來源:gradient.cpp

示例8: Init

// This method is called to reset the texmap back to its default values.
void Planet::Init() {
	// Reset the XYZGen or allocate a new one
	if (xyzGen) 
		xyzGen->Reset();
	else 
		ReplaceReference(0, GetNewDefaultXYZGen());	


//	ReplaceReference(1, CreateParameterBlock(pbdesc, 
//		PB_LENGTH, PLANET_PB_VERSION));
//	if (paramDlg) 
//		paramDlg->pmap->SetParamBlock(pblock);

	// Set the inital parameters
	// {10,20,80},{10,30,80},{10,40,90},{10,100,12},
	// {100,80,12},{80,20,8},{100,80,50},{100,100,100}
	SetColor(0, Color(0.04f, 0.08f, 0.31f), TimeValue(0));
	SetColor(1, Color(0.04f, 0.12f, 0.31f), TimeValue(0));
	SetColor(2, Color(0.04f, 0.16f, 0.31f), TimeValue(0));
	SetColor(3, Color(0.04f, 0.39f, 0.05f), TimeValue(0));
	SetColor(4, Color(0.39f, 0.31f, 0.05f), TimeValue(0));
	SetColor(5, Color(0.31f, 0.08f, 0.03f), TimeValue(0));
	SetColor(6, Color(0.39f, 0.31f, 0.20f), TimeValue(0));
	SetColor(7, Color(0.39f, 0.39f, 0.39f), TimeValue(0));

	SetSize(40.0f, TimeValue(0));
	SetIsland(0.5f, TimeValue(0));
	SetPercent(60.0f, TimeValue(0));
	SetSeed(12345, TimeValue(0));
	blend = 1;

	// Set the validity interval of the texture to empty
	texValidity.SetEmpty();
}
開發者ID:2asoft,項目名稱:xray,代碼行數:35,代碼來源:planet.cpp

示例9: Init

void Output::Init() {
	ivalid.SetEmpty();
	if (texout) texout->Reset();
	else ReplaceReference( 1, GetNewDefaultTextureOutput());	
	texout->SetRollupOpen(1);
	mapOn[0] = 1;
	}
開發者ID:2asoft,項目名稱:xray,代碼行數:7,代碼來源:output.cpp

示例10: NotifyRefChanged

RefResult Composite::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, 
   PartID& partID, RefMessage message ) {
	switch (message) {
		case REFMSG_CHANGE:			
			if (paramDlg) 
				paramDlg->Invalidate();
			if (pblock->LastNotifyParamID() == comptex_tex && pblock->Count(comptex_tex) != subTex.Count())
				SetNumMaps(pblock->Count(comptex_tex));
			else if (pblock->LastNotifyParamID() == comptex_ons && pblock->Count(comptex_ons) != subTex.Count())
				SetNumMaps(pblock->Count(comptex_ons));
			DiscardTexHandles(); // DS 5/4/00
			ivalid.SetEmpty();
			if (paramDlg&&Active())
				paramDlg->ip->MtlChanged();
			break;
		
		case REFMSG_GET_PARAM_DIM:
			return REF_STOP; 
		
		case REFMSG_GET_PARAM_NAME: {
			GetParamName *gpn = (GetParamName*)partID;
			gpn->name= GetSubTexmapSlotName(gpn->index);			
			return REF_STOP; 
			}
		}
	return(REF_SUCCEED);
	}
開發者ID:2asoft,項目名稱:xray,代碼行數:27,代碼來源:composit.cpp

示例11: SetSubTexmap

// Stores the 'i-th' sub-texmap managed by the material or texture.
void Smoke::SetSubTexmap(int i, Texmap *m) {
	ReplaceReference(i+2, m);
	if (i==0)
		{
		smoke_param_blk.InvalidateUI(smoke_map1);
		mapValid.SetEmpty();
		}
	else if (i==1)
		{
		smoke_param_blk.InvalidateUI(smoke_map2);
		mapValid.SetEmpty();
		}

//	if (paramDlg)
//		paramDlg->UpdateSubTexNames();
}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:17,代碼來源:smoke.cpp

示例12: SetSubTexmap

// Stores the 'i-th' sub-texmap managed by the material or texture.
void Speckle::SetSubTexmap(int i, Texmap *m) {
	ReplaceReference(i+2, m);
	if (i==0)
		{
		speckle_param_blk.InvalidateUI(speckle_map1);
		texValidity.SetEmpty();
		}
	else if (i==1)
		{
		speckle_param_blk.InvalidateUI(speckle_map2);
		texValidity.SetEmpty();
		}

//	if (paramDlg)
//		paramDlg->UpdateSubTexNames();
}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:17,代碼來源:speckle.cpp

示例13: NotifyRefChanged

RefResult SWrapObject::NotifyRefChanged( 
		Interval changeInt,
		RefTargetHandle hTarget, 
		PartID& partID, 
		RefMessage message )
	{				
	switch (message) {		
		case REFMSG_CHANGE:	
			{ if (hTarget==custnode) cmValid.SetEmpty();
			  if (hTarget==pblock) InvalidateUI();
			SimpleWSMObject::NotifyRefChanged(changeInt,hTarget,partID,message);
			}
			break;
		case REFMSG_TARGET_DELETED:	
			{ if (hTarget==custnode) custnode=NULL;
			}
			break;
		case REFMSG_NODE_NAMECHANGE:
			{ if (hTarget==custnode) 
			  { custname = TSTR(custnode->GetName());
			    ShowName();
				}
			  break;
			}
		default: SimpleWSMObject::NotifyRefChanged(changeInt,hTarget,partID,message);
		}
	return REF_SUCCEED;
	}
開發者ID:2asoft,項目名稱:xray,代碼行數:28,代碼來源:surfwrap.cpp

示例14: Copy

void OrientConstRotation::Copy(Control *from)
{
	if(GetLocked()==false)
	{
	Quat fvalRot;
	if (from->ClassID()==ClassID()) {
		OrientConstRotation *ctrl = (OrientConstRotation*)from;
		// a copy will construct its own pblock to keep the pblock-to-owner 1-to-1.
		ReplaceReference(ORIENT_ROT_PBLOCK_REF, CloneRefHierarchy(ctrl->pblock));
		curRot   =			ctrl->curRot;
		baseRotQuatLocal =  ctrl->baseRotQuatLocal;
		baseRotQuatWorld =  ctrl->baseRotQuatWorld;
		flags    = ctrl->flags;
		mLocked = ctrl->mLocked;
	} else {
		if(from&&GetLockedTrackInterface(from))
		  mLocked = GetLockedTrackInterface(from)->GetLocked();
		from->GetValue(GetCOREInterface()->GetTime(), &fvalRot, Interval(0, 0));	// to know the object orientation before the
		firstTimeFlag = 1;
		baseRotQuatLocal = fvalRot;
		baseRotQuatLocal.Normalize(); // current controller was active
		}
	ivalid.SetEmpty();
	NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE);
	}
}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:26,代碼來源:orientation_cnstrnt.cpp

示例15: Init

// This method is called to reset the texmap back to its default values.
void Speckle::Init() {
	// Reset the XYZGen or allocate a new one
	if (xyzGen) 
		xyzGen->Reset();
	else 
		ReplaceReference(0, GetNewDefaultXYZGen());	

	// Set the inital colors and size
	SetColor(0, DEFAULT_COLOR1, TimeValue(0));
	SetColor(1, DEFAULT_COLOR2, TimeValue(0));
    RegisterDistanceDefault(_T("Speckle Params"), _T("Size"), DEFAULT_SPECKLE_SIZE, IN_TO_M(DEFAULT_SPECKLE_SIZE));
    float size = GetDistanceDefault(_T("Speckle Params"), _T("Size"));
    SetSize(size, TimeValue(0));
	// Set the validity interval of the texture to empty
	texValidity.SetEmpty();
	mapValid.SetEmpty();
}
開發者ID:innovatelogic,項目名稱:ilogic-vm,代碼行數:18,代碼來源:speckle.cpp


注:本文中的Interval::SetEmpty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。