本文整理汇总了C++中Domain::getShapeId方法的典型用法代码示例。如果您正苦于以下问题:C++ Domain::getShapeId方法的具体用法?C++ Domain::getShapeId怎么用?C++ Domain::getShapeId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain::getShapeId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readSpatialSBML
//.........这里部分代码省略.........
//
SpatialModelPlugin* mplugin2;
mplugin2 = static_cast<SpatialModelPlugin*>(model2->getPlugin("spatial"));
cout << "URI: " << mplugin2->getURI() << endl;
cout << "prefix: " << mplugin2->getPrefix() << endl;
// get a Geometry object via SpatialModelPlugin object.
Geometry* geometry2 = mplugin2->getGeometry();
cout << "Geometry coordSystem: " << geometry2->getCoordinateSystem() << endl;
// get a CoordComponent object via the Geometry object.
CoordinateComponent* coordComp = geometry2->getCoordinateComponent(0);
std::cout << "CoordComponent spatialId: " << coordComp->getSpatialId() << std::endl;
std::cout << "CoordComponent compType: " << coordComp->getComponentType() << std::endl;
std::cout << "CoordComponent sbmlUnit: " << coordComp->getSbmlUnit() << std::endl;
std::cout << "CoordComponent index: " << coordComp->getIndex() << std::endl;
BoundaryMin* minX = coordComp->getBoundaryMin();
std::cout << "minX name: " << minX->getSpatialId() << std::endl;
std::cout << "minX value: " << minX->getValue() << std::endl;
BoundaryMax* maxX = coordComp->getBoundaryMax();
std::cout << "maxX name: " << maxX->getSpatialId() << std::endl;
std::cout << "maxX value: " << maxX->getValue() << std::endl;
// get a DomainType object via the Geometry object.
DomainType* domainType2 = geometry2->getDomainType(0);
std::cout << "DomainType spatialId: " << domainType2->getSpatialId() << std::endl;
std::cout << "DomainType spatialDim: " << domainType2->getSpatialDimensions() << std::endl;
// get a Domain object via the Geometry object.
Domain* domain = geometry2->getDomain(0);
std::cout << "Domain1 spatialId: " << domain->getSpatialId() << std::endl;
std::cout << "Domain1 implicit: " << domain->getImplicit() << std::endl;
std::cout << "Domain1 domainType: " << domain->getDomainType() << std::endl;
std::cout << "Domain1 Shape: " << domain->getShapeId() << std::endl;
// get an internal point via the domain object
InteriorPoint* internalPt = domain->getInteriorPoint(0);
std::cout << "InternalPt_1 coord1: " << internalPt->getCoord1() << std::endl;
// get a Domain object via the Geometry object.
domain = geometry2->getDomain(1);
std::cout << "Domain2 spatialId: " << domain->getSpatialId() << std::endl;
std::cout << "Domain2 implicit: " << domain->getImplicit() << std::endl;
std::cout << "Domain2 domainType: " << domain->getDomainType() << std::endl;
std::cout << "Domain2 Shape: " << domain->getShapeId() << std::endl;
// get an internal point via the domain object
internalPt = domain->getInteriorPoint(0);
std::cout << "InternalPt_2 coord1: " << internalPt->getCoord1() << std::endl;
// get an AdjacentDomains object via the Geometry object.
AdjacentDomains* adjDomain = geometry2->getAdjacentDomains(0);
std::cout << "AdjDomain spatialId: " << adjDomain->getSpatialId() << std::endl;
std::cout << "AdjDomain domain1: " << adjDomain->getDomain1() << std::endl;
std::cout << "AdjDomain domain2: " << adjDomain->getDomain2() << std::endl;
// get the different GeometryDefinition objects via the Geometry object.
GeometryDefinition* gd;
for (unsigned int i = 0; i < geometry2->getNumGeometryDefinitions(); i++) {
gd = geometry2->getGeometryDefinition(i);
if (gd->isAnalyticGeometry()) {
AnalyticGeometry* analyticalGeom = static_cast<AnalyticGeometry*>(gd);
std::cout << "AnalGeom spatialId: " << analyticalGeom->getSpatialId() << std::endl;
// analVol from analGeom.
AnalyticVolume* av = analyticalGeom->getAnalyticVolume(0);
std::cout << "AnalVol spatialId: " << av->getSpatialId() << std::endl;
std::cout << "AnalVol domainType: " << av->getDomainType() << std::endl;