VTK
vtkDaxDetailCommon.h
Go to the documentation of this file.
1//=============================================================================
2//
3// Copyright (c) Kitware, Inc.
4// All rights reserved.
5// See LICENSE.txt for details.
6//
7// This software is distributed WITHOUT ANY WARRANTY; without even
8// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9// PURPOSE. See the above copyright notice for more information.
10//
11// Copyright 2012 Sandia Corporation.
12// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
13// the U.S. Government retains certain rights in this software.
14//
15//=============================================================================
16
17#ifndef vtkDaxDetailCommon_h
18#define vtkDaxDetailCommon_h
19
20#include "vtkCellTypes.h"
21#include "vtkDataSet.h"
22#include "vtkGenericCell.h"
23#include "vtkNew.h"
24
25namespace vtkDax {
26namespace detail {
28 {
30 Cell(vtkGenericCell::InstantiateCell(cellType)){}
33 };
34
35 //returns if a dataset can be used from within Dax
37 {
38 //determine the cell types that the dataset has
39 vtkNew<vtkCellTypes> cellTypes;
40 input->GetCellTypes(cellTypes.GetPointer());
41
42 if(cellTypes->GetNumberOfTypes() > 1)
43 {
44 //we currently only support a single cell type
46 }
47
48 return CellTypeInDataSet(cellTypes->GetCellType(0));
49 }
50}}
51#endif // DaxDetailCommon_h
52// VTK-HeaderTest-Exclude: vtkDaxDetailCommon.h
abstract class to specify cell behavior
Definition: vtkCell.h:60
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
virtual void GetCellTypes(vtkCellTypes *types)
Get a list of types of cells in a dataset.
provides thread-safe access to cells
Allocate and hold a VTK object.
Definition: vtkNew.h:68
T * GetPointer() const
Get a raw pointer to the contained object.
Definition: vtkNew.h:113
virtual void Delete()
Delete a VTK object.
CellTypeInDataSet cellType(vtkDataSet *input)
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:45