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


C++ PipelineManager::assemble方法代码示例

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


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

示例1: refreshBrush

void OkcViewDisplay::refreshBrush() {
	OkcVisualMapResult* okvVMR = getOkcVisualMapResult();
	Operator* brushQ = (Operator*)(okvVMR->getBrushOperator());
	PipelineManager* pm = getPipelineManager();
	Brush *brush = okvVMR->getBrush();

	//If the maximum and minimum values for one dimension has the exact same value,
	//they should be adjusted to a little different values,
	//otherwise, some records having the same value as this max/min value
	//cannot be highlighted.

	int i;
	for (i=0; i<brush->getDimSize(); i++) {
		brush->max[i] += XMDV_DBL_EPSILON;
		brush->min[i] -= XMDV_DBL_EPSILON;
	}

	OkcData* brushStorage = brush->toOkcDataStorage();
	std::vector<double> buf;
	brushStorage->getData(buf, 3);
	int pID = getPipelineID();
	// update the assistant input by the reverse pipeline
	pm->updateAssisInput(pID, brushStorage, XmdvTool::ASSISDATA_BRUSH);

	delete brushStorage;
	pm->assemble(pID, brushQ);
	getViewManager()->refreshDisplayByPID(pID);
}
开发者ID:63n,项目名称:XmdvTool,代码行数:28,代码来源:OkcViewDisplay.cpp

示例2: on_pushButton_apply_clicked

void GlyphCustom::on_pushButton_apply_clicked() {
	getOkcPipelineSettings()->m_glyphPlaceMode = m_placeMode;
	PipelineManager* pm = m_mainWnd->getPipelineManager();
	ViewManager * vm = m_mainWnd->getViewManager();
	OkcPipeline* pl = getOkcPipeline();
	Transformation* mainT = pl->getMainTransformation();
	XmdvTool::PLTYPE plType = pl->getPipelineType();
	assert (plType==XmdvTool::PLTYPE_FLATNORMAL ||
			plType==XmdvTool::PLTYPE_SBB);

	SortRowsOperator* sortO = pl->getSortRowsOperator();
	PCADeriveOperator* pcaO = pl->getPCADeriveOperator();

	// Setup the pipeline in terms of the current glyph place mode
	switch (m_placeMode) {
	case XmdvTool::GLYPHPLACE_ORIGINAL :
	{
		// Disable the sort operator
		// Disable the PCA operator
		switch (plType) {
		case XmdvTool::PLTYPE_FLATNORMAL :
			mainT->enableOperator(PL_FN_OP_SORT, false);
			mainT->enableOperator(PL_FN_OP_PCADERIVE, false);
			break;
		case XmdvTool::PLTYPE_SBB :
			mainT->enableOperator(PL_SBB_OP_SORT, false);
			mainT->enableOperator(PL_SBB_OP_PCADERIVE, false);
			break;
		default:
			// The code should not go to here;
			return;
		}
		// Reassemble the pipeline
		pm->assemble(m_pipelineID, sortO);
		// If the current views include the glyphs, refresh the output
		if (vm->willOuputToVis(m_pipelineID, XmdvTool::VISTYPE_GL)) {
			vm->refreshDisplayByPID(m_pipelineID);
		}
	}
	break;
	case XmdvTool::GLYPHPLACE_ORDERED :
	{
		if (m_selectedDimNo<0 || m_selectedDimNo>=ui.listWidget_dims->count()) {
			// If users did not select anything, return immediately
			return;
		}
		// Enable the sort operator
		// Disable the PCA operator
		switch (plType) {
		case XmdvTool::PLTYPE_FLATNORMAL :
			mainT->enableOperator(PL_FN_OP_SORT, true);
			mainT->enableOperator(PL_FN_OP_PCADERIVE, false);
			break;
		case XmdvTool::PLTYPE_SBB :
			mainT->enableOperator(PL_SBB_OP_SORT, true);
			mainT->enableOperator(PL_SBB_OP_PCADERIVE, false);
			break;
		default:
			// The code should not go to here;
			return;
		}
		// Get the sort operator
		// Setup the sort Operator
		sortO->setSortWay (XmdvTool::OKCDIM_ORIGINAL);
		sortO->setSortDimNo (m_selectedDimNo);
		sortO->setSortOrder (m_sortOrder);
		// Reassemble the pipeline
		pm->assemble(m_pipelineID, sortO);
		// If the current views include the glyphs, refresh the output
		if (vm->willOuputToVis(m_pipelineID, XmdvTool::VISTYPE_GL)) {
			vm->refreshDisplayByPID(m_pipelineID);
		}
	}
	break;
	case XmdvTool::GLYPHPLACE_DATA_DRIVEN :
	{
		if (m_XDimNumber<0
				|| m_XDimNumber>=ui.listWidget_dims->count()
				|| m_YDimNumber<0
				|| m_YDimNumber>=ui.listWidget_dims->count()) {
			// If users did not select anything for X dim or Y dim, return immediately
			return;
		}
		// Disable the sort operator
		// Disable the PCA operator
		switch (plType) {
		case XmdvTool::PLTYPE_FLATNORMAL :
			mainT->enableOperator(PL_FN_OP_SORT, false);
			mainT->enableOperator(PL_FN_OP_PCADERIVE, false);
			break;
		case XmdvTool::PLTYPE_SBB :
			mainT->enableOperator(PL_SBB_OP_SORT, false);
			mainT->enableOperator(PL_SBB_OP_PCADERIVE, false);
			break;
		default:
			// The code should not go to here;
			return;
		}
		OkcPipeline* okcpl = getOkcPipeline();
		OkcVisualMap* okcvm = okcpl->getOkcVisualMap();
//.........这里部分代码省略.........
开发者ID:63n,项目名称:XmdvTool,代码行数:101,代码来源:GlyphCustom.cpp


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