]> Creatis software - cpMesh.git/blob - lib/cpm/Algorithms/Base/ForceFunction.h
First commit
[cpMesh.git] / lib / cpm / Algorithms / Base / ForceFunction.h
1 #ifndef __CPM__ALGORITHMS__BASE__FORCEFUNCTION__H__
2 #define __CPM__ALGORITHMS__BASE__FORCEFUNCTION__H__
3
4 #include <itkFunctionBase.h>
5
6 namespace cpm
7 {
8   namespace Algorithms
9   {
10     namespace Base
11     {
12       /**
13        */
14       template< class M >
15       class ForceFunction
16         : public itk::FunctionBase< typename M::PointIdentifier, typename M::VectorType >
17       {
18       public:
19         typedef M TMesh;
20         typedef typename M::PointIdentifier TPointId;
21         typedef typename M::VectorType      TVector;
22
23         typedef ForceFunction                          Self;
24         typedef itk::FunctionBase< TPointId, TVector > Superclass;
25         typedef itk::SmartPointer< Self >              Pointer;
26         typedef itk::SmartPointer< const Self >        ConstPointer;
27
28       public:
29         itkTypeMacro( ForceFunction, itkFunctionBase );
30
31         itkGetConstObjectMacro( Mesh, M );
32         itkSetConstObjectMacro( Mesh, M );
33
34       protected:
35         ForceFunction( )
36           : Superclass( )
37           { }
38         virtual ~ForceFunction( )
39           { }
40
41       private:
42         ForceFunction( const Self& );
43         Self& operator=( const Self& );
44
45       protected:
46         typename M::ConstPointer m_Mesh;
47       };
48
49     } // ecapseman
50
51   } // ecapseman
52
53 } // ecapseman
54
55 #endif // __CPM__ALGORITHMS__BASE__FORCEFUNCTION__H__
56
57 // eof - $RCSfile$