VTK
dox/Common/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 "vtkAbstractTransform.h"
00029 
00030 class vtkMatrix4x4;
00031 
00032 class VTK_COMMON_EXPORT vtkHomogeneousTransform : public vtkAbstractTransform
00033 {
00034 public:
00035 
00036   vtkTypeMacro(vtkHomogeneousTransform,vtkAbstractTransform);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00041   void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00042 
00044 
00046   virtual void TransformPointsNormalsVectors(vtkPoints *inPts, 
00047                                              vtkPoints *outPts, 
00048                                              vtkDataArray *inNms, 
00049                                              vtkDataArray *outNms,
00050                                              vtkDataArray *inVrs, 
00051                                              vtkDataArray *outVrs);
00053 
00056   void GetMatrix(vtkMatrix4x4 *m);
00057 
00062   vtkMatrix4x4 *GetMatrix() { this->Update(); return this->Matrix; };
00063 
00065 
00067   vtkHomogeneousTransform *GetHomogeneousInverse()
00068     {
00069       return static_cast<vtkHomogeneousTransform *>(this->GetInverse());
00070     }
00072 
00074 
00076   void InternalTransformPoint(const float in[3], float out[3]);
00077   void InternalTransformPoint(const double in[3], double out[3]);
00079 
00081 
00083   void InternalTransformDerivative(const float in[3], float out[3],
00084                                    float derivative[3][3]);
00085   void InternalTransformDerivative(const double in[3], double out[3],
00086                                    double derivative[3][3]);
00088 
00089 protected:
00090   vtkHomogeneousTransform();
00091   ~vtkHomogeneousTransform();
00092 
00093   void InternalDeepCopy(vtkAbstractTransform *transform);
00094 
00095   vtkMatrix4x4 *Matrix;
00096 
00097 private:
00098   vtkHomogeneousTransform(const vtkHomogeneousTransform&);  // Not implemented.
00099   void operator=(const vtkHomogeneousTransform&);  // Not implemented.
00100 };
00101 
00102 #endif
00103 
00104 
00105 
00106 
00107