VTK  9.4.20250309
vtkArrayWeights.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
30#ifndef vtkArrayWeights_h
31#define vtkArrayWeights_h
32
33#include "vtkCommonCoreModule.h" // For export macro
34#include "vtkSystemIncludes.h"
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkArrayWeightsStorage; // pimpl
38
39class VTKCOMMONCORE_EXPORT vtkArrayWeights
40{
41public:
46
51
55 vtkArrayWeights(double i);
56
60 vtkArrayWeights(double i, double j);
61
65 vtkArrayWeights(double i, double j, double k);
66
70 vtkArrayWeights(double i, double j, double k, double l);
71
76
81
87 void SetCount(vtkIdType count);
88
93
97 const double& operator[](vtkIdType) const;
98
103
104protected:
105 vtkArrayWeightsStorage* Storage;
106};
107
108VTK_ABI_NAMESPACE_END
109#endif
110
111// VTK-HeaderTest-Exclude: vtkArrayWeights.h
Stores a collection of weighting factors.
vtkArrayWeights(double i, double j, double k, double l)
Create a collection containing four weights.
vtkArrayWeightsStorage * Storage
vtkArrayWeights(double i, double j, double k)
Create a collection containing three weights.
void SetCount(vtkIdType count)
Sets the number of weights stored in this container.
vtkArrayWeights & operator=(const vtkArrayWeights &other)
Assignment operator.
~vtkArrayWeights()
Destructor.
vtkArrayWeights()
Create an empty collection of weights.
const double & operator[](vtkIdType) const
Accesses the i-th weight in the collection.
vtkIdType GetCount() const
Returns the number of weights stored in this container.
vtkArrayWeights(double i, double j)
Create a collection containing two weights.
vtkArrayWeights(double i)
Create a collection containing one weight.
vtkArrayWeights(const vtkArrayWeights &other)
Copy the weights from another object.
double & operator[](vtkIdType)
Accesses the i-th weight in the collection.
int vtkIdType
Definition vtkType.h:332