VTK  9.1.0
vtkArrayWeights.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkArrayWeights.h
5
6-------------------------------------------------------------------------
7 Copyright 2008 Sandia Corporation.
8 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 the U.S. Government retains certain rights in this software.
10-------------------------------------------------------------------------
11
12 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13 All rights reserved.
14 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15
16 This software is distributed WITHOUT ANY WARRANTY; without even
17 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 PURPOSE. See the above copyright notice for more information.
19
20=========================================================================*/
21
44#ifndef vtkArrayWeights_h
45#define vtkArrayWeights_h
46
47#include "vtkCommonCoreModule.h" // For export macro
48#include "vtkSystemIncludes.h"
49
50class vtkArrayWeightsStorage; // pimpl
51
52class VTKCOMMONCORE_EXPORT vtkArrayWeights
53{
54public:
59
64
68 vtkArrayWeights(double i);
69
73 vtkArrayWeights(double i, double j);
74
78 vtkArrayWeights(double i, double j, double k);
79
83 vtkArrayWeights(double i, double j, double k, double l);
84
89
94
100 void SetCount(vtkIdType count);
101
106
110 const double& operator[](vtkIdType) const;
111
116
117protected:
118 vtkArrayWeightsStorage* Storage;
119};
120
121#endif
122
123// 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