VTK  9.0.1
vtkPolyDataMapperNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataMapperNode.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkPolyDataMapperNode_h
25 #define vtkPolyDataMapperNode_h
26 
27 #include "vtkMapperNode.h"
28 #include "vtkRenderingSceneGraphModule.h" // For export macro
29 
30 #include <vector> //for results
31 
32 class vtkActor;
33 class vtkPolyDataMapper;
34 class vtkPolyData;
35 
36 class VTKRENDERINGSCENEGRAPH_EXPORT vtkPolyDataMapperNode : public vtkMapperNode
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  typedef struct
44  {
45  std::vector<unsigned int> vertex_index;
46  std::vector<unsigned int> vertex_reverse;
47  std::vector<unsigned int> line_index;
48  std::vector<unsigned int> line_reverse;
49  std::vector<unsigned int> triangle_index;
50  std::vector<unsigned int> triangle_reverse;
51  std::vector<unsigned int> strip_index;
52  std::vector<unsigned int> strip_reverse;
54 
55 protected:
58 
59  // Utilities for children
64  static void TransformPoints(vtkActor* act, vtkPolyData* poly, std::vector<double>& vertices);
65 
72  static void MakeConnectivity(vtkPolyData* poly, int representation, vtkPDConnectivity& conn);
73 
74 private:
76  void operator=(const vtkPolyDataMapperNode&) = delete;
77 };
78 
79 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkViewNode specialized for vtkMappers
Definition: vtkMapperNode.h:36
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:85
std::vector< unsigned int > triangle_reverse
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)