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


C++ Control::GetValue方法代码示例

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


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

示例1: Display

int FExtrudeMod::Display(
		TimeValue t, INode* inode, ViewExp *vpt, 
		int flagst, ModContext *mc)
	{
	if ( ! vpt || ! vpt->IsAlive() )
	{
		// why are we here
		DbgAssert(!_T("Invalid viewport!"));
		return FALSE;
	}

	GraphicsWindow *gw = vpt->getGW();
	Point3 pt;
	Matrix3 tm = CompMatrix(t,inode,mc);
	int savedLimits;

	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);
	
	// Draw start point
	if (ip && ip->GetSubObjectLevel() == 1) {
		//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
	} else {
		//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
		}	
	base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
	gw->marker(&pt,HOLLOW_BOX_MRKR);
	
	gw->setRndLimits(savedLimits);
	return 0;
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:33,代码来源:fextrude.cpp

示例2: HitTest

int FExtrudeMod::HitTest(
		TimeValue t, INode* inode, int type, int crossing, 
		int flags, IPoint2 *p, ViewExp *vpt, ModContext* mc)
	{	

	if ( ! vpt || ! vpt->IsAlive() )
	{
		// why are we here
		DbgAssert(!_T("Invalid viewport!"));
		return FALSE;
	}

	GraphicsWindow *gw = vpt->getGW();
	Point3 pt;
	HitRegion hr;
	int savedLimits, res = 0;
	Matrix3 tm = CompMatrix(t,inode,mc);

	MakeHitRegion(hr,type, crossing,4,p);
	gw->setHitRegion(&hr);	
	gw->setRndLimits(((savedLimits = gw->getRndLimits()) | GW_PICK) & ~GW_ILLUM);	
	gw->setTransform(tm);

	gw->clearHitCode();
	base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
	gw->marker(&pt,HOLLOW_BOX_MRKR);
	if (gw->checkHitCode()) {
		vpt->LogHit(inode, mc, gw->getHitDistance(), 0, NULL); 
		res = 1;
		}			

	gw->setRndLimits(savedLimits);
	return res;
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:34,代码来源:fextrude.cpp

示例3: HitTest

int AFRMod::HitTest(
		TimeValue t, INode* inode, 
		int type, int crossing, int flags, 
		IPoint2 *p, ViewExp *vpt, ModContext* mc)
	{
	GraphicsWindow *gw = vpt->getGW();
	Point3 pt;
	HitRegion hr;
	int savedLimits, res = 0;
	Matrix3 tm = CompMatrix(t,inode,mc);

	MakeHitRegion(hr,type, crossing,4,p);
	gw->setHitRegion(&hr);	
	gw->setRndLimits(((savedLimits = gw->getRndLimits()) | GW_PICK) & ~GW_ILLUM);	
	gw->setTransform(tm);

	// Hit test start point
	if ((flags&HIT_SELONLY   &&  sel[0]) ||
		(flags&HIT_UNSELONLY && !sel[0]) ||
		!(flags&(HIT_UNSELONLY|HIT_SELONLY)) ) {
	
		gw->clearHitCode();
		p1->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
		gw->marker(&pt,HOLLOW_BOX_MRKR);
		if (gw->checkHitCode()) {
			vpt->LogHit(inode, mc, gw->getHitDistance(), 0, NULL); 
			res = 1;
			}
		}

	// Hit test end point
	if ((flags&HIT_SELONLY   &&  sel[1]) ||
		(flags&HIT_UNSELONLY && !sel[1]) ||
		!(flags&(HIT_UNSELONLY|HIT_SELONLY)) ) {
	
		gw->clearHitCode();
		p2->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
		gw->marker(&pt,HOLLOW_BOX_MRKR);
		if (gw->checkHitCode()) {
			vpt->LogHit(inode, mc, gw->getHitDistance(), 1, NULL); 
			res = 1;
			}
		}

	gw->setRndLimits(savedLimits);
	return res;
	}
开发者ID:2asoft,项目名称:xray,代码行数:47,代码来源:afregion.cpp

示例4: GetSubObjectCenters

void FExtrudeMod::GetSubObjectCenters (SubObjAxisCallback *cb,
									   TimeValue t,	INode *node,ModContext *mc)	{
	Matrix3 tm = CompMatrix(t,node,mc);
	Point3 p;
	mp_base->GetValue(t,&p,FOREVER,CTRL_ABSOLUTE);
	tm.PreTranslate(p);
	cb->Center(tm.GetTrans(),0);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:8,代码来源:fextrude.cpp

示例5: LocalValidity

Interval AFRMod::LocalValidity(TimeValue t)
	{
  // aszabo|feb.05.02 If we are being edited, return NEVER 
	// to forces a cache to be built after previous modifier.
	if (TestAFlag(A_MOD_BEING_EDITED))
		return NEVER;

	Interval iv = FOREVER;
	float v;
	Point3 pt;
	pblock->GetValue(PB_FALLOFF,t,v,iv);
	pblock->GetValue(PB_PINCH,t,v,iv);
	pblock->GetValue(PB_BUBBLE,t,v,iv);
	p1->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
	p2->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
	return iv;
	}
开发者ID:2asoft,项目名称:xray,代码行数:17,代码来源:afregion.cpp

示例6: GetWorldBoundBox

void FExtrudeMod::GetWorldBoundBox (TimeValue t, INode* inode,
									ViewExp * /*vpt*/, Box3& box, ModContext *mc) {
	Matrix3 tm = CompMatrix(t,inode,mc);
	Point3 pt;
	box.Init();
	mp_base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
	box += pt * tm;		
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:8,代码来源:fextrude.cpp

示例7: CompMatrix

Matrix3 SymmetryMod::CompMatrix (TimeValue t, INode *inode, ModContext *mc, Interval *validity) {
	Interval localInterval(FOREVER);
	if (!validity) validity = &localInterval;
	Matrix3 tm(1);
	mp_mirror->GetValue(t,&tm,*validity,CTRL_RELATIVE);
	if (mc && mc->tm) tm = tm * Inverse(*(mc->tm));
	if (inode) tm = tm * inode->GetObjTMBeforeWSM(t,validity);
	return tm;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:9,代码来源:Symmetry.cpp

示例8: GetValidity

//aszabo|feb.06.02 - When LocalValidity is called by ModifyObject,
// it returns NEVER and thus the object channels are marked non valid
// As a result, the mod stack enters and infinite evaluation of the modifier
// ModifyObject now calls GetValidity and CORE calls LocalValidity to
// allow for building a cache on the input of this modifier when it's 
// being edited 
Interval MirrorMod::GetValidity(TimeValue t)
{
	Interval iv = FOREVER;
	Matrix3 mat(1);		
	tmControl->GetValue(t,&mat,iv,CTRL_RELATIVE);
	float o;
	pblock->GetValue(PB_OFFSET,t,o,iv);
	return iv;
}
开发者ID:2asoft,项目名称:xray,代码行数:15,代码来源:mirror.cpp

示例9: GetSubObjectCenters

void AFRMod::GetSubObjectCenters(
		SubObjAxisCallback *cb,TimeValue t,
		INode *node,ModContext *mc)
	{
	Matrix3 tm = CompMatrix(t,node,mc);
	Point3 pt(0,0,0), p;
	int c=0;
	if (sel[0]) {
		p1->GetValue(t,&p,FOREVER,CTRL_ABSOLUTE);
		pt += p;
		c++;
		}
	if (sel[1]) {
		p2->GetValue(t,&p,FOREVER,CTRL_ABSOLUTE);
		pt += p;
		c++;
		}
	if (c) pt /= float(c);
	tm.PreTranslate(pt);
	cb->Center(tm.GetTrans(),0);
	}
开发者ID:2asoft,项目名称:xray,代码行数:21,代码来源:afregion.cpp

示例10: GetWorldBoundBox

void AFRMod::GetWorldBoundBox(
		TimeValue t,INode* inode, ViewExp *vpt, 
		Box3& box, ModContext *mc)
	{
	Matrix3 tm = CompMatrix(t,inode,mc);
	Point3 pt1, pt2;
	box.Init();
	p1->GetValue(t,&pt1,FOREVER,CTRL_ABSOLUTE);
	box += pt1 * tm;
	p2->GetValue(t,&pt2,FOREVER,CTRL_ABSOLUTE);
	box += pt2 * tm;
	
	Matrix3 vtm;
	vpt->GetAffineTM(vtm);
	Point3 vz = vtm.GetRow(2) * Inverse(tm);
	Point3 dp = (pt2-pt1);
	Point3 v = Normalize(vz^dp) * Length(dp) * 0.2f;
	box += (pt2 - (0.2f*dp) + v) * tm;
	box += (pt2 - (0.2f*dp) - v) * tm;
	v = Normalize(v^dp) * Length(dp) * 0.2f;
	box += (pt2 - (0.2f*dp) + v) * tm;
	box += (pt2 - (0.2f*dp) - v) * tm;	
	}
开发者ID:2asoft,项目名称:xray,代码行数:23,代码来源:afregion.cpp

示例11: LocalValidity

Interval FExtrudeMod::LocalValidity(TimeValue t) {
  // aszabo|feb.05.02 If we are being edited, 
	// return NEVER to forces a cache to be built after previous modifier.
	if (TestAFlag(A_MOD_BEING_EDITED))
		return NEVER;
	Interval iv = FOREVER;
	float v;
	Point3 pt;
	int type;
	mp_pblock->GetValue(kFexAmount,t,v,iv);
	mp_pblock->GetValue(kFexScale,t,v,iv);
	mp_pblock->GetValue (kFexType, t, type, iv);
	if (type==2) mp_base->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
	return iv;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:15,代码来源:fextrude.cpp

示例12: LocalValidity

Interval FExtrudeMod::LocalValidity(TimeValue t)
	{
	// aszabo|feb.05.02 If we are being edited, return NEVER 
	// to forces a cache to be built after previous modifier.
	if (TestAFlag(A_MOD_BEING_EDITED))
		return NEVER;

	Interval iv = FOREVER;
	float v;
	Point3 pt;
	pblock->GetValue(PB_AMOUNT,t,v,iv);
	pblock->GetValue(PB_SCALE,t,v,iv);
	base->GetValue(t,&pt,iv,CTRL_ABSOLUTE);
	return iv;
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:15,代码来源:fextrude.cpp

示例13: CompMatrix

Matrix3 MirrorMod::CompMatrix(
		TimeValue t,INode *inode,ModContext *mc)
	{
	Interval iv;
	Matrix3 tm(1);		
	tmControl->GetValue(t,&tm,iv,CTRL_RELATIVE);
	if (mc && mc->tm) tm = tm * Inverse(*(mc->tm));
	if (inode) 
	{
#ifdef DESIGN_VER
		tm = tm * inode->GetObjTMBeforeWSM(GetCOREInterface()->GetTime(),&iv);
#else
		tm = tm * inode->GetObjTMBeforeWSM(t,&iv);
#endif // DESIGN_VER
	}
	return tm;
	}
开发者ID:2asoft,项目名称:xray,代码行数:17,代码来源:mirror.cpp

示例14: GetWorldBoundBox

void FExtrudeMod::GetWorldBoundBox(
		TimeValue t,INode* inode, ViewExp *vpt, 
		Box3& box, ModContext *mc)
	{
	if ( ! vpt || ! vpt->IsAlive() )
	{
		// why are we here
		DbgAssert(!_T("Invalid viewport!"));
		return;
	}

	Matrix3 tm = CompMatrix(t,inode,mc);
	Point3 pt;
	box.Init();
	base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
	box += pt * tm;		
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:17,代码来源:fextrude.cpp

示例15: LocalValidity

Interval SymmetryMod::LocalValidity(TimeValue t) {
  // aszabo|feb.05.02 If we are being edited, 
	// return NEVER to forces a cache to be built after previous modifier.
	if (TestAFlag(A_MOD_BEING_EDITED))
		return NEVER;

	Interval iv = FOREVER;
	int foo;
	mp_pblock->GetValue(kSymAxis, t, foo, iv);
	mp_pblock->GetValue (kSymFlip, t, foo, iv);
	mp_pblock->GetValue(kSymWeld, t, foo, iv);
	mp_pblock->GetValue(kSymSlice, t, foo, iv);
	float thresh;
	mp_pblock->GetValue (kSymThreshold, t, thresh, iv);
	Matrix3 mat(1);		
	mp_mirror->GetValue(t,&mat,iv,CTRL_RELATIVE);
	return iv;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:18,代码来源:Symmetry.cpp


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