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


C++ cchobject::Container类代码示例

本文整理汇总了C++中cchobject::Container的典型用法代码示例。如果您正苦于以下问题:C++ Container类的具体用法?C++ Container怎么用?C++ Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onNewSelection

void qHPR::onNewSelection(const ccHObject::Container& selectedEntities)
{
	if (m_action)
	{
		//a single point cloud must be selected
		m_action->setEnabled(selectedEntities.size() == 1 && selectedEntities.front()->isA(CC_TYPES::POINT_CLOUD));
	}
}
开发者ID:coolshahabaz,项目名称:trunk,代码行数:8,代码来源:qHPR.cpp

示例2: getAllEntitiesThatHaveMetaData

void BaseFilter::getAllEntitiesThatHaveMetaData(QString key, ccHObject::Container &entities)
{
    entities.clear(); //better be sure
    ccHObject::Container tempContainer;
    getAllEntitiesOfType(CC_TYPES::HIERARCHY_OBJECT, tempContainer);

    for (ccHObject::Container::const_iterator it = tempContainer.begin(); it != tempContainer.end(); ++it )
    {
        if ((*it)->hasMetaData(key))
            entities.push_back(*it);
    }
}
开发者ID:eile,项目名称:trunk,代码行数:12,代码来源:BaseFilter.cpp

示例3: getSelectedEntities

int ccDBRoot::getSelectedEntities(ccHObject::Container& selEntities,
                                    CC_CLASS_ENUM filter/*=CC_OBJECT*/,
                                    dbTreeSelectionInfo* info/*=NULL*/)
{
    QItemSelectionModel* qism = m_dbTreeWidget->selectionModel();
	QModelIndexList selectedIndexes = qism->selectedIndexes();
    int i,selCount = selectedIndexes.size();

    for (i=0;i<selCount; ++i)
    {
        ccHObject* anObject = static_cast<ccHObject*>(selectedIndexes[i].internalPointer());
        if (anObject && anObject->isKindOf(filter))
            selEntities.push_back(anObject);
    }

    if (info)
    {
        info->reset();
        info->selCount=selCount;

        for (i=0;i<selCount;++i)
        {
            ccHObject* obj = selEntities[i];

            info->sfCount += int(obj->hasScalarFields());
            info->colorCount += int(obj->hasColors());
            info->normalsCount += int(obj->hasNormals());

            if (obj->isKindOf(CC_POINT_CLOUD))
            {
                ccGenericPointCloud* cloud = ccHObjectCaster::ToGenericPointCloud(obj);
                info->cloudCount++;
                info->octreeCount += int(cloud->getOctree()!=NULL);
            }

            if (obj->isKindOf(CC_MESH))
                info->meshCount++;

            if (obj->isKindOf(CC_SENSOR))
            {
                info->sensorCount++;
                if (obj->isKindOf(CC_GBL_SENSOR))
                    info->gblSensorCount++;
            }

            if (obj->isKindOf(CC_POINT_KDTREE))
				info->kdTreeCount++;
        }
    }

    return int(selEntities.size());
}
开发者ID:markgenemei,项目名称:trunk,代码行数:52,代码来源:ccDBRoot.cpp

示例4: onNewSelection

void qFacets::onNewSelection(const ccHObject::Container& selectedEntities)
{
	if (m_doFuseKdTreeCells)
		m_doFuseKdTreeCells->setEnabled(selectedEntities.size()==1 && selectedEntities.back()->isA(CC_TYPES::POINT_CLOUD));
	if (m_fastMarchingExtraction)
		m_fastMarchingExtraction->setEnabled(selectedEntities.size()==1 && selectedEntities.back()->isA(CC_TYPES::POINT_CLOUD));
	if (m_doExportFacets)
		m_doExportFacets->setEnabled(selectedEntities.size() != 0);
	if (m_doExportFacetsInfo)
		m_doExportFacetsInfo->setEnabled(selectedEntities.size() != 0);
	if (m_doClassifyFacetsByAngle)
		m_doClassifyFacetsByAngle->setEnabled(selectedEntities.size()==1 && selectedEntities.back()->isA(CC_TYPES::HIERARCHY_OBJECT));
	if (m_doShowStereogram)
		m_doShowStereogram->setEnabled(selectedEntities.size()==1 && (selectedEntities.back()->isA(CC_TYPES::HIERARCHY_OBJECT) || selectedEntities.back()->isA(CC_TYPES::POINT_CLOUD)));
}
开发者ID:Sephrimoth,项目名称:trunk,代码行数:15,代码来源:qFacets.cpp

示例5: onNewSelection

void qSRA::onNewSelection(const ccHObject::Container& selectedEntities)
{
	if (m_doLoadProfile)
	{
		//always active
	}

	bool cloudAndPolylineSelected = (	selectedEntities.size() == 2
										&& (   (selectedEntities[0]->isA(CC_TYPES::POLY_LINE) && selectedEntities[1]->isA(CC_TYPES::POINT_CLOUD))
											|| (selectedEntities[1]->isA(CC_TYPES::POLY_LINE) && selectedEntities[0]->isA(CC_TYPES::POINT_CLOUD))) );
	
	if (m_doCompareCloudToProfile)
	{
		m_doCompareCloudToProfile->setEnabled(cloudAndPolylineSelected);
	}

	if (m_doProjectCloudDists)
	{
		m_doProjectCloudDists->setEnabled(	/*(selectedEntities.size() == 1 && selectedEntities[0]->isA(CC_TYPES::POINT_CLOUD)) ||
											(selectedEntities.size() == 2 && 
												(  (selectedEntities[0]->isA(CC_TYPES::POLY_LINE) && selectedEntities[1]->isA(CC_TYPES::POINT_CLOUD))
												|| (selectedEntities[1]->isA(CC_TYPES::POLY_LINE) && selectedEntities[0]->isA(CC_TYPES::POINT_CLOUD))))*/
											cloudAndPolylineSelected );
	}

	//backup selected entities
	m_selectedEntities = selectedEntities;
}
开发者ID:getov,项目名称:trunk,代码行数:28,代码来源:qSRA.cpp

示例6: onNewSelection

void qSRA::onNewSelection(const ccHObject::Container& selectedEntities)
{
	if (m_doLoadProfile)
	{
		//always active
	}

	bool validSelection = false;
	if (selectedEntities.size() == 2)
	{
		//we expect a cloud...
		int cloudIndex = selectedEntities[0]->isA(CC_TYPES::POINT_CLOUD) ? 0 : selectedEntities[1]->isA(CC_TYPES::POINT_CLOUD) ? 1 : -1;
		if (cloudIndex != -1)
		{
			//... and either a polyline or a cone/cylinder
			validSelection = (selectedEntities[1-cloudIndex]->isA(CC_TYPES::POLY_LINE) || selectedEntities[1-cloudIndex]->isKindOf(CC_TYPES::CONE));
		}
	}

	if (m_doCompareCloudToProfile)
	{
		m_doCompareCloudToProfile->setEnabled(validSelection);
	}

	if (m_doProjectCloudDists)
	{
		m_doProjectCloudDists->setEnabled(validSelection);
	}
}
开发者ID:luca-penasa,项目名称:trunk,代码行数:29,代码来源:qSRA.cpp

示例7: onNewSelection

void qCork::onNewSelection(const ccHObject::Container& selectedEntities)
{
	if (m_action)
	{
		//we need two and only two meshes!
		m_action->setEnabled(	selectedEntities.size() == 2
							&&	selectedEntities[0]->isKindOf(CC_TYPES::MESH)
							&&	selectedEntities[1]->isKindOf(CC_TYPES::MESH));
	}
}
开发者ID:FrankHXW,项目名称:trunk,代码行数:10,代码来源:qCork.cpp

示例8: QDialog

ccMatchScalesDlg::ccMatchScalesDlg(	const ccHObject::Container& entities,
										int defaultSelectedIndex/*=0*/,
										QWidget* parent/*=0*/)
	: QDialog(parent, Qt::Tool)
	, Ui::MatchScalesDialog()
{
	setupUi(this);

	for (size_t i=0; i<entities.size(); ++i)
	{
		//add one line per entity in the combo-box
		listWidget->insertItem(static_cast<int>(i), new QListWidgetItem(QString("%1 (ID=%2)").arg(entities[i]->getName()).arg(entities[i]->getUniqueID())));
	}
	
	//default selection
	if (defaultSelectedIndex >= 0 && static_cast<size_t>(defaultSelectedIndex) < entities.size())
		listWidget->setItemSelected(listWidget->item(defaultSelectedIndex),true);

	rmsDifferenceLineEdit->setValidator(new QDoubleValidator(rmsDifferenceLineEdit));
}
开发者ID:dyeone,项目名称:cloudcompare-archeos,代码行数:20,代码来源:ccMatchScalesDlg.cpp

示例9: getSelectedEntitiesThatAre

void BaseFilter::getSelectedEntitiesThatAre(CC_CLASS_ENUM  kind, ccHObject::Container & entities)
{
    ccHObject::Container selected = m_selected;
    for (size_t i = 0 ; i < selected.size(); ++i)
    {
        ccHObject * this_obj = selected[i];
        if (this_obj->isA(kind))
        {
            entities.push_back(this_obj);
        }
    }
}
开发者ID:eile,项目名称:trunk,代码行数:12,代码来源:BaseFilter.cpp

示例10: getSelectedEntitiesThatAreCCPointCloud

void BaseFilter::getSelectedEntitiesThatAreCCPointCloud(ccHObject::Container & entities)
{
    ccHObject::Container selected = m_selected;
    for (size_t i = 0 ; i < selected.size(); ++i)
    {
        ccHObject * this_obj = selected[i];
        if (this_obj->isA(CC_TYPES::POINT_CLOUD))
        {
            entities.push_back(this_obj);
        }
    }
}
开发者ID:eile,项目名称:trunk,代码行数:12,代码来源:BaseFilter.cpp

示例11: filterObjectsByKind

ccHObject::Container vombat::filterObjectsByKind(const ccHObject::Container& in,
    const CC_CLASS_ENUM ThisType)
{
    if (in.empty())
        return in;

    ccHObject::Container out;
    for (ccHObject* obj : in) {
        if (obj->isKindOf(ThisType)) {
            out.push_back(obj);
        }
    }

    return out;
}
开发者ID:luca-penasa,项目名称:vombat,代码行数:15,代码来源:vombat.cpp

示例12: QDialog

ccEntityPickerDlg::ccEntityPickerDlg(	const ccHObject::Container& entities,
										int selectedIndex/*=0*/,
										QWidget* parent/*=0*/,
										QString labelStr/*=QString()*/)
	: QDialog(parent)
	, Ui::PickEntityDlg()
{
	setupUi(this);

	setWindowFlags(Qt::Tool/*Qt::Dialog | Qt::WindowStaysOnTopHint*/);

	for (size_t i=0; i<entities.size(); ++i)
	{
		//add one line per entity in the combo-box
		comboBox->addItem(QString("%1 (ID=%2)").arg(entities[i]->getName()).arg(entities[i]->getUniqueID()));
	}

	if (!labelStr.isNull())
		label->setText(labelStr);
}
开发者ID:norbertwenzel,项目名称:CloudCompare,代码行数:20,代码来源:ccEntityPickerDlg.cpp

示例13: onNewSelection

bool qPoissonReconPlugin::onNewSelection(const ccHObject::Container& selectedEntities)
{
	return (selectedEntities.size()==1 && selectedEntities[0]->isA(CC_POINT_CLOUD));
}
开发者ID:,项目名称:,代码行数:4,代码来源:

示例14: onNewSelection

void qRansacSD::onNewSelection(const ccHObject::Container& selectedEntities)
{
    if (m_action)
        m_action->setEnabled(selectedEntities.size()==1 && selectedEntities[0]->isA(CC_POINT_CLOUD));
}
开发者ID:jkua,项目名称:cloudcompare,代码行数:5,代码来源:qRANSAC_SD.cpp

示例15: onNewSelection

void qPCV::onNewSelection(const ccHObject::Container& selectedEntities)
{
    if (m_action)
		m_action->setEnabled(selectedEntities.size()==1);
}
开发者ID:zhenglai,项目名称:trunk,代码行数:5,代码来源:qPCV.cpp


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