VTK  9.7.1
vtkPolyDataMaterial.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
12 #ifndef vtkPolyDataMaterial_h
13 #define vtkPolyDataMaterial_h
14 
15 #include "vtkCommonDataModelModule.h" // For export macro
16 #include "vtkObject.h"
17 #include "vtkSetGet.h" // For vtkTypeMacro
18 #include <vector> // for std::vector
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkDataObject;
22 
40 class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataMaterial : public vtkObject
41 {
42 public:
44  static vtkPolyDataMaterial* New();
45 
47 
51  static const char* GetTextureURIName() { return "texture_uri"; }
52  static const char* GetDiffuseColorName() { return "diffuse_color"; }
53  static const char* GetSpecularColorName() { return "specular_color"; }
54  static const char* GetTransparencyName() { return "transparency"; }
59  static const char* GetShininessName() { return "shininess"; }
61 
63 
68  static void SetField(vtkDataObject* obj, const char* name, const char* value);
69  static void SetField(
70  vtkDataObject* obj, const char* name, const std::vector<std::string>& values);
74  static std::vector<std::string> GetField(vtkDataObject* obj, const char* name);
76 
78 
83  static void SetField(
84  vtkDataObject* obj, const char* name, double* value, vtkIdType numberOfComponents);
88  static std::vector<double> GetField(
89  vtkDataObject* obj, const char* name, const std::vector<double>& defaultValue);
91 
92  void PrintSelf(ostream& os, vtkIndent indent) override;
93 
94 protected:
95  vtkPolyDataMaterial() = default;
96 
97 private:
99  void operator=(const vtkPolyDataMaterial&) = delete;
100 };
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition: vtkType.h:363
static const char * GetTextureURIName()
Names for fields stored in the vtkPolyData.
a simple class to control print indentation
Definition: vtkIndent.h:28
static const char * GetShininessName()
Field between 0 (matte, large highlight) and 1 (highly glossy, small/sharp highlight) ...
static const char * GetDiffuseColorName()
Names for fields stored in the vtkPolyData.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
general representation of visualization data
Definition: vtkDataObject.h:55
static const char * GetTransparencyName()
Names for fields stored in the vtkPolyData.
If the polydata has a texture, it should contain a TCOORDS point array of type float/double (with two...
static const char * GetSpecularColorName()
Names for fields stored in the vtkPolyData.