00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00053 #ifndef __vtkLinearTransform_h
00054 #define __vtkLinearTransform_h
00055
00056 #include "vtkHomogeneousTransform.h"
00057
00058 class VTK_COMMON_EXPORT vtkLinearTransform : public vtkHomogeneousTransform
00059 {
00060 public:
00061
00062 vtkTypeMacro(vtkLinearTransform,vtkHomogeneousTransform);
00063 void PrintSelf(ostream& os, vtkIndent indent);
00064
00066
00068 void TransformNormal(const float in[3], float out[3]) {
00069 this->Update(); this->InternalTransformNormal(in,out); };
00071
00073
00075 void TransformNormal(const double in[3], double out[3]) {
00076 this->Update(); this->InternalTransformNormal(in,out); };
00078
00080
00082 double *TransformNormal(double x, double y, double z) {
00083 return this->TransformDoubleNormal(x,y,z); }
00084 double *TransformNormal(const double normal[3]) {
00085 return this->TransformDoubleNormal(normal[0],normal[1],normal[2]); };
00087
00089
00091 float *TransformFloatNormal(float x, float y, float z) {
00092 this->InternalFloatPoint[0] = x;
00093 this->InternalFloatPoint[1] = y;
00094 this->InternalFloatPoint[2] = z;
00095 this->TransformNormal(this->InternalFloatPoint,this->InternalFloatPoint);
00096 return this->InternalFloatPoint; };
00097 float *TransformFloatNormal(const float normal[3]) {
00098 return this->TransformFloatNormal(normal[0],normal[1],normal[2]); };
00100
00102
00104 double *TransformDoubleNormal(double x, double y, double z) {
00105 this->InternalDoublePoint[0] = x;
00106 this->InternalDoublePoint[1] = y;
00107 this->InternalDoublePoint[2] = z;
00108 this->TransformNormal(this->InternalDoublePoint,this->InternalDoublePoint);
00109 return this->InternalDoublePoint; };
00110 double *TransformDoubleNormal(const double normal[3]) {
00111 return this->TransformDoubleNormal(normal[0],normal[1],normal[2]); };
00113
00115
00117 double *TransformVector(double x, double y, double z) {
00118 return this->TransformDoubleVector(x,y,z); }
00119 double *TransformVector(const double normal[3]) {
00120 return this->TransformDoubleVector(normal[0],normal[1],normal[2]); };
00122
00124
00126 void TransformVector(const float in[3], float out[3]) {
00127 this->Update(); this->InternalTransformVector(in,out); };
00129
00131
00133 void TransformVector(const double in[3], double out[3]) {
00134 this->Update(); this->InternalTransformVector(in,out); };
00136
00138
00140 float *TransformFloatVector(float x, float y, float z) {
00141 this->InternalFloatPoint[0] = x;
00142 this->InternalFloatPoint[1] = y;
00143 this->InternalFloatPoint[2] = z;
00144 this->TransformVector(this->InternalFloatPoint,this->InternalFloatPoint);
00145 return this->InternalFloatPoint; };
00146 float *TransformFloatVector(const float vec[3]) {
00147 return this->TransformFloatVector(vec[0],vec[1],vec[2]); };
00149
00151
00153 double *TransformDoubleVector(double x, double y, double z) {
00154 this->InternalDoublePoint[0] = x;
00155 this->InternalDoublePoint[1] = y;
00156 this->InternalDoublePoint[2] = z;
00157 this->TransformVector(this->InternalDoublePoint,this->InternalDoublePoint);
00158 return this->InternalDoublePoint; };
00159 double *TransformDoubleVector(const double vec[3]) {
00160 return this->TransformDoubleVector(vec[0],vec[1],vec[2]); };
00162
00165 void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00166
00169 virtual void TransformNormals(vtkDataArray *inNms, vtkDataArray *outNms);
00170
00173 virtual void TransformVectors(vtkDataArray *inVrs, vtkDataArray *outVrs);
00174
00176
00178 void TransformPointsNormalsVectors(vtkPoints *inPts,
00179 vtkPoints *outPts,
00180 vtkDataArray *inNms,
00181 vtkDataArray *outNms,
00182 vtkDataArray *inVrs,
00183 vtkDataArray *outVrs);
00185
00187
00189 vtkLinearTransform *GetLinearInverse() {
00190 return (vtkLinearTransform *)this->GetInverse(); };
00192
00194
00196 void InternalTransformPoint(const float in[3], float out[3]);
00197 void InternalTransformPoint(const double in[3], double out[3]);
00199
00201
00203 virtual void InternalTransformNormal(const float in[3], float out[3]);
00204 virtual void InternalTransformNormal(const double in[3], double out[3]);
00206
00208
00210 virtual void InternalTransformVector(const float in[3], float out[3]);
00211 virtual void InternalTransformVector(const double in[3], double out[3]);
00213
00215
00217 void InternalTransformDerivative(const float in[3], float out[3],
00218 float derivative[3][3]);
00219 void InternalTransformDerivative(const double in[3], double out[3],
00220 double derivative[3][3]);
00222
00223 protected:
00224 vtkLinearTransform() {};
00225 ~vtkLinearTransform() {};
00226 private:
00227 vtkLinearTransform(const vtkLinearTransform&);
00228 void operator=(const vtkLinearTransform&);
00229 };
00230
00231 #endif
00232
00233
00234
00235
00236