HyperspaceExplorer 0.7.1
TransformationFactory.impl.h
00001 /* 
00002  * File:   TransformationFactory.impl.h
00003  * Author: lene
00004  *
00005  * Created on December 17, 2011, 3:02 AM
00006  */
00007 
00008 #ifndef TRANSFORMATIONFACTORY_IMPL_H
00009 #define TRANSFORMATIONFACTORY_IMPL_H
00010 
00011 #include "TransformationFactory.h"
00012 #include "MultithreadedTransformation.h"
00013 
00014 #include "Transformation.impl.h"
00015 #include "SinglethreadedTransformation.impl.h"
00016 
00017 template <unsigned N, unsigned P, typename NUM> 
00018 const Transformation< N, P, NUM > * 
00019 TransformationFactory::create(
00020         const VecMath::Rotation<N, NUM> &rotation,
00021         const VecMath::Vector<N, NUM> &translation,
00022         const VecMath::Vector<N, NUM> &scale
00023     ) {
00024     switch(getTransformationMethod()) {
00025         
00026         case Multithreaded:
00027             return new MultithreadedTransformation<N, P, NUM>(rotation, translation, scale);
00028             
00029         case Singlethreaded:
00030         default:
00031             return new SinglethreadedTransformation<N, P, NUM>(rotation, translation, scale);
00032     }
00033 }
00034 
00035 template <unsigned N, unsigned P, typename NUM> 
00036 const Transformation< N, P, NUM > * 
00037 TransformationFactory::create() {
00038     return create(VecMath::Rotation<N, NUM>(), VecMath::Vector<N, NUM>(), VecMath::Vector<N, NUM>(1.));
00039 }
00040 /*
00041 template <unsigned N, unsigned P, typename NUM, typename Policy> 
00042 const Transformation< N, P, NUM > * 
00043 TransformationFactory::createWithPolicy(
00044         const VecMath::Rotation<N, NUM> &rotation,
00045         const VecMath::Vector<N, NUM> &translation,
00046         const VecMath::Vector<N, NUM> &scale
00047     ) {
00048     return new TransformationWithPolicy< N, P, NUM, Policy >(
00049         rotation, translation, scale
00050     );
00051 }
00052 */
00053 
00054 #endif  /* TRANSFORMATIONFACTORY_IMPL_H */
00055 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:16 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo