Commit a53d8df0 authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Fix streamline line source position.

parent afd5aa56
......@@ -164,7 +164,7 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
d->streamtracer->SetSourceData(d->source_data);
d->streamtracer->SetIntegrationDirectionToBoth();
d->streamtracer->SetIntegratorTypeToRungeKutta45();
d->streamtracer->SetIntegratorTypeToRungeKutta4();
d->streamtracer->SetIntegrationStepUnit(vtkStreamTracer::Units::CELL_LENGTH_UNIT);
d->streamtracer->SetInitialIntegrationStep(0.2);
d->streamtracer->SetMinimumIntegrationStep(0.01);
......@@ -218,7 +218,7 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
d->cb_integrator_type->addItem(QStringLiteral("RK2"));
d->cb_integrator_type->addItem(QStringLiteral("RK4"));
d->cb_integrator_type->addItem(QStringLiteral("RK45"));
d->cb_integrator_type->setCurrentIndex(0);
d->cb_integrator_type->setCurrentIndex(1);
d->cb_source_type = new QComboBox;
d->cb_source_type->addItem(QStringLiteral("Line"));
......@@ -226,17 +226,17 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
d->cb_source_type->setCurrentIndex(1);
d->sp_resolution = new QSpinBox;
d->sp_resolution->setMaximum(1000);
d->sp_resolution->setMaximum(10000);
d->sp_resolution->setValue(50);
d->sp_resolution->setKeyboardTracking(false);
d->sp_integrator_max_steps = new QSpinBox;
d->sp_integrator_max_steps->setMaximum(999999);
d->sp_integrator_max_steps->setMaximum(99999999);
d->sp_integrator_max_steps->setValue(2000);
d->sp_integrator_max_steps->setKeyboardTracking(false);
d->sp_integrator_max_lengths = new QDoubleSpinBox;
d->sp_integrator_max_lengths->setMaximum(9999999);
d->sp_integrator_max_lengths->setMaximum(999999999);
d->sp_integrator_max_lengths->setValue(20);
d->sp_integrator_max_lengths->setKeyboardTracking(false);
......@@ -285,15 +285,11 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
if (text == "Sphere") {
d->source_line_widget->SetEnabled(false);
d->source_sphere_widget->SetEnabled(true);
d->source_sphere->GetPolyData(d->source_data);
} else {
d->source_sphere_widget->SetEnabled(false);
d->source_line_widget->SetEnabled(true);
d->source_line->GetPolyData(d->source_data);
}
d->streamtracer->SetSourceData(d->source_data);
d->streamtracer->Modified();
this->touch();
this->draw();
});
......@@ -390,8 +386,9 @@ void dtkVisualizationDecoratorVectorStreamTracer::setData(const QVariant& data)
double center[3];
dataset->GetBounds(bounds);
dataset->GetCenter(center);
double pos1[3]; pos1[0] = bounds[0]; pos1[1] = bounds[1]; pos1[2] = bounds[2];
double pos2[3]; pos2[0] = bounds[3]; pos2[1] = bounds[4]; pos2[2] = bounds[5];
double pos1[3]; pos1[0] = bounds[0]; pos1[1] = bounds[2]; pos1[2] = bounds[4];
double pos2[3]; pos2[0] = bounds[1]; pos2[1] = bounds[3]; pos2[2] = bounds[5];
vtkBoundingBox box;
box.SetBounds(bounds);
d->sp_integrator_max_lengths->blockSignals(true);
......
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