本文整理汇总了C++中datacontainer::Pointer::getGeometry方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::getGeometry方法的具体用法?C++ Pointer::getGeometry怎么用?C++ Pointer::getGeometry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datacontainer::Pointer
的用法示例。
在下文中一共展示了Pointer::getGeometry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateDataContainerComboBox
static void PopulateDataContainerComboBox(AbstractFilter* filter, FilterParameter* filterParameter,
QComboBox* dcCombo, DataContainerArrayProxy& dcaProxy)
{
FilterParameterType* fp = dynamic_cast<FilterParameterType*>(filterParameter);
assert(fp != NULL);
DataContainerArray::Pointer dca = filter->getDataContainerArray();
// Populate the DataContainerArray Combo Box with all the DataContainers
QList<DataContainerProxy> dcList = dcaProxy.dataContainers.values();
QListIterator<DataContainerProxy> iter(dcList);
dcCombo->clear();
QVector<unsigned int> defVec = fp->getDefaultGeometryTypes();
while(iter.hasNext() )
{
DataContainerProxy dcProxy = iter.next();
DataContainer::Pointer dc = dca->getDataContainer(dcProxy.name);
IGeometry::Pointer geom = IGeometry::NullPointer();
uint32_t geomType = 999;
if (NULL != dc.get()) { geom = dc->getGeometry(); }
if (NULL != geom.get()) { geomType = geom->getGeometryType(); }
dcCombo->addItem(dcProxy.name);
if (defVec.isEmpty() == false)
{
if (defVec.contains(geomType) == false)
{
QStandardItemModel* model = qobject_cast<QStandardItemModel*>(dcCombo->model());
if (NULL != model)
{
QStandardItem* item = model->item(dcCombo->findText(dcProxy.name));
if (NULL != item)
{
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
}
}
}
}
}
}
示例2: execute
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void GenerateGeometryConnectivity::execute()
{
int32_t err = 0;
setErrorCondition(err);
dataCheck();
if(getErrorCondition() < 0) { return; }
DataContainer::Pointer sm = getDataContainerArray()->getDataContainer(getSurfaceDataContainerName());
IGeometry::Pointer geom = sm->getGeometry();
if (m_GenerateVertexTriangleLists == true || m_GenerateTriangleNeighbors == true)
{
notifyStatusMessage(getHumanLabel(), "Generating Vertex Element List");
err = geom->findElementsContainingVert();
if (err < 0)
{
setErrorCondition(-400);
QString ss = QObject::tr("Error generating vertex element list for Geometry type %1").arg(geom->getGeometryTypeAsString());
notifyErrorMessage(getHumanLabel(), ss, getErrorCondition());
}
}
if (m_GenerateTriangleNeighbors == true)
{
notifyStatusMessage(getHumanLabel(), "Generating Element Neighbors List");
err = geom->findElementNeighbors();
if (err < 0)
{
setErrorCondition(-401);
QString ss = QObject::tr("Error generating element neighbor list for Geometry type %1").arg(geom->getGeometryTypeAsString());
notifyErrorMessage(getHumanLabel(), ss, getErrorCondition());
}
}
/* Let the GUI know we are done with this filter */
notifyStatusMessage(getHumanLabel(), "Complete");
}