VTK: Common/Core/vtkArrayWeights.h Source File

| VTK 9.3.1

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
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkArrayWeightsStorage; // pimpl
38
39 class VTKCOMMONCORE_EXPORT vtkArrayWeights
40 {
41 public:
45 vtkArrayWeights();
46
50 vtkArrayWeights(const vtkArrayWeights& other);
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
75 ~vtkArrayWeights();
76
80 vtkIdType GetCount() const;
81
87 void SetCount(vtkIdType count);
88
92 double& operator[](vtkIdType);
93
97 const double& operator[](vtkIdType) const;
98
102 vtkArrayWeights& operator=(const vtkArrayWeights& other);
103
104 protected:
105 vtkArrayWeightsStorage* Storage;
106 };
107
108 VTK_ABI_NAMESPACE_END
109 #endif
110
111 // VTK-HeaderTest-Exclude: vtkArrayWeights.h
vtkArrayWeights
Stores a collection of weighting factors.
Definition: vtkArrayWeights.h:40
vtkArrayWeights::vtkArrayWeights
vtkArrayWeights(double i, double j, double k, double l)
Create a collection containing four weights.
vtkArrayWeights::Storage
vtkArrayWeightsStorage * Storage
Definition: vtkArrayWeights.h:105
vtkArrayWeights::vtkArrayWeights
vtkArrayWeights(double i, double j, double k)
Create a collection containing three weights.
vtkArrayWeights::SetCount
void SetCount(vtkIdType count)
Sets the number of weights stored in this container.
vtkArrayWeights::~vtkArrayWeights
~vtkArrayWeights()
Destructor.
vtkArrayWeights::vtkArrayWeights
vtkArrayWeights()
Create an empty collection of weights.
vtkArrayWeights::operator[]
const double & operator[](vtkIdType) const
Accesses the i-th weight in the collection.
vtkArrayWeights::operator[]
double & operator[](vtkIdType)
Accesses the i-th weight in the collection.
vtkArrayWeights::GetCount
vtkIdType GetCount() const
Returns the number of weights stored in this container.
vtkArrayWeights::vtkArrayWeights
vtkArrayWeights(double i, double j)
Create a collection containing two weights.
vtkArrayWeights::vtkArrayWeights
vtkArrayWeights(double i)
Create a collection containing one weight.
vtkArrayWeights::vtkArrayWeights
vtkArrayWeights(const vtkArrayWeights &other)
Copy the weights from another object.
vtkArrayWeights::operator=
vtkArrayWeights & operator=(const vtkArrayWeights &other)
Assignment operator.
vtkSystemIncludes.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315