VTK  9.3.20240328
vtkPolyDataMapperNode.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
12 #ifndef vtkPolyDataMapperNode_h
13 #define vtkPolyDataMapperNode_h
14 
15 #include "vtkMapperNode.h"
16 #include "vtkRenderingSceneGraphModule.h" // For export macro
17 
18 #include <vector> //for results
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkActor;
22 class vtkPolyDataMapper;
23 class vtkPolyData;
24 
25 class VTKRENDERINGSCENEGRAPH_EXPORT vtkPolyDataMapperNode : public vtkMapperNode
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33  {
34  std::vector<unsigned int> vertex_index;
35  std::vector<unsigned int> vertex_reverse;
36  std::vector<unsigned int> line_index;
37  std::vector<unsigned int> line_reverse;
38  std::vector<unsigned int> triangle_index;
39  std::vector<unsigned int> triangle_reverse;
40  std::vector<unsigned int> strip_index;
41  std::vector<unsigned int> strip_reverse;
42  };
44 
45 protected:
48 
49  // Utilities for children
54  static void TransformPoints(vtkActor* act, vtkPolyData* poly, std::vector<double>& vertices);
55 
62  static void MakeConnectivity(vtkPolyData* poly, int representation, vtkPDConnectivity& conn);
63 
64 private:
66  void operator=(const vtkPolyDataMapperNode&) = delete;
67 };
68 
69 VTK_ABI_NAMESPACE_END
70 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:150
a simple class to control print indentation
Definition: vtkIndent.h:108
vtkViewNode specialized for vtkMappers
Definition: vtkMapperNode.h:28
vtkViewNode specialized for vtkPolyDataMappers
static void TransformPoints(vtkActor *act, vtkPolyData *poly, std::vector< double > &vertices)
Makes a cleaned up version of the polydata's geometry in which NaN are removed (substituted with neig...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkPolyDataMapperNode * New()
static void MakeConnectivity(vtkPolyData *poly, int representation, vtkPDConnectivity &conn)
Homogenizes the entire polydata using internal CreateXIndexBuffer functions.
~vtkPolyDataMapperNode() override
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)