HyperspaceExplorer 0.7.1
|
00001 /* 00002 * File: TransformationFactory.h 00003 * Author: lene 00004 * 00005 * Created on December 17, 2011, 2:59 AM 00006 */ 00007 00008 #ifndef TRANSFORMATIONFACTORY_H 00009 #define TRANSFORMATIONFACTORY_H 00010 00011 #include <memory> 00012 00013 namespace VecMath { 00014 template < unsigned N, typename NUM > class Rotation; 00015 template < unsigned N, typename NUM > class Vector; 00016 } 00017 template < unsigned N, unsigned P, typename NUM > 00018 class Transformation; 00019 00021 00026 class TransformationFactory { 00027 00028 public: 00029 00031 typedef enum { Singlethreaded, Multithreaded } Method; 00032 00034 static void setTransformationMethod(const Method &method); 00035 00037 static Method getTransformationMethod(); 00038 00040 00044 template < unsigned N, unsigned P, typename NUM = double > 00045 static const Transformation< N, P, NUM > *create( 00046 const VecMath::Rotation<N, NUM> &rotation, 00047 const VecMath::Vector<N, NUM> &translation, 00048 const VecMath::Vector<N, NUM> &scale 00049 ); 00050 00052 template < unsigned N, unsigned P, typename NUM = double > 00053 static const Transformation< N, P, NUM > *create(); 00054 00055 private: 00056 00057 static Method method_; 00058 00059 }; 00060 00061 #endif /* TRANSFORMATIONFACTORY_H */ 00062