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


C++ IObjParam::GetSubObjectLevel方法代码示例

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


在下文中一共展示了IObjParam::GetSubObjectLevel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Display

int SymmetryMod::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[4];
	Matrix3 tm = CompMatrix(t,inode,mc);
	int savedLimits;

	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);
	if (mp_ip && mp_ip->GetSubObjectLevel() == 1) {
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
	} else {
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
	}
	
	DrawLineProc lp(gw);
	DrawGizmo (vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,lp);

	gw->setRndLimits(savedLimits);
	return 0;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:29,代码来源:Symmetry.cpp

示例3: Display

int MirrorMod::Display(
		TimeValue t, INode* inode, ViewExp *vpt, 
		int flagst, ModContext *mc)
	{
	GraphicsWindow *gw = vpt->getGW();
	Point3 pt[4];
	Matrix3 tm = CompMatrix(t,inode,mc);
	int savedLimits;

	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);
	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));
		}
	
	DrawLineProc lp(gw);
	DrawGizmo(
		vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,lp);
	
	gw->setRndLimits(savedLimits);
	return 0;
	}
开发者ID:2asoft,项目名称:xray,代码行数:26,代码来源:mirror.cpp

示例4: Display

int AFRMod::Display(
		TimeValue t, INode* inode, ViewExp *vpt, 
		int flagst, ModContext *mc)
	{
	GraphicsWindow *gw = vpt->getGW();
	Point3 pt[4];
	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) {
		if (sel[0]) 
			 gw->setColor(LINE_COLOR, (float)1.0, (float)0.0, (float)0.0);			 
		else //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));
		}	
	p1->GetValue(t,&pt[0],FOREVER,CTRL_ABSOLUTE);
	gw->marker(&pt[0],HOLLOW_BOX_MRKR);

	// Draw end point
	if (ip && ip->GetSubObjectLevel() == 1) {
		if (sel[1]) 
			 gw->setColor(LINE_COLOR, (float)1.0, (float)0.0, (float)0.0);
		else //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));
		}	
	p2->GetValue(t,&pt[1],FOREVER,CTRL_ABSOLUTE);
	gw->marker(&pt[1],HOLLOW_BOX_MRKR);

	// Draw a line inbetween
	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));
		}
	gw->polyline(2, pt, NULL, NULL, 0, NULL);
	
	// Draw arrowhead
	Matrix3 vtm;
	vpt->GetAffineTM(vtm);
	Point3 vz = vtm.GetRow(2) * Inverse(tm);
	Point3 dp = (pt[1]-pt[0]);
	Point3 v = Normalize(vz^dp) * Length(dp) * 0.2f;
	pt[0] = pt[1] - (0.2f*dp) + v;
	pt[2] = pt[1] - (0.2f*dp) - v;
	gw->polyline(3, pt, NULL, NULL, 0, NULL);
	v = Normalize(v^dp) * Length(dp) * 0.2f;
	pt[0] = pt[1] - (0.2f*dp) + v;
	pt[2] = pt[1] - (0.2f*dp) - v;
	gw->polyline(3, pt, NULL, NULL, 0, NULL);

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


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