OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkPointLoad.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkPointLoad.h,v $
5   Language:  C++
6   Date:      $Date: 2002/08/05 17:29:13 $
7   Version:   $Revision: 1.36 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
13      This software is distributed WITHOUT ANY WARRANTY; without even 
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notice for more information.
16
17 =========================================================================*/
18 // .NAME vtkPointLoad - compute stress tensors given point load on semi-infinite domain
19 // .SECTION Description
20 // vtkPointLoad is a source object that computes stress tensors on a volume. 
21 // The tensors are computed from the application of a point load on a 
22 // semi-infinite domain. (The analytical results are adapted from Saada - see 
23 // text.) It also is possible to compute effective stress scalars if desired.
24 // This object serves as a specialized data generator for some of the examples
25 // in the text.
26
27 // .SECTION See Also
28 // vtkTensorGlyph, vtkHyperStreamline
29
30 #ifndef __vtkPointLoad_h
31 #define __vtkPointLoad_h
32
33 #include "vtkImageSource.h"
34
35 class VTK_IMAGING_EXPORT vtkPointLoad :  public vtkImageSource
36 {
37 public:
38   vtkTypeRevisionMacro(vtkPointLoad,vtkImageSource);
39   void PrintSelf(ostream& os, vtkIndent indent);
40
41   // Description:
42   // Construct with ModelBounds=(-1,1,-1,1,-1,1), SampleDimensions=(50,50,50),
43   // and LoadValue = 1.
44   static vtkPointLoad *New();
45
46   // Description:
47   // Set/Get value of applied load.
48   vtkSetMacro(LoadValue,float);
49   vtkGetMacro(LoadValue,float);
50
51   // Description:
52   // Specify the dimensions of the volume. A stress tensor will be computed for
53   // each point in the volume.
54   void SetSampleDimensions(int i, int j, int k);
55
56   // Description:
57   // Specify the dimensions of the volume. A stress tensor will be computed for
58   // each point in the volume.
59   void SetSampleDimensions(int dim[3]);
60   vtkGetVectorMacro(SampleDimensions,int,3);
61
62   // Description:
63   // Specify the region in space over which the tensors are computed. The point
64   // load is assumed to be applied at top center of the volume.
65   vtkSetVector6Macro(ModelBounds,float);
66   vtkGetVectorMacro(ModelBounds,float,6);
67
68   // Description:
69   // Set/Get Poisson's ratio.
70   vtkSetMacro(PoissonsRatio,float);
71   vtkGetMacro(PoissonsRatio,float);
72
73   // Description:
74   // Turn on/off computation of effective stress scalar. These methods do 
75   // nothing. The effective stress is always computed.
76   void SetComputeEffectiveStress(int) {};
77   int GetComputeEffectiveStress() {return 1;};
78   void ComputeEffectiveStressOn() {};
79   void ComputeEffectiveStressOff() {};
80
81 protected:
82   vtkPointLoad();
83   ~vtkPointLoad() {};
84
85   virtual void ExecuteInformation();
86   virtual void ExecuteData(vtkDataObject *);
87
88   float LoadValue;
89   float PoissonsRatio;
90   int SampleDimensions[3];
91   float ModelBounds[6];
92
93 private:
94   vtkPointLoad(const vtkPointLoad&);  // Not implemented.
95   void operator=(const vtkPointLoad&);  // Not implemented.
96 };
97
98 #endif
99
100