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


C++ ptr::copyAttributes方法代码示例

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


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

示例1: work

bool IsoSurface::work(vistle::UnstructuredGrid::const_ptr gridS,
             vistle::Vec<vistle::Scalar>::const_ptr dataS,
             vistle::DataBase::const_ptr mapdata) {

   const int processorType = getIntParameter("processortype");
#ifdef CUTTINGSURFACE
   const Scalar isoValue = 0.0;
#else
   const Scalar isoValue = getFloatParameter("isovalue");
#endif

   Leveller l(isocontrol, gridS, isoValue, processorType);

#ifndef CUTTINGSURFACE
   l.setIsoData(dataS);
#endif
   if(mapdata){
      l.addMappedData(mapdata);
   };
   l.process();

#ifndef CUTTINGSURFACE
   auto minmax = dataS->getMinMax();
   if (minmax.first[0] < m_min)
      m_min = minmax.first[0];
   if (minmax.second[0] > m_max)
      m_max = minmax.second[0];
#endif

   Object::ptr result = l.result();
   DataBase::ptr mapresult = l.mapresult();
   if (result) {
#ifndef CUTTINGSURFACE
      result->copyAttributes(dataS);
#endif
      result->copyAttributes(gridS, false);
      if (mapdata && mapresult) {
         mapresult->copyAttributes(mapdata);
         mapresult->setGrid(result);
         addObject(m_dataOut, mapresult);
      }
#ifndef CUTTINGSURFACE
      else {
          addObject(m_dataOut, result);
      }
#endif
   }
   return true;
}
开发者ID:,项目名称:,代码行数:49,代码来源:

示例2: compute

bool IsoSurface::compute() {

   const Scalar isoValue = getFloatParameter("isovalue");

   Object::const_ptr grid = expect<Object>("grid_in");
   Object::const_ptr data = expect<Object>("data_in");
   if (!grid || !data)
      return false;

   Object::ptr object = generateIsoSurface(grid, data, isoValue);

   if (object) {
      object->copyAttributes(data);
      object->copyAttributes(grid, false);
      addObject("grid_out", object);
   }

   return true;
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例3: compute

bool CutGeometry::compute() {

   Object::const_ptr oin = expect<Object>("grid_in");
   if (!oin)
      return false;

   Object::ptr object = cutGeometry(oin);
   if (object) {
      object->copyAttributes(oin);
      addObject("grid_out", object);
   }

   return true;
}
开发者ID:vistle,项目名称:vistle,代码行数:14,代码来源:CutGeometry.cpp

示例4: compute

bool CellToVert::compute() {

   coCellToVert algo;

   Object::const_ptr grid = expect<Object>("grid_in");
   Object::const_ptr data = expect<Object>("data_in");
   if (!grid || !data)
      return false;

   Object::ptr out = algo.interpolate(grid, data);
   if (out) {
      out->copyAttributes(data);
      addObject("data_out", out);
      passThroughObject("grid_out", grid);
   }

   return true;
}
开发者ID:xyuan,项目名称:vistle,代码行数:18,代码来源:CellToVert.cpp

示例5: work

bool IsoSurface::work(vistle::Object::const_ptr grid,
             vistle::Vec<vistle::Scalar>::const_ptr dataS,
             vistle::DataBase::const_ptr mapdata) {

   const int processorType = getIntParameter("processortype");
#ifdef CUTTINGSURFACE
   const Scalar isoValue = 0.0;
#else
   const Scalar isoValue = getFloatParameter("isovalue");
#endif

   Leveller l(isocontrol, grid, isoValue, processorType);
   l.setComputeNormals(m_computeNormals->getValue());

#ifndef CUTTINGSURFACE
   l.setIsoData(dataS);
#endif
   if(mapdata){
      l.addMappedData(mapdata);
   };
   l.process();

#ifndef CUTTINGSURFACE
   auto minmax = dataS->getMinMax();
   if (minmax.first[0] < m_min)
      m_min = minmax.first[0];
   if (minmax.second[0] > m_max)
      m_max = minmax.second[0];
#endif

   Object::ptr result = l.result();
   DataBase::ptr mapresult = l.mapresult();
   if (result && !result->isEmpty()) {
#ifndef CUTTINGSURFACE
      result->copyAttributes(dataS);
#endif
      result->updateInternals();
      result->copyAttributes(grid, false);
      result->setTransform(grid->getTransform());
      if (result->getTimestep() < 0) {
          result->setTimestep(grid->getTimestep());
          result->setNumTimesteps(grid->getNumTimesteps());
      }
      if (result->getBlock() < 0) {
          result->setBlock(grid->getBlock());
          result->setNumBlocks(grid->getNumBlocks());
      }
      if (mapdata && mapresult) {
         mapresult->updateInternals();
         mapresult->copyAttributes(mapdata);
         mapresult->setGrid(result);
         addObject(m_dataOut, mapresult);
      }
#ifndef CUTTINGSURFACE
      else {
          addObject(m_dataOut, result);
      }
#endif
   }
   return true;
}
开发者ID:vistle,项目名称:vistle,代码行数:61,代码来源:IsoSurface.cpp


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