Ejemplo n.º 1
0
   Leveller(UnstructuredGrid::const_ptr grid, const Scalar isovalue)
   : m_grid(grid)
   , m_isoValue(isovalue)
   , tl(nullptr)
   , el(nullptr)
   , cl(nullptr)
   , x(nullptr)
   , y(nullptr)
   , z(nullptr)
   , d(nullptr)
   , out_cl(nullptr)
   , out_x(nullptr)
   , out_y(nullptr)
   , out_z(nullptr)
   , out_d(nullptr)
   , gmin(std::numeric_limits<Scalar>::max())
   , gmax(-std::numeric_limits<Scalar>::max())
   {

      tl = &grid->tl()[0];
      el = &grid->el()[0];
      cl = &grid->cl()[0];
      x = &grid->x()[0];
      y = &grid->y()[0];
      z = &grid->z()[0];

      m_triangles = Triangles::ptr(new Triangles(Object::Initialized));
      m_triangles->setMeta(grid->meta());
   }
Ejemplo n.º 2
0
   PlaneClip(Triangles::const_ptr grid, IsoDataFunctor decider)
      : m_coord(grid)
      , m_tri(grid)
      , m_decider(decider)
      , haveCornerList(false)
      , el(nullptr)
      , cl(nullptr)
      , x(nullptr)
      , y(nullptr)
      , z(nullptr)
      , d(nullptr)
      , out_cl(nullptr)
      , out_el(nullptr)
      , out_x(nullptr)
      , out_y(nullptr)
      , out_z(nullptr)
      , out_d(nullptr)
      {

         if (grid->getNumCorners() > 0) {
            haveCornerList = true;
            cl = &grid->cl()[0];
         }
         x = &grid->x()[0];
         y = &grid->y()[0];
         z = &grid->z()[0];

         m_outTri = Triangles::ptr(new Triangles(Object::Initialized));
         m_outTri->setMeta(grid->meta());
         m_outCoords = m_outTri;
      }