VTK  9.4.20241103
vtkGLSLModCoincidentTopology.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
8#ifndef vtkGLSLModCoincidentTopology_h
9#define vtkGLSLModCoincidentTopology_h
10
11#include "vtkGLSLModifierBase.h"
12
13#include "vtkMatrix3x3.h" // for ivar
14#include "vtkMatrix4x4.h" // for ivar
15#include "vtkRenderingOpenGL2Module.h" // for export macro
16#include "vtkWeakPointer.h" // for ivar
17
18VTK_ABI_NAMESPACE_BEGIN
19class vtkActor;
21class vtkMapper;
22
23class VTKRENDERINGOPENGL2_EXPORT vtkGLSLModCoincidentTopology : public vtkGLSLModifierBase
24{
25public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
30 // vtkGLSLModifierBase virtuals:
31 bool ReplaceShaderValues(vtkOpenGLRenderer* renderer, std::string& vertexShader,
32 std::string& tessControlShader, std::string& tessEvalShader, std::string& geometryShader,
33 std::string& fragmentShader, vtkAbstractMapper* mapper, vtkActor* actor) override;
35 vtkAbstractMapper* mapper, vtkActor* actor, vtkOpenGLVertexArrayObject* VAO = nullptr) override;
36 bool IsUpToDate(vtkOpenGLRenderer* vtkNotUsed(renderer), vtkAbstractMapper* vtkNotUsed(mapper),
37 vtkActor* vtkNotUsed(actor)) override
38 {
39 // always up to date, because once replacements were handled, there is no need to remove them
40 return true;
41 }
42
43protected:
46
48 vtkOpenGLRenderer* ren, vtkMapper* mapper, vtkActor* actor, float& factor, float& offset);
49
50 bool ReplacementsDone = false;
51
52private:
54 void operator=(const vtkGLSLModCoincidentTopology&) = delete;
55};
56
57VTK_ABI_NAMESPACE_END
58#endif
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
~vtkGLSLModCoincidentTopology() override
bool ReplaceShaderValues(vtkOpenGLRenderer *renderer, std::string &vertexShader, std::string &tessControlShader, std::string &tessEvalShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkActor *actor) override
Abstract interfaces to replace shader values and apply parameters as uniform values.
bool SetShaderParameters(vtkOpenGLRenderer *renderer, vtkShaderProgram *program, vtkAbstractMapper *mapper, vtkActor *actor, vtkOpenGLVertexArrayObject *VAO=nullptr) override
void GetCoincidentParameters(vtkOpenGLRenderer *ren, vtkMapper *mapper, vtkActor *actor, float &factor, float &offset)
bool IsUpToDate(vtkOpenGLRenderer *vtkNotUsed(renderer), vtkAbstractMapper *vtkNotUsed(mapper), vtkActor *vtkNotUsed(actor)) override
static vtkGLSLModCoincidentTopology * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Abstract class that helps you develop modifier for VTK GLSL shaders.
a simple class to control print indentation
Definition vtkIndent.h:108
Key for vtkObjectBase values.
abstract class specifies interface to map data to graphics primitives
Definition vtkMapper.h:137
OpenGL renderer.
The VertexArrayObject class uses, or emulates, vertex array objects.
The ShaderProgram uses one or more Shader objects.