 |
VTK
9.1.0
|
Go to the documentation of this file.
116 #ifndef vtkOpenGLPolyDataMapper_h
117 #define vtkOpenGLPolyDataMapper_h
124 #include "vtkRenderingOpenGL2Module.h"
176 vtkGetMacro(PopulateSelectionSettings,
int);
199 vtkSetStringMacro(PointIdArrayName);
200 vtkGetStringMacro(PointIdArrayName);
201 vtkSetStringMacro(CellIdArrayName);
202 vtkGetStringMacro(CellIdArrayName);
211 vtkSetStringMacro(ProcessIdArrayName);
212 vtkGetStringMacro(ProcessIdArrayName);
225 vtkSetStringMacro(CompositeIdArrayName);
226 vtkGetStringMacro(CompositeIdArrayName);
242 const std::
string& originalValue,
244 const std::
string& replacementValue,
bool replaceAll);
247 const std::
string& originalValue,
bool replaceFirst);
251 void ClearAllShaderReplacements();
264 virtual
void SetVertexShaderCode(const
char* code);
266 virtual
char* GetVertexShaderCode();
268 virtual
void SetFragmentShaderCode(const
char* code);
270 virtual
char* GetFragmentShaderCode();
272 virtual
void SetGeometryShaderCode(const
char* code);
274 virtual
char* GetGeometryShaderCode();
288 virtual
void SetVBOShiftScaleMethod(
int m);
289 virtual
int GetVBOShiftScaleMethod() {
return this->ShiftScaleMethod; }
306 vtkGetMacro(PauseShiftScale,
bool);
307 vtkBooleanMacro(PauseShiftScale,
bool);
332 int fieldAssociation,
int componentno = -1)
override;
340 int fieldAssociation,
int componentno = -1)
override;
365 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
366 const char* texturename,
int fieldAssociation,
int componentno);
421 std::map<vtkShader::Type, vtkShader*> shaders,
vtkRenderer* ren,
vtkActor* act,
bool prePass);
423 std::map<vtkShader::Type, vtkShader*> shaders,
vtkActor* act);
514 bool DrawingSelection =
false;
518 std::map<std::tuple<unsigned int, unsigned int, vtkIdType>, std::vector<vtkIdType>>
521 bool SelectionCacheForPoints =
false;
598 std::vector<unsigned char>& colors, std::vector<float>& normals,
vtkPolyData* pd,
660 unsigned int processId,
unsigned int compositeIndex,
vtkIdType selectedId);
662 unsigned int processId,
unsigned int compositeIndex,
vtkIdType selectedId);
map vtkPolyData to graphics primitives
represent and manipulate 3D points
virtual void BuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Build the VBO/IBO, called by UpdateBufferObjects.
represent GPU shader properties
char * CompositeIdArrayName
bool ForceTextureCoordinates
void AddPointIdsToSelectionPrimitives(vtkPolyData *poly, const char *arrayName, unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId)
vtkStateStorage TempState
virtual void BuildSelectionIBO(vtkPolyData *poly, std::vector< unsigned int >(&indices)[4], vtkIdType offset)
Build the selection IBO, called by UpdateBufferObjects.
vtkNew< vtkOpenGLCellToVTKCellMap > CellCellMap
vtkOpenGLBufferObject * EdgeBuffer
virtual void ReplaceShaderCustomUniforms(std::map< vtkShader::Type, vtkShader * > shaders, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
int GetOpenGLMode(int representation, int primType)
virtual void BuildCellTextures(vtkRenderer *ren, vtkActor *, vtkCellArray *prims[4], int representation)
Class to make storing and comparing state quick and easy.
bool DrawingSpheres(vtkOpenGLHelper &cellBO, vtkActor *actor)
virtual void ReplaceShaderRenderPass(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act, bool prePass)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
std::string SelectionCacheName
void SetPopulateSelectionSettings(int v)
virtual void ReplaceShaderValues(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates.
virtual void UpdateShaders(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Make sure appropriate shaders are defined, compiled and bound.
virtual void ReplaceShaderLight(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void RemoveAllVertexAttributeMappings() override
Remove all vertex attributes.
virtual void BuildIBO(vtkRenderer *ren, vtkActor *act, vtkPolyData *poly)
Build the IBO, called by BuildBufferObjects.
virtual void UpdateMaximumPointCellIds(vtkRenderer *ren, vtkActor *actor)
record modification and/or execution time
vtkOpenGLShaderProperty * GetLegacyShaderProperty()
std::map< std::tuple< unsigned int, unsigned int, vtkIdType >, std::vector< vtkIdType > > SelectionCache
virtual bool DrawingEdges(vtkRenderer *, vtkActor *)
vtkStateStorage VBOBuildState
virtual bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Does the VBO/IBO need to be rebuilt.
static vtkOpenGLPolyDataMapper * New()
void RemoveVertexAttributeMapping(const char *vertexAttributeName) override
Remove a vertex attribute mapping.
virtual void RenderPieceDraw(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
vtkStateStorage IBOBuildState
virtual void ReplaceShaderPositionVC(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
vtkNew< vtkMatrix4x4 > VBOShiftScale
virtual void SetLightingShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to lighting, called by UpdateShader.
bool DrawingTubes(vtkOpenGLHelper &cellBO, vtkActor *actor)
represent and manipulate 3x3 transformation matrices
~vtkOpenGLPolyDataMapper() override
OpenGL rendering utility functions.
virtual void ReplaceShaderEdges(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void BuildShaders(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Build the shader source code, called by UpdateShader.
virtual void GetShaderTemplate(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Create the basic shaders before replacement.
void MapDataArrayToVertexAttribute(const char *vertexAttributeName, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
Select a data array from the point/cell data and map it to a generic vertex attribute.
window superclass for vtkRenderWindow
virtual bool HaveTextures(vtkActor *actor)
std::string GetTextureCoordinateName(const char *tname)
vtkTimeStamp LightComplexityChanged
virtual void ReplaceShaderClip(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
vtkTextureObject * CellNormalTexture
vtkNew< vtkInformation > LastRenderPassInfo
virtual void SetCustomUniforms(vtkOpenGLHelper &cellBO, vtkActor *actor)
Set the value of user-defined uniform variables, called by UpdateShader.
Asynchronously measures GPU execution time for a single event.
vtkOpenGLHelper * LastBoundBO
handles properties associated with a texture map
virtual void SetPropertyShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to the property, called by UpdateShader.
virtual void ReplaceShaderPicking(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
std::map< std::string, ExtraAttributeValue > ExtraAttributes
virtual void UpdateBufferObjects(vtkRenderer *ren, vtkActor *act)
Update the VBO/IBO to be current.
vtkTimeStamp VBOBuildTime
manage vertex buffer objects shared within a mapper
vtkPolyData * CurrentInput
vtkOpenGLBufferObject * CellNormalBuffer
virtual void BuildSelectionCache(const char *arrayName, bool selectingPoints, vtkPolyData *poly)
Build the selection cache, used to map value ids to indices values.
int GetPointPickingPrimitiveSize(int primType)
represents an object (geometry & properties) in a rendered scene
a simple class to control print indentation
abstracts an OpenGL texture object.
represent and manipulate 4x4 transformation matrices
virtual void ReplaceShaderDepth(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to the Camera, called by UpdateShader.
object to represent cell connectivity
void GetCoincidentParameters(vtkRenderer *ren, vtkActor *actor, float &factor, float &offset)
helper function to get the appropriate coincident params
#define VTK_DEPRECATED_IN_9_0_0(reason)
Vertex or Fragment shader, combined into a ShaderProgram.
virtual bool HaveWideLines(vtkRenderer *, vtkActor *)
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
vtkNew< vtkTransform > VBOInverseTransform
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
int PopulateSelectionSettings
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void ReplaceShaderTCoord(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
void AddCellIdsToSelectionPrimitives(vtkPolyData *poly, const char *arrayName, unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId)
virtual bool HaveTCoords(vtkPolyData *poly)
virtual void ReplaceShaderNormal(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
std::map< const vtkOpenGLHelper *, primitiveInfo > PrimitiveInfo
void AppendCellTextures(vtkRenderer *ren, vtkActor *, vtkCellArray *prims[4], int representation, std::vector< unsigned char > &colors, std::vector< float > &normals, vtkPolyData *pd, vtkOpenGLCellToVTKCellMap *ccmap)
vtkOpenGLPolyDataMapper()
abstract superclass for all actors, volumes and annotations
vtkMTimeType GetRenderPassStageMTime(vtkActor *actor, const vtkOpenGLHelper *cellBO)
void MapDataArrayToMultiTextureAttribute(const char *tname, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
vtkMatrix4x4 * TempMatrix4
vtkOpenGLVertexBufferObjectGroup * VBOs
void RenderPiece(vtkRenderer *ren, vtkActor *act) override
Implemented by sub classes.
vtkOpenGLRenderTimer * TimerQuery
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLTexture * InternalColorTexture
abstract specification for renderers
void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel, std::vector< unsigned int > &pixeloffsets, vtkProp *prop) override
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
virtual void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameters related to the mapper/input data, called by UpdateShader.
unsigned int TimerQueryCounter
vtkStateStorage CellTextureBuildState
concrete dataset represents vertices, lines, polygons, and triangle strips
void ComputeBounds() override
Called in GetBounds().
virtual void SetPauseShiftScale(bool pauseShiftScale)
Pause per-render updates to VBO shift+scale parameters.
virtual bool GetNeedToRebuildShaders(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Does the shader source need to be recomputed.
virtual void ReplaceShaderPrimID(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void ReplaceShaderColor(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
virtual void RenderPieceStart(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
vtkMatrix3x3 * TempMatrix3
virtual std::vector< std::pair< vtkTexture *, std::string > > GetTextures(vtkActor *actor)
std::vector< unsigned char > EdgeValues
void MapDataArray(const char *vertexAttributeName, const char *dataArrayName, const char *texturename, int fieldAssociation, int componentno)
virtual unsigned int GetNumberOfTextures(vtkActor *actor)
virtual void RenderPieceFinish(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
PolyDataMapper using OpenGL to render.
char * ProcessIdArrayName
vtkOpenGLBufferObject * CellScalarBuffer
bool DrawingTubesOrSpheres(vtkOpenGLHelper &cellBO, vtkActor *actor)
vtkSmartPointer< vtkOpenGLShaderProperty > LegacyShaderProperty
vtkTimeStamp SelectionStateChanged
virtual void ReplaceShaderCoincidentOffset(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates, called from ReplaceShaderValues.
abstract class specifies interface to map data
vtkTextureObject * CellScalarTexture
vtkTypeUInt32 vtkMTimeType
vtkTextureObject * EdgeTexture
virtual void UpdateCameraShiftScale(vtkRenderer *ren, vtkActor *actor)