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

Merge branch 'RenameBooleanOperation-rel' into release

Change-Id: I8254a4b4315d09cc1d29ab28d14b3d68e77bf6a2
parents e06e6531 d856f10a
......@@ -63,17 +63,17 @@ int TestBooleanOperationPolyDataFilter(int, char *[])
renWinInteractor->SetRenderWindow( renWin );
vtkActor *unionActor =
GetBooleanOperationActor( -2.0, vtkBooleanOperationPolyDataFilter::UNION );
GetBooleanOperationActor( -2.0, vtkBooleanOperationPolyDataFilter::VTK_UNION );
renderer->AddActor( unionActor );
unionActor->Delete();
vtkActor *intersectionActor =
GetBooleanOperationActor( 0.0, vtkBooleanOperationPolyDataFilter::INTERSECTION );
GetBooleanOperationActor( 0.0, vtkBooleanOperationPolyDataFilter::VTK_INTERSECTION );
renderer->AddActor( intersectionActor );
intersectionActor->Delete();
vtkActor *differenceActor =
GetBooleanOperationActor( 2.0, vtkBooleanOperationPolyDataFilter::DIFFERENCE );
GetBooleanOperationActor( 2.0, vtkBooleanOperationPolyDataFilter::VTK_DIFFERENCE );
renderer->AddActor( differenceActor );
differenceActor->Delete();
......
......@@ -62,12 +62,12 @@ static vtkActor* GetBooleanOperationActor( double x, int operation )
( 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, "Distance" );
thresh2->SetInputConnection( distance->GetOutputPort( 1 ) );
if ( operation == vtkBooleanOperationPolyDataFilter::UNION )
if ( operation == vtkBooleanOperationPolyDataFilter::VTK_UNION )
{
thresh1->ThresholdByUpper( 0.0 );
thresh2->ThresholdByUpper( 0.0 );
}
else if ( operation == vtkBooleanOperationPolyDataFilter::INTERSECTION )
else if ( operation == vtkBooleanOperationPolyDataFilter::VTK_INTERSECTION )
{
thresh1->ThresholdByLower( 0.0 );
thresh2->ThresholdByLower( 0.0 );
......@@ -132,17 +132,17 @@ int TestBooleanOperationPolyDataFilter2(int, char *[])
renWinInteractor->SetRenderWindow( renWin );
vtkActor *unionActor =
GetBooleanOperationActor( -2.0, vtkBooleanOperationPolyDataFilter::UNION );
GetBooleanOperationActor( -2.0, vtkBooleanOperationPolyDataFilter::VTK_UNION );
renderer->AddActor( unionActor );
unionActor->Delete();
vtkActor *intersectionActor =
GetBooleanOperationActor( 0.0, vtkBooleanOperationPolyDataFilter::INTERSECTION );
GetBooleanOperationActor( 0.0, vtkBooleanOperationPolyDataFilter::VTK_INTERSECTION );
renderer->AddActor( intersectionActor );
intersectionActor->Delete();
vtkActor *differenceActor =
GetBooleanOperationActor( 2.0, vtkBooleanOperationPolyDataFilter::DIFFERENCE );
GetBooleanOperationActor( 2.0, vtkBooleanOperationPolyDataFilter::VTK_DIFFERENCE );
renderer->AddActor( differenceActor );
differenceActor->Delete();
......
......@@ -33,7 +33,7 @@ vtkBooleanOperationPolyDataFilter::vtkBooleanOperationPolyDataFilter() :
vtkPolyDataAlgorithm()
{
this->Tolerance = 1e-6;
this->Operation = UNION;
this->Operation = VTK_UNION;
this->ReorientDifferenceCells = 1;
this->SetNumberOfInputPorts(2);
......@@ -155,12 +155,12 @@ int vtkBooleanOperationPolyDataFilter::RequestData(vtkInformation* vtkNot
outputSurface->GetPointData()->CopyAllocate(pointFields);
outputSurface->GetCellData()->CopyAllocate(cellFields);
if ( this->Operation == UNION || this->Operation == DIFFERENCE )
if ( this->Operation == VTK_UNION || this->Operation == VTK_DIFFERENCE )
{
this->CopyCells(pd0, outputSurface, 0, pointFields, cellFields, unionList,
false);
}
else if ( this->Operation == INTERSECTION )
else if ( this->Operation == VTK_INTERSECTION )
{
this->CopyCells(pd0, outputSurface, 0, pointFields, cellFields, interList,
false);
......@@ -192,16 +192,16 @@ int vtkBooleanOperationPolyDataFilter::RequestData(vtkInformation* vtkNot
this->SortPolyData(pd1, interList, unionList);
if ( this->Operation == UNION )
if ( this->Operation == VTK_UNION )
{
this->CopyCells(pd1, outputSurface, 1, pointFields, cellFields, unionList,
false);
}
else if ( this->Operation == INTERSECTION || this->Operation == DIFFERENCE )
else if ( this->Operation == VTK_INTERSECTION || this->Operation == VTK_DIFFERENCE )
{
this->CopyCells(pd1, outputSurface, 1, pointFields, cellFields, interList,
(this->ReorientDifferenceCells == 1 &&
this->Operation == DIFFERENCE));
this->Operation == VTK_DIFFERENCE));
}
vtkIdType i;
......@@ -238,15 +238,15 @@ void vtkBooleanOperationPolyDataFilter::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "Operation: ";
switch ( this->Operation )
{
case UNION:
case VTK_UNION:
os << "UNION";
break;
case INTERSECTION:
case VTK_INTERSECTION:
os << "INTERSECTION";
break;
case DIFFERENCE:
case VTK_DIFFERENCE:
os << "DIFFERENCE";
break;
}
......
......@@ -52,21 +52,21 @@ public:
enum OperationType
{
UNION=0,
INTERSECTION,
DIFFERENCE
VTK_UNION=0,
VTK_INTERSECTION,
VTK_DIFFERENCE
};
// Description:
// Set the boolean operation to perform. Defaults to union.
vtkSetClampMacro( Operation, int, UNION, DIFFERENCE );
vtkSetClampMacro( Operation, int, VTK_UNION, VTK_DIFFERENCE );
vtkGetMacro( Operation, int );
void SetOperationToUnion()
{ this->SetOperation( UNION ); }
{ this->SetOperation( VTK_UNION ); }
void SetOperationToIntersection()
{ this->SetOperation( INTERSECTION ); }
{ this->SetOperation( VTK_INTERSECTION ); }
void SetOperationToDifference()
{ this->SetOperation( DIFFERENCE ); }
{ this->SetOperation( VTK_DIFFERENCE ); }
// Description:
// Turn on/off cell reorientation of the intersection portion of the
......@@ -112,7 +112,8 @@ private:
double Tolerance;
// Description:
// Which operation to perform. Can be UNION, INTERSECTION, or DIFFERENCE.
// Which operation to perform.
// Can be VTK_UNION, VTK_INTERSECTION, or VTK_DIFFERENCE.
int Operation;
// Description:
......
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