/usr/include/vtk-7.1/vtkAssignAttribute.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkAssignAttribute.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkAssignAttribute
* @brief Labels/marks a field as an attribute
*
* vtkAssignAttribute is used to label/mark a field (vtkDataArray) as an attribute.
* A field name or an attribute to labeled can be specified. For example:
* @verbatim
* aa->Assign("foo", vtkDataSetAttributes::SCALARS,
* vtkAssignAttribute::POINT_DATA);
* @endverbatim
* tells vtkAssignAttribute to make the array in the point data called
* "foo" the active scalars. On the other hand,
* @verbatim
* aa->Assign(vtkDataSetAttributes::VECTORS, vtkDataSetAttributes::SCALARS,
* vtkAssignAttribute::POINT_DATA);
* @endverbatim
* tells vtkAssignAttribute to make the active vectors also the active
* scalars. The same can be done more easily from Tcl by using the Assign()
* method which takes strings:
* @verbatim
* aa Assign "foo" SCALARS POINT_DATA
* or
* aa Assign SCALARS VECTORS POINT_DATA
*
* AttributeTypes: SCALARS, VECTORS, NORMALS, TCOORDS, TENSORS
* Attribute locations: POINT_DATA, CELL_DATA
* @endverbatim
*
* @warning
* When using Tcl, Java, Python or Visual Basic bindings, the array name
* can not be one of the AttributeTypes when calling Assign() which takes
* strings as arguments. The Tcl (Java etc.) command will
* always assume the string corresponds to an attribute type when
* the argument is one of the AttributeTypes. In this situation,
* use the Assign() which takes enums.
*
* @sa
* vtkFieldData vtkDataSet vtkDataObjectToDataSetFilter
* vtkDataSetAttributes vtkDataArray vtkRearrangeFields
* vtkSplitField vtkMergeFields
*/
#ifndef vtkAssignAttribute_h
#define vtkAssignAttribute_h
#include "vtkFiltersCoreModule.h" // For export macro
#include "vtkPassInputTypeAlgorithm.h"
#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
class vtkFieldData;
class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
{
public:
vtkTypeMacro(vtkAssignAttribute,vtkPassInputTypeAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Create a new vtkAssignAttribute.
*/
static vtkAssignAttribute *New();
/**
* Label an attribute as another attribute.
*/
void Assign(int inputAttributeType, int attributeType, int attributeLoc);
/**
* Label an array as an attribute.
*/
void Assign(const char* fieldName, int attributeType, int attributeLoc);
/**
* Helper method used by other language bindings. Allows the caller to
* specify arguments as strings instead of enums.
*/
void Assign(const char* name, const char* attributeType,
const char* attributeLoc);
// Always keep NUM_ATTRIBUTE_LOCS as the last entry
enum AttributeLocation
{
POINT_DATA=0,
CELL_DATA=1,
VERTEX_DATA=2,
EDGE_DATA=3,
NUM_ATTRIBUTE_LOCS
};
protected:
enum FieldType
{
NAME,
ATTRIBUTE
};
vtkAssignAttribute();
~vtkAssignAttribute() VTK_OVERRIDE;
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
char* FieldName;
int FieldTypeAssignment;
int AttributeType;
int InputAttributeType;
int AttributeLocationAssignment;
static char AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12];
static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20];
private:
vtkAssignAttribute(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
void operator=(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
};
#endif
|