Commit f2411033 authored by David Gobbi's avatar David Gobbi

STYLE: make the constant match the method name

parent 37ad6b6e
......@@ -98,7 +98,7 @@ const char *vtkClipClosedSurface::GetScalarModeAsString()
case VTK_CCS_SCALAR_MODE_COLORS:
return "Colors";
break;
case VTK_CCS_SCALAR_MODE_CATEGORIES:
case VTK_CCS_SCALAR_MODE_LABELS:
return "Labels";
break;
}
......@@ -415,7 +415,7 @@ int vtkClipClosedSurface::RequestData(
this->CreateColorValues(this->BaseColor, this->ClipColor,
this->ActivePlaneColor, colors);
}
else if (this->ScalarMode == VTK_CCS_SCALAR_MODE_CATEGORIES)
else if (this->ScalarMode == VTK_CCS_SCALAR_MODE_LABELS)
{
colors[0][0] = 0;
colors[1][0] = 1;
......@@ -782,7 +782,7 @@ int vtkClipClosedSurface::RequestData(
scalars->SetName("Colors");
output->GetCellData()->SetScalars(scalars);
}
else if (this->ScalarMode == VTK_CCS_SCALAR_MODE_CATEGORIES)
else if (this->ScalarMode == VTK_CCS_SCALAR_MODE_LABELS)
{
// Don't use UNSIGNED_CHAR or they will look like color scalars
vtkSignedCharArray *categories = vtkSignedCharArray::New();
......
......@@ -53,7 +53,7 @@ class vtkCCSEdgeLocator;
enum {
VTK_CCS_SCALAR_MODE_NONE = 0,
VTK_CCS_SCALAR_MODE_COLORS = 1,
VTK_CCS_SCALAR_MODE_CATEGORIES = 2
VTK_CCS_SCALAR_MODE_LABELS = 2
};
class VTK_GRAPHICS_EXPORT vtkClipClosedSurface : public vtkPolyDataAlgorithm
......@@ -105,13 +105,13 @@ public:
// ActivePlane as set by the SetActivePlane() method. The default
// scalar mode is "None".
vtkSetClampMacro(ScalarMode, int,
VTK_CCS_SCALAR_MODE_NONE, VTK_CCS_SCALAR_MODE_CATEGORIES);
VTK_CCS_SCALAR_MODE_NONE, VTK_CCS_SCALAR_MODE_LABELS);
void SetScalarModeToNone() {
this->SetScalarMode(VTK_CCS_SCALAR_MODE_NONE); };
void SetScalarModeToColors() {
this->SetScalarMode(VTK_CCS_SCALAR_MODE_COLORS); };
void SetScalarModeToLabels() {
this->SetScalarMode(VTK_CCS_SCALAR_MODE_CATEGORIES); };
this->SetScalarMode(VTK_CCS_SCALAR_MODE_LABELS); };
vtkGetMacro(ScalarMode, int);
const char *GetScalarModeAsString();
......
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