Commit 43de2bf6 authored by Sebastien Jourdain's avatar Sebastien Jourdain

Add Get/SetTuple6 methods

Change-Id: If34bd2bd0b68c7eca2b7c9a602fb60f20f23b64c
parent 9c8e1222
......@@ -596,6 +596,11 @@ double* vtkDataArray::GetTuple4(vtkIdType i)
return this->GetTupleN(i, 4);
}
//----------------------------------------------------------------------------
double* vtkDataArray::GetTuple6(vtkIdType i)
{
return this->GetTupleN(i, 6);
}
//----------------------------------------------------------------------------
double* vtkDataArray::GetTuple9(vtkIdType i)
{
return this->GetTupleN(i, 9);
......@@ -660,6 +665,26 @@ void vtkDataArray::SetTuple4(vtkIdType i, double val0, double val1,
this->SetTuple(i, tuple);
}
//----------------------------------------------------------------------------
void vtkDataArray::SetTuple6(vtkIdType i, double val0, double val1,
double val2, double val3,
double val4, double val5)
{
double tuple[6];
int numComp = this->GetNumberOfComponents();
if (numComp != 6)
{
vtkErrorMacro("The number of components do not match the number requested: "
<< numComp << " != 6");
}
tuple[0] = val0;
tuple[1] = val1;
tuple[2] = val2;
tuple[3] = val3;
tuple[4] = val4;
tuple[5] = val5;
this->SetTuple(i, tuple);
}
//----------------------------------------------------------------------------
void vtkDataArray::SetTuple9(vtkIdType i, double val0, double val1,
double val2, double val3, double val4,
double val5, double val6, double val7, double val8)
......
......@@ -145,6 +145,7 @@ public:
double* GetTuple2(vtkIdType i);
double* GetTuple3(vtkIdType i);
double* GetTuple4(vtkIdType i);
double* GetTuple6(vtkIdType i);
double* GetTuple9(vtkIdType i);
// Description:
......@@ -163,6 +164,8 @@ public:
void SetTuple3(vtkIdType i, double val0, double val1, double val2);
void SetTuple4(vtkIdType i, double val0, double val1, double val2,
double val3);
void SetTuple6(vtkIdType i, double val0, double val1, double val2,
double val3, double val4, double val5);
void SetTuple9(vtkIdType i, 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