VTK  9.4.20241221
vtkOpenGLSphereMapper.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
11#ifndef vtkOpenGLSphereMapper_h
12#define vtkOpenGLSphereMapper_h
13
15#include "vtkRenderingOpenGL2Module.h" // For export macro
16
17VTK_ABI_NAMESPACE_BEGIN
18class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLSphereMapper : public vtkOpenGLPolyDataMapper
19{
20public:
23 void PrintSelf(ostream& os, vtkIndent indent) override;
24
26
29 vtkSetStringMacro(ScaleArray);
31
33
37 vtkSetMacro(Radius, float);
38 vtkGetMacro(Radius, float);
39
43 void Render(vtkRenderer* ren, vtkActor* act) override;
44
49 // void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel,
50 // int propid, vtkProp *prop) override;
51
52protected:
55
60 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
61
66 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
67
72
77
78 const char* ScaleArray;
79
83 void BuildBufferObjects(vtkRenderer* ren, vtkActor* act) override;
84
85 void RenderPieceDraw(vtkRenderer* ren, vtkActor* act) override;
86
87 virtual void CreateVBO(vtkPolyData* poly, vtkIdType numPts, unsigned char* colors,
88 int colorComponents, vtkIdType nc, float* sizes, vtkIdType ns, vtkRenderer* ren);
89
90 // used for transparency
91 bool Invert;
92 float Radius;
93
94private:
96 void operator=(const vtkOpenGLSphereMapper&) = delete;
97};
98
99VTK_ABI_NAMESPACE_END
100#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
a simple class to control print indentation
Definition vtkIndent.h:108
PolyDataMapper using OpenGL to render.
draw spheres using imposters
virtual void CreateVBO(vtkPolyData *poly, vtkIdType numPts, unsigned char *colors, int colorComponents, vtkIdType nc, float *sizes, vtkIdType ns, vtkRenderer *ren)
This value will be used for the radius is the scale array is not provided.
void BuildBufferObjects(vtkRenderer *ren, vtkActor *act) override
Update the VBO to contain point based values.
const char * ScaleArray
This value will be used for the radius is the scale array is not provided.
float Radius
This value will be used for the radius is the scale array is not provided.
bool Invert
This value will be used for the radius is the scale array is not provided.
~vtkOpenGLSphereMapper() override
This value will be used for the radius is the scale array is not provided.
void GetShaderTemplate(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Create the basic shaders before replacement.
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (twice when transparent)
vtkOpenGLSphereMapper()
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
static vtkOpenGLSphereMapper * New()
void RenderPieceDraw(vtkRenderer *ren, vtkActor *act) override
This value will be used for the radius is the scale array is not provided.
void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) override
Set the shader parameters related to the Camera.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) override
Set the shader parameters related to the actor/mapper.
void ReplaceShaderValues(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act) override
Perform string replacements on the shader templates.
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract specification for renderers
int vtkIdType
Definition vtkType.h:315