Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkLinearTransform.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkLinearTransform.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00039 #ifndef __vtkLinearTransform_h
    00040 #define __vtkLinearTransform_h
    00041
    00042 #include "vtkHomogeneousTransform.h"
    00043
    00044 class VTK_COMMON_EXPORT vtkLinearTransform : public vtkHomogeneousTransform
    00045 {
    00046 public:
    00047
    00048   vtkTypeRevisionMacro(vtkLinearTransform,vtkHomogeneousTransform);
    00049   void PrintSelf(ostream& os, vtkIndent indent);
    00050
    00052
    00054   void TransformNormal(const float in[3], float out[3]) {
    00055     this->Update(); this->InternalTransformNormal(in,out); };
    00057
    00059
    00061   void TransformNormal(const double in[3], double out[3]) {
    00062     this->Update(); this->InternalTransformNormal(in,out); };
    00064
    00066
    00068   double *TransformNormal(double x, double y, double z) {
    00069     return this->TransformDoubleNormal(x,y,z); }
    00070   double *TransformNormal(const double normal[3]) {
    00071     return this->TransformDoubleNormal(normal[0],normal[1],normal[2]); };
    00073
    00075
    00077   float *TransformFloatNormal(float x, float y, float z) {
    00078     this->InternalFloatPoint[0] = x;
    00079     this->InternalFloatPoint[1] = y;
    00080     this->InternalFloatPoint[2] = z;
    00081     this->TransformNormal(this->InternalFloatPoint,this->InternalFloatPoint);
    00082     return this->InternalFloatPoint; };
    00083   float *TransformFloatNormal(const float normal[3]) {
    00084     return this->TransformFloatNormal(normal[0],normal[1],normal[2]); };
    00086
    00088
    00090   double *TransformDoubleNormal(double x, double y, double z) {
    00091     this->InternalDoublePoint[0] = x;
    00092     this->InternalDoublePoint[1] = y;
    00093     this->InternalDoublePoint[2] = z;
    00094     this->TransformNormal(this->InternalDoublePoint,this->InternalDoublePoint);
    00095     return this->InternalDoublePoint; };
    00096   double *TransformDoubleNormal(const double normal[3]) {
    00097     return this->TransformDoubleNormal(normal[0],normal[1],normal[2]); };
    00099
    00101
    00103   double *TransformVector(double x, double y, double z) {
    00104     return this->TransformDoubleVector(x,y,z); }
    00105   double *TransformVector(const double normal[3]) {
    00106     return this->TransformDoubleVector(normal[0],normal[1],normal[2]); };
    00108
    00110
    00112   void TransformVector(const float in[3], float out[3]) {
    00113     this->Update(); this->InternalTransformVector(in,out); };
    00115
    00117
    00119   void TransformVector(const double in[3], double out[3]) {
    00120     this->Update(); this->InternalTransformVector(in,out); };
    00122
    00124
    00126   float *TransformFloatVector(float x, float y, float z) {
    00127       this->InternalFloatPoint[0] = x;
    00128       this->InternalFloatPoint[1] = y;
    00129       this->InternalFloatPoint[2] = z;
    00130       this->TransformVector(this->InternalFloatPoint,this->InternalFloatPoint);
    00131       return this->InternalFloatPoint; };
    00132   float *TransformFloatVector(const float vec[3]) {
    00133     return this->TransformFloatVector(vec[0],vec[1],vec[2]); };
    00135
    00137
    00139   double *TransformDoubleVector(double x, double y, double z) {
    00140     this->InternalDoublePoint[0] = x;
    00141     this->InternalDoublePoint[1] = y;
    00142     this->InternalDoublePoint[2] = z;
    00143     this->TransformVector(this->InternalDoublePoint,this->InternalDoublePoint);
    00144     return this->InternalDoublePoint; };
    00145   double *TransformDoubleVector(const double vec[3]) {
    00146     return this->TransformDoubleVector(vec[0],vec[1],vec[2]); };
    00148
    00151   void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
    00152
    00155   virtual void TransformNormals(vtkDataArray *inNms, vtkDataArray *outNms);
    00156
    00159   virtual void TransformVectors(vtkDataArray *inVrs, vtkDataArray *outVrs);
    00160
    00162
    00164   void TransformPointsNormalsVectors(vtkPoints *inPts,
    00165                                      vtkPoints *outPts,
    00166                                      vtkDataArray *inNms,
    00167                                      vtkDataArray *outNms,
    00168                                      vtkDataArray *inVrs,
    00169                                      vtkDataArray *outVrs);
    00171
    00173
    00175   vtkLinearTransform *GetLinearInverse() {
    00176     return (vtkLinearTransform *)this->GetInverse(); };
    00178
    00180
    00182   void InternalTransformPoint(const float in[3], float out[3]);
    00183   void InternalTransformPoint(const double in[3], double out[3]);
    00185
    00187
    00189   virtual void InternalTransformNormal(const float in[3], float out[3]);
    00190   virtual void InternalTransformNormal(const double in[3], double out[3]);
    00192
    00194
    00196   virtual void InternalTransformVector(const float in[3], float out[3]);
    00197   virtual void InternalTransformVector(const double in[3], double out[3]);
    00199
    00201
    00203   void InternalTransformDerivative(const float in[3], float out[3],
    00204                                    float derivative[3][3]);
    00205   void InternalTransformDerivative(const double in[3], double out[3],
    00206                                    double derivative[3][3]);
    00208
    00209 protected:
    00210   vtkLinearTransform() {};
    00211   ~vtkLinearTransform() {};
    00212 private:
    00213   vtkLinearTransform(const vtkLinearTransform&);  // Not implemented.
    00214   void operator=(const vtkLinearTransform&);  // Not implemented.
    00215 };
    00216
    00217 #endif
    00218
    00219
    00220
    00221
    00222