VTK  9.0.3
vtkGenericVertexAttributeMapping.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericVertexAttributeMapping.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkGenericVertexAttributeMapping_h
29 #define vtkGenericVertexAttributeMapping_h
30 
31 #include "vtkObject.h"
32 #include "vtkRenderingCoreModule.h" // For export macro
33 
34 class VTKRENDERINGCORE_EXPORT vtkGenericVertexAttributeMapping : public vtkObject
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
46  void AddMapping(
47  const char* attributeName, const char* arrayName, int fieldAssociation, int component);
48 
55  void AddMapping(int unit, const char* arrayName, int fieldAssociation, int component);
56 
60  bool RemoveMapping(const char* attributeName);
61 
66 
70  unsigned int GetNumberOfMappings();
71 
75  const char* GetAttributeName(unsigned int index);
76 
80  const char* GetArrayName(unsigned int index);
81 
85  int GetFieldAssociation(unsigned int index);
86 
90  int GetComponent(unsigned int index);
91 
95  int GetTextureUnit(unsigned int index);
96 
97 protected:
100 
101 private:
103  void operator=(const vtkGenericVertexAttributeMapping&) = delete;
104 
105  class vtkInternal;
106  vtkInternal* Internal;
107 };
108 
109 #endif
stores mapping for data arrays to generic vertex attributes.
const char * GetArrayName(unsigned int index)
Get the array name at the given index.
bool RemoveMapping(const char *attributeName)
Remove a vertex attribute mapping.
int GetComponent(unsigned int index)
Get the component no.
void AddMapping(const char *attributeName, const char *arrayName, int fieldAssociation, int component)
Select a data array from the point/cell data and map it to a generic vertex attribute.
int GetFieldAssociation(unsigned int index)
Get the field association at the given index.
const char * GetAttributeName(unsigned int index)
Get the attribute name at the given index.
unsigned int GetNumberOfMappings()
Get number of mappings.
void AddMapping(int unit, const char *arrayName, int fieldAssociation, int component)
Select a data array and use it as multitexture texture coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetTextureUnit(unsigned int index)
Get the component no.
void RemoveAllMappings()
Remove all mappings.
static vtkGenericVertexAttributeMapping * New()
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:54
@ component
Definition: vtkX3D.h:181
@ index
Definition: vtkX3D.h:252