MOAB: Mesh Oriented datABase  (version 5.2.1)
smoab::detail::LoadPoly Class Reference

#include <LoadPoly.h>

+ Collaboration diagram for smoab::detail::LoadPoly:

Public Member Functions

 LoadPoly (const smoab::Range &cells, const smoab::Interface &interface)
const smoab::RangemoabPoints () const
void fill (vtkPolyData *dataSet)

Private Member Functions

void addCoordinates (vtkPointSet *grid)
void addGridsTopology (vtkPolyData *data, vtkIdType numCells, vtkIdType numConnectivity) const

Private Attributes

moab::Interface * Interface
smoab::detail::LinearCellConnectivity CellConn
smoab::Range Points

Detailed Description

Definition at line 20 of file LoadPoly.h.

Constructor & Destructor Documentation

smoab::detail::LoadPoly::LoadPoly ( const smoab::Range cells,
const smoab::Interface interface 
) [inline]

Definition at line 29 of file LoadPoly.h.


Member Function Documentation

void smoab::detail::LoadPoly::addCoordinates ( vtkPointSet *  grid) [inline, private]

Definition at line 54 of file LoadPoly.h.

References CellConn, smoab::detail::LinearCellConnectivity::moabPoints(), Points, and moab::Range::size().

Referenced by fill().

    //this is sorta of hackish as moabPoints is only valid
    //after compactIds has been called

    //since the smoab::range are always unique and sorted
    //we can use the more efficient coords_iterate
    //call in moab, which returns moab internal allocated memory
    vtkNew<vtkPoints> newPoints;

    //need a pointer to the allocated vtkPoints memory so that we
    //don't need to use an extra copy and we can bypass all vtk's check
    //on out of bounds
    double *rawPoints = static_cast<double*>(newPoints->GetVoidPointer(0));

void smoab::detail::LoadPoly::addGridsTopology ( vtkPolyData *  data,
vtkIdType  numCells,
vtkIdType  numConnectivity 
) const [inline, private]

Definition at line 77 of file LoadPoly.h.

References CellConn, and smoab::detail::LinearCellConnectivity::copyToVtkCellInfo().

Referenced by fill().

    //correct the connectivity size to account for the vtk padding
    const vtkIdType vtkConnectivity = numCells + numConnectivity;

    vtkNew<vtkIdTypeArray> cellArray;

    vtkIdType* rawArray = static_cast<vtkIdType*>(cellArray->GetVoidPointer(0));

    vtkNew<vtkCellArray> cells;

void smoab::detail::LoadPoly::fill ( vtkPolyData *  dataSet) [inline]

Definition at line 41 of file LoadPoly.h.

References addCoordinates(), addGridsTopology(), CellConn, and smoab::detail::LinearCellConnectivity::compactIds().

    //now that CellConn has all the cells properly stored, lets fixup
    //the ids so that they start at zero and keep the same logical ordering
    //as before.
    vtkIdType numCells, connLen;

Definition at line 37 of file LoadPoly.h.

References Points.

{ return this->Points; }

Member Data Documentation

moab::Interface* smoab::detail::LoadPoly::Interface [private]

Definition at line 22 of file LoadPoly.h.

Definition at line 24 of file LoadPoly.h.

Referenced by addCoordinates(), and moabPoints().

List of all members.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines