Commit 810456ef authored by LE BRETON Come's avatar LE BRETON Come

Avoids useless calculus.

parent 4c3dd7a8
......@@ -192,11 +192,9 @@ void dtkVisualizationDecoratorScalarGlyphs::setData(const QVariant& data)
vtkSmartPointer<vtkColorTransferFunction> color_function = vtkSmartPointer<vtkColorTransferFunction>::New();
QColor black = QColor(0., 0., 0., 255);
double node = 0. * range[1] + (1. - 0.) * range[0];
color_function->AddRGBPoint(node, black.red(), black.green(), black.blue());
color_function->AddRGBPoint(range[0], black.red(), black.green(), black.blue());
QColor white = QColor(1., 1., 1., 255);
node = 1. * range[1] + (1. - 1.) * range[0];
color_function->AddRGBPoint(node, white.red(), white.green(), white.blue());
color_function->AddRGBPoint(range[1], white.red(), white.green(), white.blue());
color_function->Build();
d->color_transfer_functions[field_name] = color_function;
......
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