VTK  9.7.1
vtkOpenGLLabeledContourMapper.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
10 #ifndef vtkOpenGLLabeledContourMapper_h
11 #define vtkOpenGLLabeledContourMapper_h
12 
14 #include "vtkRenderingOpenGL2Module.h" // For export macro
15 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
16 
17 VTK_ABI_NAMESPACE_BEGIN
18 class vtkMatrix4x4;
19 class vtkOpenGLHelper;
21 
22 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLLabeledContourMapper
24 {
25 public:
28  static vtkOverrideAttribute* CreateOverrideAttributes();
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
35  void ReleaseGraphicsResources(vtkWindow* win) override;
36 
37 protected:
40 
41  // We override this for compatibility with the OpenGL backend:
42  // The old backend pushes actor matrices onto the matrix stack, so the text
43  // actors already accounted for any transformations on this mapper's actor.
44  // The new backend passes each actor's matrix to the shader individually, and
45  // this mapper's actor matrix doesn't affect the label rendering.
46  bool CreateLabels(vtkActor* actor) override;
47 
48  bool ApplyStencil(vtkRenderer* ren, vtkActor* act) override;
49  bool RemoveStencil(vtkRenderer* ren) override;
50 
53 
54 private:
56  void operator=(const vtkOpenGLLabeledContourMapper&) = delete;
57 };
58 
59 #define vtkOpenGLLabeledContourMapper_OVERRIDE_ATTRIBUTES \
60  vtkOpenGLLabeledContourMapper::CreateOverrideAttributes()
61 VTK_ABI_NAMESPACE_END
62 #endif
Attribute for vtkObjectFactory overrides.
vtkOpenGLLabeledContourMapper is an override for vtkLabeledContourMapper that implements stenciling u...
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
virtual bool ApplyStencil(vtkRenderer *ren, vtkActor *act)
abstract specification for renderers
Definition: vtkRenderer.h:63
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Draw labeled isolines.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
virtual bool RemoveStencil(vtkRenderer *ren)
a simple class to control print indentation
Definition: vtkIndent.h:28
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
#define VTK_NEWINSTANCE
static vtkLabeledContourMapper * New()
#define VTK_MARSHALAUTO
virtual bool CreateLabels(vtkActor *actor)