|
Open PaperOpt
|
00001 00008 #pragma once 00009 #ifndef TRANSFORM_H 00010 #define TRANSFORM_H 00011 00012 // INCLUDES 00013 // 00014 #include "WavePacket.h" 00015 #include "Array2D.h" 00016 #include "Matrix.h" 00017 00018 class Transform 00019 { 00020 public: 00021 // LIFECYCLE 00022 00026 Transform(void); 00027 00031 ~Transform(void){}; 00032 00033 // OPERATIONS 00034 00038 void reset(void); 00039 00049 void AddChangeOfBasis(const V3<double> &x, const V3<double> &y); 00050 00061 void AddChangeOfBasis(const V3<double> &x, const V3<double> &y, const V3<double> &z); 00062 00072 void AddScaling(double x, double y, double z); 00073 00079 void AddRotationX(double ang); 00080 00088 const V3<double> ApplyTransform(const V3<double> &v) const; 00089 00099 const V3<double> ApplyInvTransform(const V3<double> &v) const; 00100 00101 private: 00102 //Array2D<double> 00103 Matrix transform; //TODO Aray2D causes memory leak here 00104 //Array2D<double> 00105 Matrix inv_transform; 00106 }; // Transform 00107 00108 #endif // TRANSFORM_H