/usr/include/paraview/vtkMaterialInterfacePieceLoading.h is in paraview-dev 5.0.1+dfsg1-4.
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 | /*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile$
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.
=========================================================================*/
// .NAME vtkMaterialInterfacePieceLoading
// .SECTION Description
// Data structure that describes a fragment's loading.
// Holds its id and its loading factor.
#ifndef vtkMaterialInterfacePieceLoading_h
#define vtkMaterialInterfacePieceLoading_h
#include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
#include "vtkSystemIncludes.h"
#include <cassert>
#include "vtkType.h"
#include <vector>
#include <iostream>
class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkMaterialInterfacePieceLoading
{
public:
enum {ID=0,LOADING=1,SIZE=2};
vtkMaterialInterfacePieceLoading(){ this->Initialize(-1,0); }
~vtkMaterialInterfacePieceLoading(){ this->Initialize(-1,0); }
void Initialize(int id, vtkIdType loading)
{
this->Data[ID]=id;
this->Data[LOADING]=loading;
}
// Description:
// Place into a buffer (id, loading)
void Pack(vtkIdType *buf)
{
buf[ID]=this->Data[ID];
buf[LOADING]=this->Data[LOADING];
}
// Description:
// Initialize from a buffer (id, loading)
void UnPack(vtkIdType *buf)
{
this->Data[ID]=buf[ID];
this->Data[LOADING]=buf[LOADING];
}
// Description:
// Set/Get
vtkIdType GetId() const{ return this->Data[ID]; }
vtkIdType GetLoading() const{ return this->Data[LOADING]; }
void SetLoading(vtkIdType loading){ this->Data[LOADING]=loading; }
// Description:
// Adds to laoding and returns the updated loading.
vtkIdType UpdateLoading(vtkIdType update)
{
assert("Update would make loading negative."
&& (this->Data[LOADING]+update)>=0);
return this->Data[LOADING]+=update;
}
// Description:
// Comparision are made by id.
bool operator<(const vtkMaterialInterfacePieceLoading &other) const
{
return this->Data[ID]<other.Data[ID];
}
bool operator==(const vtkMaterialInterfacePieceLoading &other) const
{
return this->Data[ID]==other.Data[ID];
}
private:
vtkIdType Data[SIZE];
};
VTKPVVTKEXTENSIONSDEFAULT_EXPORT
std::ostream &operator<<(std::ostream &sout, const vtkMaterialInterfacePieceLoading &fp);
VTKPVVTKEXTENSIONSDEFAULT_EXPORT
void PrintPieceLoadingHistogram(std::vector<std::vector<vtkIdType> > &pla);
#endif
// VTK-HeaderTest-Exclude: vtkMaterialInterfacePieceLoading.h
|