VTK
dox/Common/Transforms/vtkHomogeneousTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkHomogeneousTransform.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00025 #ifndef __vtkHomogeneousTransform_h
00026 #define __vtkHomogeneousTransform_h
00027 
00028 #include "vtkCommonTransformsModule.h" // For export macro
00029 #include "vtkAbstractTransform.h"
00030 
00031 class vtkMatrix4x4;
00032 
00033 class VTKCOMMONTRANSFORMS_EXPORT vtkHomogeneousTransform : public vtkAbstractTransform
00034 {
00035 public:
00036 
00037   vtkTypeMacro(vtkHomogeneousTransform,vtkAbstractTransform);
00038   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00042   void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00043 
00045 
00047   virtual void TransformPointsNormalsVectors(vtkPoints *inPts,
00048                                              vtkPoints *outPts,
00049                                              vtkDataArray *inNms,
00050                                              vtkDataArray *outNms,
00051                                              vtkDataArray *inVrs,
00052                                              vtkDataArray *outVrs);
00054 
00057   void GetMatrix(vtkMatrix4x4 *m);
00058 
00063   vtkMatrix4x4 *GetMatrix() { this->Update(); return this->Matrix; };
00064 
00066 
00068   vtkHomogeneousTransform *GetHomogeneousInverse()
00069     {
00070       return static_cast<vtkHomogeneousTransform *>(this->GetInverse());
00071     }
00073 
00075 
00077   void InternalTransformPoint(const float in[3], float out[3]);
00078   void InternalTransformPoint(const double in[3], double out[3]);
00080 
00082 
00084   void InternalTransformDerivative(const float in[3], float out[3],
00085                                    float derivative[3][3]);
00086   void InternalTransformDerivative(const double in[3], double out[3],
00087                                    double derivative[3][3]);
00089 
00090 protected:
00091   vtkHomogeneousTransform();
00092   ~vtkHomogeneousTransform();
00093 
00094   void InternalDeepCopy(vtkAbstractTransform *transform);
00095 
00096   vtkMatrix4x4 *Matrix;
00097 
00098 private:
00099   vtkHomogeneousTransform(const vtkHomogeneousTransform&);  // Not implemented.
00100   void operator=(const vtkHomogeneousTransform&);  // Not implemented.
00101 };
00102 
00103 #endif
00104 
00105 
00106 
00107 
00108