HyperspaceExplorer 0.7.1
Transformation.impl.h
00001 /*
00002     Hyperspace Explorer - vizualizing higher-dimensional geometry
00003     Copyright (C) 2010  Lene Preuss <lene.preuss@gmail.com>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License along
00016     with this program; if not, write to the Free Software Foundation, Inc.,
00017     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 */
00020 
00021 #ifndef TRANSFORMATION_IMPL_H
00022 #define TRANSFORMATION_IMPL_H
00023 
00024 #include "Transformation.h"
00025 //#include "TransformationPolicy.h"
00026 
00027 #include "Rotation.impl.h"
00028 #include "TransformationFactory.h"
00029 
00030 template <unsigned N, unsigned P, typename NUM>
00031 TransformationImpl<N, P, NUM>::TransformationImpl(
00032         const VecMath::Rotation<N, NUM> &rotation,
00033         const VecMath::Vector<N, NUM> &translation,
00034         const VecMath::Vector<N, NUM> &scale): 
00035   rotation_(rotation), translation_(translation), scale_(scale) { }
00036 
00037 #if 0
00038 template <unsigned N, unsigned P, typename NUM, typename TransformationPolicy>
00039 TransformationWithPolicy<N, P, NUM, TransformationPolicy>::TransformationWithPolicy(
00040         const VecMath::Rotation<N, NUM> &rotation,
00041         const VecMath::Vector<N, NUM> &translation,
00042         const VecMath::Vector<N, NUM> &scale): 
00043   TransformationImpl<N, P, NUM>(rotation, translation, scale) { }
00044 
00045 template <unsigned N, unsigned P, typename NUM, typename TransformationPolicy>
00046 typename TransformationWithPolicy<N, P, NUM, TransformationPolicy>::value_storage_type
00047 TransformationWithPolicy<N, P, NUM, TransformationPolicy>::transform(
00048   const value_storage_type &operand) const {
00049     TransformationPolicy p(
00050         TransformationImpl<N, P, NUM>::rotation_, 
00051         TransformationImpl<N, P, NUM>::translation_, 
00052         TransformationImpl<N, P, NUM>::scale_
00053     );
00054 
00055     return p.transform(operand);
00056 }
00057 #endif
00058 #endif // TRANSFORMATION_IMPL_H
 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