MCPcopy Create free account
hub / github.com/Kitware/VTK / SetNonDependentAttributes

Method SetNonDependentAttributes

Rendering/Annotation/vtkCubeAxesActor.cxx:1372–1458  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Sends attributes to each vtkAxisActor. Only sets those that are not dependent upon viewport changes, and thus do not need to be set very often.

Source from the content-addressed store, hash-verified

1370// not dependent upon viewport changes, and thus do not need to be set
1371// very often.
1372void vtkCubeAxesActor::SetNonDependentAttributes()
1373{
1374 vtkProperty* prop = this->GetProperty();
1375 prop->SetAmbient(1.0);
1376 prop->SetDiffuse(0.0);
1377
1378 // Make sure our Axis Base is normalized
1379 vtkMath::Normalize(this->AxisBaseForX);
1380 vtkMath::Normalize(this->AxisBaseForY);
1381 vtkMath::Normalize(this->AxisBaseForZ);
1382
1383 // Manage custom grid visibility location if FLY and STATIC axis
1384 int gridLocationBasedOnAxis =
1385 (this->GridLineLocation == VTK_GRID_LINES_ALL) ? VTK_GRID_LINES_ALL : VTK_GRID_LINES_CLOSEST;
1386
1387 for (int i = 0; i < NUMBER_OF_ALIGNED_AXIS; i++)
1388 {
1389 this->XAxes[i]->SetAxisPosition(i);
1390 this->XAxes[i]->SetAxisBaseForX(this->AxisBaseForX);
1391 this->XAxes[i]->SetAxisBaseForY(this->AxisBaseForY);
1392 this->XAxes[i]->SetAxisBaseForZ(this->AxisBaseForZ);
1393 this->XAxes[i]->SetCamera(this->Camera);
1394 this->XAxes[i]->SetProperty(prop);
1395 this->XAxes[i]->SetTitleTextProperty(this->TitleTextProperty[0]);
1396 this->XAxes[i]->SetLabelTextProperty(this->LabelTextProperty[0]);
1397 this->XAxes[i]->SetAxisLinesProperty(this->XAxesLinesProperty);
1398 this->XAxes[i]->SetGridlinesProperty(this->XAxesGridlinesProperty);
1399 this->XAxes[i]->SetGridpolysProperty(this->XAxesGridpolysProperty);
1400 this->XAxes[i]->SetTickLocation(this->TickLocation);
1401 this->XAxes[i]->SetDrawGridlines(this->DrawXGridlines);
1402 this->XAxes[i]->SetDrawGridlinesLocation(gridLocationBasedOnAxis);
1403 this->XAxes[i]->SetDrawInnerGridlines(this->DrawXInnerGridlines);
1404 this->XAxes[i]->SetDrawGridpolys(this->DrawXGridpolys);
1405 this->XAxes[i]->SetBounds(this->Bounds);
1406 this->XAxes[i]->SetAxisVisibility(this->XAxisVisibility);
1407 this->XAxes[i]->SetLabelVisibility(this->XAxisLabelVisibility);
1408 this->XAxes[i]->SetTitleVisibility(this->XAxisLabelVisibility);
1409 this->XAxes[i]->SetTickVisibility(this->XAxisTickVisibility);
1410 this->XAxes[i]->SetMinorTicksVisible(this->XAxisMinorTickVisibility);
1411
1412 this->YAxes[i]->SetAxisPosition(i);
1413 this->YAxes[i]->SetAxisBaseForX(this->AxisBaseForX);
1414 this->YAxes[i]->SetAxisBaseForY(this->AxisBaseForY);
1415 this->YAxes[i]->SetAxisBaseForZ(this->AxisBaseForZ);
1416 this->YAxes[i]->SetCamera(this->Camera);
1417 this->YAxes[i]->SetProperty(prop);
1418 this->YAxes[i]->SetTitleTextProperty(this->TitleTextProperty[1]);
1419 this->YAxes[i]->SetLabelTextProperty(this->LabelTextProperty[1]);
1420 this->YAxes[i]->SetAxisLinesProperty(this->YAxesLinesProperty);
1421 this->YAxes[i]->SetGridlinesProperty(this->YAxesGridlinesProperty);
1422 this->YAxes[i]->SetGridpolysProperty(this->YAxesGridpolysProperty);
1423 this->YAxes[i]->SetTickLocation(this->TickLocation);
1424 this->YAxes[i]->SetDrawGridlines(this->DrawYGridlines);
1425 this->YAxes[i]->SetDrawGridlinesLocation(gridLocationBasedOnAxis);
1426 this->YAxes[i]->SetDrawInnerGridlines(this->DrawYInnerGridlines);
1427 this->YAxes[i]->SetDrawGridpolys(this->DrawYGridpolys);
1428 this->YAxes[i]->SetBounds(this->Bounds);
1429 this->YAxes[i]->SetAxisVisibility(this->YAxisVisibility);

Callers 1

BuildAxesMethod · 0.95

Calls 13

SetAxisLinesPropertyMethod · 0.80
SetGridlinesPropertyMethod · 0.80
SetGridpolysPropertyMethod · 0.80
SetLabelVisibilityMethod · 0.80
NormalizeFunction · 0.50
GetPropertyMethod · 0.45
SetAmbientMethod · 0.45
SetDiffuseMethod · 0.45
SetCameraMethod · 0.45
SetPropertyMethod · 0.45
SetTitleTextPropertyMethod · 0.45
SetLabelTextPropertyMethod · 0.45

Tested by

no test coverage detected