 |
VTK
9.0.1
|
Go to the documentation of this file.
21 #ifndef vtkOpenGLPolyDataMapper_h
22 #define vtkOpenGLPolyDataMapper_h
28 #include "vtkRenderingOpenGL2Module.h"
79 vtkGetMacro(PopulateSelectionSettings,
int);
102 vtkSetStringMacro(PointIdArrayName);
103 vtkGetStringMacro(PointIdArrayName);
104 vtkSetStringMacro(CellIdArrayName);
105 vtkGetStringMacro(CellIdArrayName);
114 vtkSetStringMacro(ProcessIdArrayName);
115 vtkGetStringMacro(ProcessIdArrayName);
128 vtkSetStringMacro(CompositeIdArrayName);
129 vtkGetStringMacro(CompositeIdArrayName);
132 #ifndef VTK_LEGACY_REMOVE
210 int fieldAssociation,
int componentno = -1)
override;
218 int fieldAssociation,
int componentno = -1)
override;
243 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
244 const char* texturename,
int fieldAssociation,
int componentno);
296 std::map<vtkShader::Type, vtkShader*> shaders,
vtkRenderer* ren,
vtkActor* act,
bool prePass);
298 std::map<vtkShader::Type, vtkShader*> shaders,
vtkActor* act);
439 std::vector<unsigned char>& colors, std::vector<float>& normals,
vtkPolyData* pd,
467 #ifndef VTK_LEGACY_REMOVE
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
vtkStateStorage TempState
vtkNew< vtkOpenGLCellToVTKCellMap > CellCellMap
virtual void ReplaceShaderCustomUniforms(std::map< vtkShader::Type, vtkShader * > shaders, vtkActor *act)
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.
virtual void SetFragmentShaderCode(const char *code)
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.
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 SetVertexShaderCode(const char *code)
Allow the program to set the shader codes used directly instead of using the built in templates.
virtual void ReplaceShaderLight(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
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()
void SetVBOShiftScaleMethod(int m)
A convenience method for enabling/disabling the VBO's shift+scale transform.
vtkStateStorage VBOBuildState
virtual char * GetFragmentShaderCode()
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)
virtual char * GetGeometryShaderCode()
vtkStateStorage IBOBuildState
virtual void ReplaceShaderPositionVC(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
virtual void SetGeometryShaderCode(const char *code)
@ PrimitiveTriStripsEdges
vtkMTimeType GetRenderPassStageMTime(vtkActor *actor)
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 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
std::map< const vtkOpenGLHelper *, int > LastLightComplexity
virtual bool HaveTextures(vtkActor *actor)
std::string GetTextureCoordinateName(const char *tname)
virtual void ReplaceShaderClip(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
void ClearAllShaderReplacements(vtkShader::Type shaderType)
vtkTextureObject * CellNormalTexture
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.
std::map< const vtkOpenGLHelper *, vtkTimeStamp > LightComplexityChanged
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)
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
virtual char * GetVertexShaderCode()
vtkPolyData * CurrentInput
vtkOpenGLBufferObject * CellNormalBuffer
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)
bool DrawingEdgesOrVertices
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
Type
Available shader types.
void GetCoincidentParameters(vtkRenderer *ren, vtkActor *actor, float &factor, float &offset)
helper function to get the appropriate coincident params
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)
virtual bool HaveTCoords(vtkPolyData *poly)
virtual void ReplaceShaderNormal(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
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
void ShallowCopy(vtkAbstractMapper *m) override
Make a shallow copy of this mapper.
void MapDataArrayToMultiTextureAttribute(const char *tname, const char *dataArrayName, int fieldAssociation, int componentno=-1) override
vtkMatrix4x4 * TempMatrix4
void ClearAllShaderReplacements()
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.
vtkNew< vtkInformation > LastRenderPassInfo
unsigned int TimerQueryCounter
vtkStateStorage CellTextureBuildState
concrete dataset represents vertices, lines, polygons, and triangle strips
void ComputeBounds() override
Called in GetBounds().
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)
virtual void ReplaceShaderColor(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
virtual void RenderPieceStart(vtkRenderer *ren, vtkActor *act)
Implemented by sub classes.
vtkMatrix3x3 * TempMatrix3
virtual std::vector< std::pair< vtkTexture *, std::string > > GetTextures(vtkActor *actor)
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)
PolyDataMapper using OpenGL to render.
char * ProcessIdArrayName
vtkOpenGLBufferObject * CellScalarBuffer
bool DrawingTubesOrSpheres(vtkOpenGLHelper &cellBO, vtkActor *actor)
vtkSmartPointer< vtkOpenGLShaderProperty > LegacyShaderProperty
vtkTimeStamp SelectionStateChanged
std::map< const vtkOpenGLHelper *, int > LastLightCount
virtual void ReplaceShaderCoincidentOffset(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
abstract class specifies interface to map data
vtkTextureObject * CellScalarTexture
vtkTypeUInt32 vtkMTimeType