Viskores
1.0
|
Helper class to build a DataSet
by iteratively adding points and cells.
More...
#include <DataSetBuilderExplicit.h>
Public Member Functions | |
DataSetBuilderExplicitIterative () | |
void | Begin (const std::string &coordName="coords") |
Begin defining points and cells of a DataSet . More... | |
viskores::Id | AddPoint (const viskores::Vec3f &pt) |
Add a point to the DataSet . More... | |
template<typename T > | |
viskores::Id | AddPoint (const viskores::Vec< T, 3 > &pt) |
Add a point to the DataSet . More... | |
viskores::Id | AddPoint (const viskores::FloatDefault &x, const viskores::FloatDefault &y, const viskores::FloatDefault &z=0) |
Add a point to the DataSet . More... | |
template<typename T > | |
viskores::Id | AddPoint (const T &x, const T &y, const T &z=0) |
Add a point to the DataSet . More... | |
void | AddCell (const viskores::UInt8 &shape, const std::vector< viskores::Id > &conn) |
Add a cell to the DataSet . More... | |
void | AddCell (const viskores::UInt8 &shape, const viskores::Id *conn, const viskores::IdComponent &n) |
Add a cell to the DataSet . More... | |
void | AddCell (viskores::UInt8 shape) |
Start adding a cell to the DataSet . More... | |
void | AddCellPoint (viskores::Id pointIndex) |
Add an incident point to the current cell. More... | |
viskores::cont::DataSet | Create () |
Produce the DataSet . More... | |
Private Attributes | |
std::string | coordNm |
std::vector< viskores::Vec3f > | points |
std::vector< viskores::UInt8 > | shapes |
std::vector< viskores::IdComponent > | numIdx |
std::vector< viskores::Id > | connectivity |
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.
viskores::cont::DataSetBuilderExplicitIterative::DataSetBuilderExplicitIterative | ( | ) |
void viskores::cont::DataSetBuilderExplicitIterative::AddCell | ( | const viskores::UInt8 & | shape, |
const std::vector< viskores::Id > & | conn | ||
) |
void viskores::cont::DataSetBuilderExplicitIterative::AddCell | ( | const viskores::UInt8 & | shape, |
const viskores::Id * | conn, | ||
const viskores::IdComponent & | n | ||
) |
void viskores::cont::DataSetBuilderExplicitIterative::AddCell | ( | viskores::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.
[in] | shape | Identifies the shape of the cell. Use one of the |
void viskores::cont::DataSetBuilderExplicitIterative::AddCellPoint | ( | viskores::Id | pointIndex | ) |
Add an incident point to the current cell.
[in] | pointIndex | Index to the incident point. |
|
inline |
viskores::Id viskores::cont::DataSetBuilderExplicitIterative::AddPoint | ( | const viskores::FloatDefault & | x, |
const viskores::FloatDefault & | y, | ||
const viskores::FloatDefault & | z = 0 |
||
) |
viskores::Id viskores::cont::DataSetBuilderExplicitIterative::AddPoint | ( | const viskores::Vec3f & | pt | ) |
|
inline |
void viskores::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.
[in] | coordName | (optional) The name to register the coordinates as. |
viskores::cont::DataSet viskores::cont::DataSetBuilderExplicitIterative::Create | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |