VTK  9.1.0
vtkOpenGLSphereMapper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
22#ifndef vtkOpenGLSphereMapper_h
23#define vtkOpenGLSphereMapper_h
24
26#include "vtkRenderingOpenGL2Module.h" // For export macro
27
28class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLSphereMapper : public vtkOpenGLPolyDataMapper
29{
30public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
36
39 vtkSetStringMacro(ScaleArray);
41
43
47 vtkSetMacro(Radius, float);
48 vtkGetMacro(Radius, float);
49
53 void Render(vtkRenderer* ren, vtkActor* act) override;
54
59 // void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel,
60 // int propid, vtkProp *prop) override;
61
62protected:
65
70 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
71
76 std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
77
82
87
88 const char* ScaleArray;
89
93 void BuildBufferObjects(vtkRenderer* ren, vtkActor* act) override;
94
95 void RenderPieceDraw(vtkRenderer* ren, vtkActor* act) override;
96
97 virtual void CreateVBO(vtkPolyData* poly, vtkIdType numPts, unsigned char* colors,
98 int colorComponents, vtkIdType nc, float* sizes, vtkIdType ns, vtkRenderer* ren);
99
100 // used for transparency
101 bool Invert;
102 float Radius;
103
104private:
106 void operator=(const vtkOpenGLSphereMapper&) = delete;
107};
108
109#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
a simple class to control print indentation
Definition: vtkIndent.h:113
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
Definition: vtkPolyData.h:195
abstract specification for renderers
Definition: vtkRenderer.h:173
int vtkIdType
Definition: vtkType.h:332