14#ifndef vtkOpenGLLowMemoryPolyDataMapper_h
15#define vtkOpenGLLowMemoryPolyDataMapper_h
23#include "vtkRenderingOpenGL2Module.h"
31VTK_ABI_NAMESPACE_BEGIN
71 vtkGetMacro(PopulateSelectionSettings,
bool);
73 void SetPopulateSelectionSettings(
bool v) { this->PopulateSelectionSettings = v; }
125 void AddMod(
const std::string& className);
126 void AddMods(
const std::vector<std::string>& classNames);
142 int fieldAssociation,
int componentno = -1)
override;
150 int fieldAssociation,
int componentno = -1)
override;
199 void MapDataArray(
const char* vertexAttributeName,
const char* dataArrayName,
200 const char* texturename,
int fieldAssociation,
int componentno);
307 bool CanRender =
false;
308 bool UsesEdgeValueBuffer =
false;
309 bool UsesCellMapBuffer =
false;
325 std::unique_ptr<vtkOpenGLLowMemoryCellTypeAgent>
Agent;
330 bool DrawingVertices =
false;
331 bool HasColors =
false;
332 bool HasTangents =
false;
333 bool HasPointNormals =
false;
334 bool HasCellNormals =
false;
335 bool HasPointTextureCoordinates =
false;
340 bool ForceTextureCoordinates =
false;
346 bool PopulateSelectionSettings =
true;
347 bool PointPicking =
false;
355 bool HasAnisotropy =
false;
356 bool HasClearCoat =
false;
357 bool UsesNormalMap =
false;
358 bool UsesCoatNormalMap =
false;
359 bool UsesRotationMap =
false;
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
abstract superclass for arrays of numeric data
A base class for mappers or render responders that need to draw primitives via vertex-pulling.
@ Point
Send points to the shader.
a simple class to control print indentation
Allocate and hold a VTK object.
Helps vtkOpenGLLowMemoryPolyDataMapper map and draw cell types from vtkPolyData as OpenGL graphics pr...
Maps VTK_LINE and VTK_POLY_LINE into GL_LINES and draws GL_LINES or GL_POINTS.
PolyDataMapper using OpenGL to render surface meshes.
void InstallArrayTextureShaderDeclarations()
vtkSetStdStringFromCharMacro(ProcessIdArrayName)
If this class should override the process id using a data-array, set this variable to the name of the...
virtual void RenderPieceFinish(vtkRenderer *renderer, vtkActor *actor)
void AddMods(const std::vector< std::string > &classNames)
void ReplaceShaderSelection(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
vtkTimeStamp RenderTimeStamp
bool HaveTextures(vtkActor *actor)
void RemoveMod(const std::string &className)
void ReplaceShaderImplementationCustomUniforms(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
std::vector< vtkOpenGLShaderDeclaration > ShaderDecls
virtual bool IsShaderColorSourceUpToDate(vtkActor *actor)
virtual void UpdateShiftScale(vtkRenderer *renderer, vtkActor *actor)
void SetShaderParameters(vtkRenderer *renderer, vtkActor *actor)
void DeleteTextureBuffers()
vtkNew< vtkTransform > SSInverseTransform
std::vector< TextureInfo > GetTextures(vtkActor *actor)
void ReplaceShaderEdges(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
int GetCoordShiftAndScaleMethod()
std::pair< vtkTexture *, std::string > TextureInfo
void SetShiftValues(double x, double y, double z)
vtkSetStdStringFromCharMacro(PointIdArrayName)
By default, this class uses the dataset's point and cell ids during rendering.
ShaderColorSourceAttribute DetermineShaderColorSource(vtkPolyData *mesh)
void ReplaceShaderValues(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
void ReplaceShaderNormal(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
virtual void ReplaceShaderColor(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
virtual void UpdateShaders(vtkRenderer *renderer, vtkActor *actor)
std::array< double, 3 > ShiftValues
void SetVBOShiftScaleMethod(int method) override
A convenience method for enabling/disabling the VBO's shift+scale transform.
virtual void RenderPieceDraw(vtkRenderer *renderer, vtkActor *actor)
void ReplaceShaderTCoord(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
vtkGetCharFromStdStringMacro(ProcessIdArrayName)
If this class should override the process id using a data-array, set this variable to the name of the...
bool GetCoordShiftAndScaleEnabled()
vtkDataArray * GetColorTextureCoordinates(vtkPolyData *mesh)
bool IsShaderUpToDate(vtkRenderer *renderer, vtkActor *actor)
virtual bool BindArraysToTextureBuffers(vtkRenderer *renderer, vtkActor *actor, vtkCellGraphicsPrimitiveMap::CellTypeMapperOffsets &offsets)
void RemoveAllVertexAttributeMappings() override
Remove all vertex attributes.
void ReplaceShaderPosition(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
std::map< std::string, ExtraAttributeValue > ExtraAttributes
vtkGetCharFromStdStringMacro(PointIdArrayName)
By default, this class uses the dataset's point and cell ids during rendering.
vtkTimeStamp ShaderBuildTimeStamp
bool IsUpToDate(vtkRenderer *renderer, vtkActor *actor)
std::vector< std::string > ModNames
void ReplaceShaderWideLines(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
virtual vtkDataArray * GetColors(vtkPolyData *mesh)
vtkGetCharFromStdStringMacro(CompositeIdArrayName)
Generally, this class can render the composite id when iterating over composite datasets.
std::array< PrimitiveInformation, 4 > Primitives
static vtkOpenGLLowMemoryPolyDataMapper * New()
std::string ProcessIdArrayName
void SetScaleValues(double x, double y, double z)
void ComputeCameraBasedShiftScale(vtkRenderer *renderer, vtkActor *actor, vtkPolyData *mesh)
void RenderPiece(vtkRenderer *renderer, vtkActor *actor) override
Implemented by sub classes.
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.
void ComputeShiftScale(vtkRenderer *renderer, vtkActor *actor, vtkDataArray *arrays)
vtkSetStdStringFromCharMacro(CompositeIdArrayName)
Generally, this class can render the composite id when iterating over composite datasets.
virtual bool IsDataObjectUpToDate()
vtkDataArray * GetTextureCoordinates(vtkPolyData *mesh)
void UpdateGLSLMods(vtkRenderer *renderer, vtkActor *actor)
vtkDataArray * GetPointTangents(vtkPolyData *mesh)
vtkTimeStamp PBRStateTimeStamp
virtual bool IsShaderNormalSourceUpToDate(vtkActor *actor)
std::string CellIdArrayName
vtkGetCharFromStdStringMacro(CellIdArrayName)
By default, this class uses the dataset's point and cell ids during rendering.
void UpdatePBRStateCache(vtkRenderer *renderer, vtkActor *actor)
ShaderNormalSourceAttribute DetermineShaderNormalSource(vtkActor *actor, vtkPolyData *mesh)
bool CoordinateShiftAndScaleInUse
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
vtkTimeStamp SelectionStateTimeStamp
void ReplaceShaderPointSize(vtkRenderer *renderer, vtkActor *actor, std::string &vsSource, std::string &fsSource)
void UpdateMaximumPointCellIds(vtkRenderer *ren, vtkActor *actor)
std::pair< std::string, std::string > GetTextureCoordinateAndSamplerBufferNames(const char *tname)
vtkNew< vtkInformation > LastRenderPassInfo
std::set< std::string > ModNamesUnique
std::string PointIdArrayName
~vtkOpenGLLowMemoryPolyDataMapper() override
std::array< double, 3 > ScaleValues
vtkDataArray * GetCellNormals(vtkPolyData *mesh)
ShaderColorSourceAttribute
vtkNew< vtkMatrix4x4 > SSMatrix
void RemoveVertexAttributeMapping(const char *vertexAttributeName) override
Remove a vertex attribute mapping.
ShaderNormalSourceAttribute
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 RenderPieceStart(vtkRenderer *renderer, vtkActor *actor)
bool GetSupportsSelection() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
void ComputeShiftScaleTransform(vtkRenderer *renderer, vtkActor *actor)
unsigned int GetNumberOfTextures(vtkActor *actor)
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources associated with the window.
vtkOpenGLLowMemoryPolyDataMapper()
void MapDataArray(const char *vertexAttributeName, const char *dataArrayName, const char *texturename, int fieldAssociation, int componentno)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddMod(const std::string &className)
vtkSetStdStringFromCharMacro(CellIdArrayName)
By default, this class uses the dataset's point and cell ids during rendering.
vtkTimeStamp ShiftScaleTimeStamp
vtkDataArray * GetPointNormals(vtkPolyData *mesh)
std::string CompositeIdArrayName
virtual void ResetModsToDefault()
If you removed all mods, call this to go back to default setting.
static std::vector< std::string > DefaultModNames
MapperHashType GenerateHash(vtkPolyData *polydata) override
Unique hash based on availability of scalars, normals, tcoords, lookup tables and related attributes ...
Maps VTK_TRIANGLE and VTK_POLYGON into GL_TRIANGLES and draws GL_TRIANGLES or GL_LINES or GL_POINTS.
Maps VTK_VERTEX and VTK_POLY_VERTEX into GL_POINTS and draws GL_POINTS.
map vtkPolyData to graphics primitives
std::uintptr_t MapperHashType
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract superclass for all actors, volumes and annotations
abstract specification for renderers
record modification and/or execution time
window superclass for vtkRenderWindow
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALEXCLUDE(reason)