Commit b21bb400 authored by David C. Lonie's avatar David C. Lonie
Browse files

Add vtkDataArray::Insert[Next]Tuple6(...) methods.

The similar methods (GetTupleN, SetTupleN, etc) are hardcoded
for N = {1, 2, 3, 4, 6, 9}, but the insert methods were
missing the 6-tuple implementation. This patch keeps these
methods symmetric.
parent 8873e811
......@@ -768,6 +768,21 @@ void vtkDataArray::InsertTuple4(vtkIdType i, double val0, double val1,
tuple[3] = val3;
this->InsertTuple(i, tuple);
}
//----------------------------------------------------------------------------
void vtkDataArray::InsertTuple6(vtkIdType i, double val0, double val1,
double val2, double val3, double val4,
double val5)
{
if (this->NumberOfComponents != 6)
{
vtkErrorMacro("The number of components do not match the number requested: "
<< this->NumberOfComponents << " != 6");
}
double tuple[6] = {val0, val1, val2, val3, val4, val5};
this->InsertTuple(i, tuple);
}
//----------------------------------------------------------------------------
void vtkDataArray::InsertTuple9(vtkIdType i, double val0, double val1,
double val2, double val3, double val4,
......@@ -850,6 +865,21 @@ void vtkDataArray::InsertNextTuple4(double val0, double val1,
tuple[3] = val3;
this->InsertNextTuple(tuple);
}
//----------------------------------------------------------------------------
void vtkDataArray::InsertNextTuple6(double val0, double val1, double val2,
double val3, double val4, double val5)
{
if (this->NumberOfComponents != 6)
{
vtkErrorMacro("The number of components do not match the number requested: "
<< this->NumberOfComponents << " != 6");
}
double tuple[6] = {val0, val1, val2, val3, val4, val5};
this->InsertNextTuple(tuple);
}
//----------------------------------------------------------------------------
void vtkDataArray::InsertNextTuple9(double val0, double val1,
double val2, double val3, double val4,
......
......@@ -186,6 +186,8 @@ public:
void InsertTuple3(vtkIdType i, double val0, double val1, double val2);
void InsertTuple4(vtkIdType i, double val0, double val1, double val2,
double val3);
void InsertTuple6(vtkIdType i, double val0, double val1, double val2,
double val3, double val4, double val5);
void InsertTuple9(vtkIdType i, double val0, double val1, double val2,
double val3, double val4, double val5, double val6,
double val7, double val8);
......@@ -206,6 +208,8 @@ public:
void InsertNextTuple3(double val0, double val1, double val2);
void InsertNextTuple4(double val0, double val1, double val2,
double val3);
void InsertNextTuple6(double val0, double val1, double val2,
double val3, double val4, double val5);
void InsertNextTuple9(double val0, double val1, double val2,
double val3, double val4, double val5, double val6,
double val7, double val8);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment