VTK  9.7.1
vtkAxisGridActorInternal.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkAxisGridActorInternal_h
14 #define vtkAxisGridActorInternal_h
15 
16 #include "vtkActor2D.h"
17 
18 #include "vtkNew.h" // for vtkNew
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkCellArray;
22 class vtkDoubleArray;
23 class vtkPoints;
24 class vtkPolyData;
25 class vtkPolyDataMapper;
27 
29 {
30 public:
32  static vtkAxisGridActorInternal* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
48 
52  int RenderOpaqueGeometry(vtkViewport*) override;
53 
54 protected:
56  ~vtkAxisGridActorInternal() override;
57 
58 private:
59  vtkNew<vtkPolyData> PolyData;
60  vtkNew<vtkPoints> PolyDataPoints;
61  vtkNew<vtkCellArray> PolyDataLines;
62  vtkNew<vtkPolyDataMapper2D> GridMapper;
63 
64  vtkPoints* XTicksStart = nullptr;
65  vtkPoints* YTicksStart = nullptr;
66  vtkPoints* XTicksEnd = nullptr;
67  vtkPoints* YTicksEnd = nullptr;
68 
73  void BuildGrid();
74 
75  void operator=(const vtkAxisGridActorInternal&) = delete;
77 };
78 
79 VTK_ABI_NAMESPACE_END
80 #endif
int RenderOpaqueGeometry(vtkViewport *) override
Build grid and render.
static vtkAxisGridActorInternal * New()
abstract specification for Viewports
Definition: vtkViewport.h:46
renders a 2D grid given pairs of point positions
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a actor that draws 2D data
Definition: vtkActor2D.h:35
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
void SetVerticalLinesBottomPoints(vtkPoints *points)
Set the point positions used to draw horizontal and vertical lines.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetHorizontalLinesRightPoints(vtkPoints *points)
Set the point positions used to draw horizontal and vertical lines.
~vtkAxisGridActorInternal() override
map vtkPolyData to graphics primitives
object to represent cell connectivity
Definition: vtkCellArray.h:177
void SetVerticalLinesTopPoints(vtkPoints *points)
Set the point positions used to draw horizontal and vertical lines.
void SetHorizontalLinesLeftPoints(vtkPoints *points)
Set the point positions used to draw horizontal and vertical lines.
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:30