VTK  9.3.0
vtkGenericVertexAttributeMapping.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkGenericVertexAttributeMapping_h
17 #define vtkGenericVertexAttributeMapping_h
18 
19 #include "vtkObject.h"
20 #include "vtkRenderingCoreModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKRENDERINGCORE_EXPORT vtkGenericVertexAttributeMapping : public vtkObject
24 {
25 public:
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
35  void AddMapping(
36  const char* attributeName, const char* arrayName, int fieldAssociation, int component);
37 
44  void AddMapping(int unit, const char* arrayName, int fieldAssociation, int component);
45 
49  bool RemoveMapping(const char* attributeName);
50 
55 
59  unsigned int GetNumberOfMappings();
60 
64  const char* GetAttributeName(unsigned int index);
65 
69  const char* GetArrayName(unsigned int index);
70 
74  int GetFieldAssociation(unsigned int index);
75 
79  int GetComponent(unsigned int index);
80 
84  int GetTextureUnit(unsigned int index);
85 
86 protected:
89 
90 private:
92  void operator=(const vtkGenericVertexAttributeMapping&) = delete;
93 
94  class vtkInternal;
95  vtkInternal* Internal;
96 };
97 
98 VTK_ABI_NAMESPACE_END
99 #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:29
abstract base class for most VTK objects
Definition: vtkObject.h:52
@ component
Definition: vtkX3D.h:175
@ index
Definition: vtkX3D.h:246