An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit aa810fb8 authored by Dave DeMarle's avatar Dave DeMarle
Browse files

Fix compilation warnings in vtkpiston.

Change-Id: I5e23b0fe65a91d9e3c54107d9a3a9629cdff096b
parent 1a317ca8
......@@ -162,7 +162,6 @@ void MyProcess::Execute()
{
int my_id = this->Controller->GetLocalProcessId();
int go;
vtkMPICommunicator *comm =
vtkMPICommunicator::SafeDownCast(this->Controller->GetCommunicator());
comm->Barrier();
......
......@@ -60,7 +60,7 @@ vtkDataSetToPiston
}
//------------------------------------------------------------------------------
int vtkDataSetToPiston::RequestData(vtkInformation *request,
int vtkDataSetToPiston::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
......@@ -124,7 +124,7 @@ int vtkDataSetToPiston::RequestData(vtkInformation *request,
break;
case VTK_POLY_DATA:
{
vtkPolyData *id = vtkPolyData::GetData(inputVector[0]);
vtkPolyData *idp = vtkPolyData::GetData(inputVector[0]);
//convert to simplices that piston can handle
//TODO: support points, lines and tets in addition to triangles
//TODO: support cell attributes
......@@ -132,11 +132,11 @@ int vtkDataSetToPiston::RequestData(vtkInformation *request,
vtkPoints *tPts = vtkPoints::New();
triangulated->SetPoints(tPts);
tPts->Delete();
triangulated->GetPointData()->CopyStructure(id->GetPointData());
triangulated->GetPointData()->CopyAllocate(id->GetPointData());
triangulated->GetPointData()->CopyStructure(idp->GetPointData());
triangulated->GetPointData()->CopyAllocate(idp->GetPointData());
triangulated->GetPointData()->SetCopyNormals(1);
vtkCellArray *cells = id->GetPolys();
vtkCellArray *cells = idp->GetPolys();
vtkIdType npts =0;
vtkIdType *index = 0;
vtkIdType opnt = 0;
......@@ -147,24 +147,24 @@ int vtkDataSetToPiston::RequestData(vtkInformation *request,
triangle[1] = index[1];
triangle[2] = index[2];
//the first triangle
triangulated->GetPoints()->InsertNextPoint(id->GetPoint(triangle[0]));
triangulated->GetPointData()->CopyData(id->GetPointData(), triangle[0], opnt++);
triangulated->GetPoints()->InsertNextPoint(id->GetPoint(triangle[1]));
triangulated->GetPointData()->CopyData(id->GetPointData(), triangle[1], opnt++);
triangulated->GetPoints()->InsertNextPoint(id->GetPoint(triangle[2]));
triangulated->GetPointData()->CopyData(id->GetPointData(), triangle[2], opnt++);
triangulated->GetPoints()->InsertNextPoint(idp->GetPoint(triangle[0]));
triangulated->GetPointData()->CopyData(idp->GetPointData(), triangle[0], opnt++);
triangulated->GetPoints()->InsertNextPoint(idp->GetPoint(triangle[1]));
triangulated->GetPointData()->CopyData(idp->GetPointData(), triangle[1], opnt++);
triangulated->GetPoints()->InsertNextPoint(idp->GetPoint(triangle[2]));
triangulated->GetPointData()->CopyData(idp->GetPointData(), triangle[2], opnt++);
// the remaining triangles, of which
// each introduces a triangle after extraction
for ( vtkIdType i = 3; i < npts; i ++ )
{
triangle[1] = triangle[2];
triangle[2] = index[i];
triangulated->GetPoints()->InsertNextPoint(id->GetPoint(triangle[0]));
triangulated->GetPointData()->CopyData(id->GetPointData(), triangle[0], opnt++);
triangulated->GetPoints()->InsertNextPoint(id->GetPoint(triangle[1]));
triangulated->GetPointData()->CopyData(id->GetPointData(), triangle[1], opnt++);
triangulated->GetPoints()->InsertNextPoint(id->GetPoint(triangle[2]));
triangulated->GetPointData()->CopyData(id->GetPointData(), triangle[2], opnt++);
triangulated->GetPoints()->InsertNextPoint(idp->GetPoint(triangle[0]));
triangulated->GetPointData()->CopyData(idp->GetPointData(), triangle[0], opnt++);
triangulated->GetPoints()->InsertNextPoint(idp->GetPoint(triangle[1]));
triangulated->GetPointData()->CopyData(idp->GetPointData(), triangle[1], opnt++);
triangulated->GetPoints()->InsertNextPoint(idp->GetPoint(triangle[2]));
triangulated->GetPointData()->CopyData(idp->GetPointData(), triangle[2], opnt++);
}
}
vtkpiston::CopyToGPU(triangulated, od);
......
......@@ -145,9 +145,9 @@ int vtkPistonAlgorithm::RequestUpdateExtent(
//----------------------------------------------------------------------------
int vtkPistonAlgorithm::RequestData(
vtkInformation* request,
vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed( inputVector ),
vtkInformationVector* outputVector)
vtkInformationVector* vtkNotUsed(outputVector))
{
// do nothing let subclasses handle it
return 1;
......
......@@ -45,7 +45,7 @@ void vtkPistonContour::PrintSelf(ostream& os, vtkIndent indent)
}
//----------------------------------------------------------------------------
int vtkPistonContour::RequestData(vtkInformation *request,
int vtkPistonContour::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
......
......@@ -49,12 +49,12 @@ struct color_map : thrust::unary_function<ValueType, float3>
float *table;
const int numberOfChanels;
color_map(float *table, int arrSize, int noOfChanels,
color_map(float *rtable, int arrSize, int noOfChanels,
ValueType rMin, ValueType rMax) :
min(rMin),
max(rMax),
size((arrSize / noOfChanels) - 1),
table(table),
table(rtable),
numberOfChanels(noOfChanels)
{
}
......
......@@ -83,7 +83,7 @@ int vtkPistonSlice::ComputePipelineMTime(
}
//----------------------------------------------------------------------------
int vtkPistonSlice::RequestData(vtkInformation *request,
int vtkPistonSlice::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
......
......@@ -32,7 +32,7 @@ void vtkPistonSort::PrintSelf(ostream& os, vtkIndent indent)
}
//----------------------------------------------------------------------------
int vtkPistonSort::RequestData(vtkInformation *request,
int vtkPistonSort::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
......
......@@ -47,7 +47,7 @@ void vtkPistonThreshold::PrintSelf(ostream& os, vtkIndent indent)
}
//------------------------------------------------------------------------------
int vtkPistonThreshold::RequestData(vtkInformation *request,
int vtkPistonThreshold::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
......
......@@ -72,7 +72,7 @@ vtkDataSet* vtkPistonToDataSet::GetDataSetOutput(int port)
//----------------------------------------------------------------------------
int vtkPistonToDataSet::RequestDataObject(
vtkInformation* vtkNotUsed(request),
vtkInformationVector** inputVector ,
vtkInformationVector** vtkNotUsed(inputVector),
vtkInformationVector* outputVector)
{
const char *outTypeStr =
......@@ -103,7 +103,7 @@ int vtkPistonToDataSet::RequestDataObject(
}
//------------------------------------------------------------------------------
int vtkPistonToDataSet::RequestData(vtkInformation *request,
int vtkPistonToDataSet::RequestData(vtkInformation *vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
......
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