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

Method UpdateGridLineVisibility

Rendering/Annotation/vtkCubeAxesActor.cxx:2307–2347  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2305
2306//------------------------------------------------------------------------------
2307void vtkCubeAxesActor::UpdateGridLineVisibility(int idx)
2308{
2309 if (this->GridLineLocation != VTK_GRID_LINES_ALL &&
2310 (this->DrawXGridlines || this->DrawYGridlines || this->DrawZGridlines))
2311 {
2312 for (int i = 0; i < NUMBER_OF_ALIGNED_AXIS; ++i)
2313 {
2314 this->XAxes[i]->SetDrawGridlines(false);
2315 this->YAxes[i]->SetDrawGridlines(false);
2316 this->ZAxes[i]->SetDrawGridlines(false);
2317 this->XAxes[i]->SetDrawGridlinesOnly(false);
2318 this->YAxes[i]->SetDrawGridlinesOnly(false);
2319 this->ZAxes[i]->SetDrawGridlinesOnly(false);
2320 }
2321
2322 this->XAxes[vtkCubeAxesActorTriads[idx][0]]->SetDrawGridlines(this->DrawXGridlines);
2323 this->YAxes[vtkCubeAxesActorTriads[idx][1]]->SetDrawGridlines(this->DrawYGridlines);
2324 this->ZAxes[vtkCubeAxesActorTriads[idx][2]]->SetDrawGridlines(this->DrawZGridlines);
2325
2326 // Update axis render list
2327 int id = 0;
2328 if (this->NumberOfAxesX == 1)
2329 {
2330 id = this->RenderAxesX[this->NumberOfAxesX] = vtkCubeAxesActorTriads[idx][0];
2331 this->XAxes[id]->SetDrawGridlinesOnly(this->RenderAxesX[0] != id);
2332 this->NumberOfAxesX += (this->RenderAxesX[0] != id) ? 1 : 0;
2333 }
2334 if (this->NumberOfAxesY == 1)
2335 {
2336 id = this->RenderAxesY[this->NumberOfAxesY] = vtkCubeAxesActorTriads[idx][1];
2337 this->YAxes[id]->SetDrawGridlinesOnly(this->RenderAxesY[0] != id);
2338 this->NumberOfAxesY += (this->RenderAxesY[0] != id) ? 1 : 0;
2339 }
2340 if (this->NumberOfAxesZ == 1)
2341 {
2342 id = this->RenderAxesZ[this->NumberOfAxesZ] = vtkCubeAxesActorTriads[idx][2];
2343 this->ZAxes[id]->SetDrawGridlinesOnly(this->RenderAxesZ[0] != id);
2344 this->NumberOfAxesZ += (this->RenderAxesZ[0] != id) ? 1 : 0;
2345 }
2346 }
2347}
2348
2349//------------------------------------------------------------------------------
2350int vtkCubeAxesActor::FindClosestAxisIndex(double pts[8][3])

Callers 1

DetermineRenderAxesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected