Helper class to build a DataSet
by iteratively adding points and cells.
More...
#include <DataSetBuilderExplicit.h>
Helper class to build a DataSet
by iteratively adding points and cells.
This class allows you to specify a DataSet
by adding points and cells one at a time.
◆ DataSetBuilderExplicitIterative()
vtkm::cont::DataSetBuilderExplicitIterative::DataSetBuilderExplicitIterative |
( |
| ) |
|
◆ AddCell() [1/3]
void vtkm::cont::DataSetBuilderExplicitIterative::AddCell |
( |
const vtkm::UInt8 & |
shape, |
|
|
const std::vector< vtkm::Id > & |
conn |
|
) |
| |
Add a cell to the DataSet
.
- Parameters
-
[in] | shape | Identifies the shape of the cell. Use one of the vtkm::CELL_SHAPE_* values. |
[in] | conn | List of indices to the incident points. |
◆ AddCell() [2/3]
Add a cell to the DataSet
.
- Parameters
-
[in] | shape | Identifies the shape of the cell. Use one of the vtkm::CELL_SHAPE_* values. |
[in] | conn | List of indices to the incident points. |
[in] | n | The number of incident points (and the length of the conn array). |
◆ AddCell() [3/3]
void vtkm::cont::DataSetBuilderExplicitIterative::AddCell |
( |
vtkm::UInt8 |
shape | ) |
|
Start adding a cell to the DataSet
.
The incident points are later added one at a time using AddCellPoint
. The cell is completed the next time AddCell
or Create
is called.
- Parameters
-
[in] | shape | Identifies the shape of the cell. Use one of the |
◆ AddCellPoint()
void vtkm::cont::DataSetBuilderExplicitIterative::AddCellPoint |
( |
vtkm::Id |
pointIndex | ) |
|
Add an incident point to the current cell.
- Parameters
-
[in] | pointIndex | Index to the incident point. |
◆ AddPoint() [1/4]
template<typename T >
vtkm::Id vtkm::cont::DataSetBuilderExplicitIterative::AddPoint |
( |
const T & |
x, |
|
|
const T & |
y, |
|
|
const T & |
z = 0 |
|
) |
| |
|
inline |
Add a point to the DataSet
.
- Parameters
-
[in] | x | The x coordinate of the newly created point. |
[in] | y | The y coordinate of the newly created point. |
[in] | z | The z coordinate of the newly created point. |
- Returns
- The index of the newly created point.
◆ AddPoint() [2/4]
Add a point to the DataSet
.
- Parameters
-
[in] | x | The x coordinate of the newly created point. |
[in] | y | The y coordinate of the newly created point. |
[in] | z | The z coordinate of the newly created point. |
- Returns
- The index of the newly created point.
◆ AddPoint() [3/4]
Add a point to the DataSet
.
- Parameters
-
[in] | pt | The coordinates of the point to add. |
- Returns
- The index of the newly created point.
◆ AddPoint() [4/4]
template<typename T >
vtkm::Id vtkm::cont::DataSetBuilderExplicitIterative::AddPoint |
( |
const vtkm::Vec< T, 3 > & |
pt | ) |
|
|
inline |
Add a point to the DataSet
.
- Parameters
-
[in] | pt | The coordinates of the point to add. |
- Returns
- The index of the newly created point.
◆ Begin()
void vtkm::cont::DataSetBuilderExplicitIterative::Begin |
( |
const std::string & |
coordName = "coords" | ) |
|
Begin defining points and cells of a DataSet
.
The state of this object is initialized to be ready to use AddPoint
and AddCell
methods.
- Parameters
-
[in] | coordName | (optional) The name to register the coordinates as. |
◆ Create()
Produce the DataSet
.
The points and cells previously added are finalized and the resulting DataSet
is returned.
◆ connectivity
std::vector<vtkm::Id> vtkm::cont::DataSetBuilderExplicitIterative::connectivity |
|
private |
◆ coordNm
std::string vtkm::cont::DataSetBuilderExplicitIterative::coordNm |
|
private |
◆ numIdx
◆ points
std::vector<vtkm::Vec3f> vtkm::cont::DataSetBuilderExplicitIterative::points |
|
private |
◆ shapes
std::vector<vtkm::UInt8> vtkm::cont::DataSetBuilderExplicitIterative::shapes |
|
private |
The documentation for this class was generated from the following file: