VTK
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 "vtkRenderingCoreModule.h" // For export macro
32#include "vtkObject.h"
33
34class VTKRENDERINGCORE_EXPORT vtkGenericVertexAttributeMapping : public vtkObject
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent);
40
46 void AddMapping(const char* attributeName, const char* arrayName,
47 int fieldAssociation, int component);
48
56 int unit, const char* arrayName, int fieldAssociation,
57 int component);
58
62 bool RemoveMapping(const char* attributeName);
63
68
72 unsigned int GetNumberOfMappings();
73
77 const char* GetAttributeName(unsigned int index);
78
82 const char* GetArrayName(unsigned int index);
83
87 int GetFieldAssociation(unsigned int index);
88
92 int GetComponent(unsigned int index);
93
97 int GetTextureUnit(unsigned int index);
98
99protected:
102
103private:
105 void operator=(const vtkGenericVertexAttributeMapping&) VTK_DELETE_FUNCTION;
106
107 class vtkInternal;
108 vtkInternal* Internal;
109
110};
111
112#endif
113
114
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 mapppings.
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.
int GetTextureUnit(unsigned int index)
Get the component no.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void RemoveAllMappings()
Remove all mappings.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
@ component
Definition: vtkX3D.h:175
@ index
Definition: vtkX3D.h:246