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


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

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


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

示例1: GetWorldBoundBox

void EditFaceDataMod::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp *vpt, Box3& box, ModContext *mc) {
	if (!ip->GetShowEndResult() || !mc->localData) return;
	if (!selLevel) return;
	EditFaceDataModData *modData = (EditFaceDataModData *) mc->localData;
	Matrix3 tm = inode->GetObjectTM(t);
	if (modData->GetCacheMesh ()) box = modData->GetCacheMesh()->getBoundingBox (&tm);
	else if (modData->GetCacheMNMesh()) box = modData->GetCacheMNMesh()->getBoundingBox(&tm);
}
开发者ID:2asoft,项目名称:xray,代码行数:8,代码来源:EditFaceData.cpp

示例2: Display

int EditFaceDataMod::Display (TimeValue t, INode* inode, ViewExp *vpt, int flags, ModContext *mc) {
	if (!ip->GetShowEndResult ()) return 0;
	if (!selLevel) return 0;
	if (!mc->localData) return 0;

	EditFaceDataModData *modData = (EditFaceDataModData *) mc->localData;
	Mesh *mesh = modData->GetCacheMesh();
	MNMesh *mnmesh = modData->GetCacheMNMesh();
	AdjEdgeList *mpAdjEdge = modData->GetEdgeList();
	if (!mesh && !mnmesh) return 0;

	// Set up GW
	GraphicsWindow *gw = vpt->getGW();
	Matrix3 tm = inode->GetObjectTM(t);
	int savedLimits;
	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);

	// We need to draw a "gizmo" version of the mesh:
	Point3 colSel=GetSubSelColor();
	Point3 colTicks=GetUIColor (COLOR_VERT_TICKS);
	Point3 colGiz=GetUIColor(COLOR_GIZMOS);
	Point3 colGizSel=GetUIColor(COLOR_SEL_GIZMOS);
	gw->setColor (LINE_COLOR, colGiz);

	int i;
	Point3 rp[3];
	int es[3];

	if (mesh) {
		DbgAssert (mpAdjEdge);
		for (i=0; i<mpAdjEdge->edges.Count(); i++) {
			MEdge & me = mpAdjEdge->edges[i];
			if (me.Hidden (mesh->faces)) continue;
			if (me.Visible (mesh->faces)) es[0] = GW_EDGE_VIS;
			else es[0] = GW_EDGE_INVIS;
			if (mpAdjEdge->edges[i].AFaceSelected (modData->GetFaceSel()))
				gw->setColor (LINE_COLOR, colGizSel);
			else gw->setColor (LINE_COLOR, colGiz);
			rp[0] = mesh->verts[me.v[0]];
			rp[1] = mesh->verts[me.v[1]];
			gw->polyline (2, rp, NULL, NULL, FALSE, es);
		}
	} else {
		es[0] = GW_EDGE_VIS;
		if (mnmesh->GetFlag (MN_MESH_FILLED_IN)) {
			for (i=0; i<mnmesh->nume; i++) {
				if (mnmesh->e[i].GetFlag (MN_DEAD)) continue;
				bool hidden = true, sel = false;
				hidden &= mnmesh->f[mnmesh->e[i].f1].GetFlag (MN_HIDDEN);
				sel |= (modData->GetFaceSel()[mnmesh->e[i].f1] ? true : false);
				if (mnmesh->e[i].f2 >= 0) {
					hidden &= mnmesh->f[mnmesh->e[i].f2].GetFlag (MN_HIDDEN);
					sel |= (modData->GetFaceSel()[mnmesh->e[i].f2] ? true : false);
				}
				if (hidden) continue;
				if (sel) gw->setColor (LINE_COLOR, colGizSel);
				else gw->setColor (LINE_COLOR, colGiz);
				rp[0] = mnmesh->P(mnmesh->e[i].v1);
				rp[1] = mnmesh->P(mnmesh->e[i].v1);
				gw->polyline (2, rp, NULL, NULL, FALSE, es);
			}
		} else {
			for (i=0; i<mnmesh->numf; i++) {
				if (mnmesh->f[i].GetFlag (MN_HIDDEN|MN_DEAD)) continue;
				if (modData->GetFaceSel()[i]) gw->setColor (LINE_COLOR, colGizSel);
				else gw->setColor (LINE_COLOR, colGiz);
				for (int j=0; j<mnmesh->f[i].deg; j++) {
					rp[0] = mnmesh->P(mnmesh->f[i].vtx[j]);
					rp[1] = mnmesh->P(mnmesh->f[i].vtx[(j+1)%mnmesh->f[i].deg]);
					gw->polyline (2, rp, NULL, NULL, FALSE, es);
				}
			}
		}
	}
	gw->setRndLimits(savedLimits);
	return 0;	
}
开发者ID:2asoft,项目名称:xray,代码行数:78,代码来源:EditFaceData.cpp


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