OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkMatrixToLinearTransform.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkMatrixToLinearTransform.h,v $
5   Language:  C++
6   Date:      $Date: 2002/12/26 18:24:21 $
7   Version:   $Revision: 1.17 $
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
19 // .NAME vtkMatrixToLinearTransform - convert a matrix to a transform
20 // .SECTION Description
21 // This is a very simple class which allows a vtkMatrix4x4 to be used in
22 // place of a vtkLinearTransform or vtkAbstractTransform.  For example,
23 // if you use it as a proxy between a matrix and vtkTransformPolyDataFilter
24 // then any modifications to the matrix will automatically be reflected in
25 // the output of the filter.
26 // .SECTION See Also
27 // vtkTransform vtkMatrix4x4 vtkMatrixToHomogeneousTransform 
28
29 #ifndef __vtkMatrixToLinearTransform_h
30 #define __vtkMatrixToLinearTransform_h
31
32 #include "vtkLinearTransform.h"
33
34 class vtkMatrix4x4;
35
36 class VTK_COMMON_EXPORT vtkMatrixToLinearTransform : public vtkLinearTransform
37 {
38  public:
39   static vtkMatrixToLinearTransform *New();
40   vtkTypeRevisionMacro(vtkMatrixToLinearTransform,vtkLinearTransform);
41   void PrintSelf (ostream& os, vtkIndent indent);
42
43   // Description:
44   // Set the input matrix.  Any modifications to the matrix will be
45   // reflected in the transformation.
46   virtual void SetInput(vtkMatrix4x4*);
47   vtkGetObjectMacro(Input,vtkMatrix4x4);
48
49   // Description:
50   // The input matrix is left as-is, but the transformation matrix
51   // is inverted.
52   void Inverse();
53
54   // Description:
55   // Get the MTime: this is the bit of magic that makes everything work.
56   unsigned long GetMTime();
57
58   // Description:
59   // Make a new transform of the same type.
60   vtkAbstractTransform *MakeTransform();
61
62   // Description:
63   // This method is deprecated.
64   void SetMatrix(vtkMatrix4x4 *matrix) {
65     this->SetInput(matrix);
66     vtkWarningMacro("SetMatrix: deprecated, use SetInput() instead"); }
67
68 protected:
69   vtkMatrixToLinearTransform();
70   ~vtkMatrixToLinearTransform();
71
72   void InternalUpdate();
73   void InternalDeepCopy(vtkAbstractTransform *transform);
74
75   int InverseFlag;
76   vtkMatrix4x4 *Input;
77 private:
78   vtkMatrixToLinearTransform(const vtkMatrixToLinearTransform&);  // Not implemented.
79   void operator=(const vtkMatrixToLinearTransform&);  // Not implemented.
80 };
81
82 #endif