VTK  9.7.1
vtkLODActor.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
47 #ifndef vtkLODActor_h
48 #define vtkLODActor_h
49 
50 #include "vtkActor.h"
51 #include "vtkRenderingLODModule.h" // For export macro
52 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
53 
54 VTK_ABI_NAMESPACE_BEGIN
55 class vtkMapper;
58 class vtkPolyDataMapper;
59 class vtkRenderer;
60 class vtkViewport;
61 class vtkWindow;
62 
63 class VTKRENDERINGLOD_EXPORT VTK_MARSHALAUTO vtkLODActor : public vtkActor
64 {
65 public:
66  vtkTypeMacro(vtkLODActor, vtkActor);
67  void PrintSelf(ostream& os, vtkIndent indent) override;
68 
74  static vtkLODActor* New();
75 
80  void Render(vtkRenderer*, vtkMapper*) override;
81 
87  void ReleaseGraphicsResources(vtkWindow*) override;
88 
93  void AddLODMapper(vtkMapper* mapper);
94 
96 
102  virtual void SetLowResFilter(vtkPolyDataAlgorithm*);
104  virtual void SetMediumResFilter(vtkPolyDataAlgorithm*);
106  vtkGetObjectMacro(LowResFilter, vtkPolyDataAlgorithm);
108  vtkGetObjectMacro(MediumResFilter, vtkPolyDataAlgorithm);
110 
112 
115  vtkGetMacro(NumberOfCloudPoints, int);
116  vtkSetMacro(NumberOfCloudPoints, int);
118 
120 
124  vtkGetObjectMacro(LODMappers, vtkMapperCollection);
126 
130  void Modified() override;
131 
135  void ShallowCopy(vtkProp* prop) override;
136 
137 protected:
138  vtkLODActor();
139  ~vtkLODActor() override;
140 
141  vtkActor* Device;
142  vtkMapperCollection* LODMappers;
143 
144  // We can create our own LOD filters. The default is to use a
145  //
146  vtkPolyDataAlgorithm* LowResFilter;
147  vtkPolyDataAlgorithm* MediumResFilter;
148  vtkPolyDataMapper* LowMapper;
149  vtkPolyDataMapper* MediumMapper;
150 
151  vtkTimeStamp BuildTime;
152  int NumberOfCloudPoints;
153 
154  virtual void CreateOwnLODs();
155  virtual void UpdateOwnLODs();
156  virtual void DeleteOwnLODs();
157 
158 private:
159  vtkLODActor(const vtkLODActor&) = delete;
160  void operator=(const vtkLODActor&) = delete;
161 };
162 
163 VTK_ABI_NAMESPACE_END
164 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
an ordered list of mappers
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:83
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
an actor that supports multiple levels of detail
Definition: vtkLODActor.h:63
abstract specification for Viewports
Definition: vtkViewport.h:46
record modification and/or execution time
Definition: vtkTimeStamp.h:24
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:63
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:77
#define VTK_MARSHALEXCLUDE(reason)
map vtkPolyData to graphics primitives
#define VTK_MARSHALAUTO
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED