VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filters
Core
vtkCenterOfMass.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCenterOfMass.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
30
#ifndef __vtkCenterOfMass_h
31
#define __vtkCenterOfMass_h
32
33
#include "vtkFiltersCoreModule.h"
// For export macro
34
#include "
vtkPointSetAlgorithm.h
"
35
36
class
vtkPoints
;
37
class
vtkDataArray
;
38
39
class
VTKFILTERSCORE_EXPORT
vtkCenterOfMass
:
public
vtkPointSetAlgorithm
40
{
41
public
:
42
static
vtkCenterOfMass
*
New
();
43
vtkTypeMacro(
vtkCenterOfMass
,
vtkPointSetAlgorithm
);
44
void
PrintSelf
(ostream& os,
vtkIndent
indent);
45
47
48
vtkSetVector3Macro(Center,
double
);
49
vtkGetVector3Macro(Center,
double
);
51
53
54
vtkSetMacro(UseScalarsAsWeights,
bool
);
55
vtkGetMacro(UseScalarsAsWeights,
bool
);
57
59
66
static
void
ComputeCenterOfMass(
67
vtkPoints
* input,
vtkDataArray
*scalars,
double
center
[3]);
69
70
protected
:
71
vtkCenterOfMass
();
72
73
int
RequestData
(
vtkInformation
* request,
74
vtkInformationVector
** inputVector,
75
vtkInformationVector
* outputVector );
76
77
private
:
78
79
vtkCenterOfMass
(
const
vtkCenterOfMass
&);
// Not implemented.
80
void
operator=(
const
vtkCenterOfMass
&);
// Not implemented.
81
82
bool
UseScalarsAsWeights;
83
double
Center[3];
84
};
85
86
#endif
Generated on Thu May 24 2012 22:22:13 for VTK by
1.8.1