VTK  9.3.20240425
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
22VTK_ABI_NAMESPACE_BEGIN
23class VTKRENDERINGCORE_EXPORT vtkGenericVertexAttributeMapping : public vtkObject
24{
25public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
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
86protected:
89
90private:
92 void operator=(const vtkGenericVertexAttributeMapping&) = delete;
93
94 class vtkInternal;
95 vtkInternal* Internal;
96};
97
98VTK_ABI_NAMESPACE_END
99#endif
stores mapping for data arrays to generic vertex attributes.
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.
static vtkGenericVertexAttributeMapping * New()
int GetFieldAssociation(unsigned int index)
Get the field association at the given index.
unsigned int GetNumberOfMappings()
Get number of mappings.
const char * GetAttributeName(unsigned int index)
Get the attribute name at the given index.
const char * GetArrayName(unsigned int index)
Get the array name at the given index.
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.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162