BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Aff_transformation_3.h
Go to the documentation of this file.
00001 // Copyright (c) 1999  Utrecht University (The Netherlands),
00002 // ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
00003 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
00004 // (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
00005 // and Tel-Aviv University (Israel).  All rights reserved.
00006 //
00007 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public License as
00009 // published by the Free Software Foundation; version 2.1 of the License.
00010 // See the file LICENSE.LGPL distributed with CGAL.
00011 //
00012 // Licensees holding a valid commercial license may use this file in
00013 // accordance with the commercial license agreement provided with the software.
00014 //
00015 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 //
00018 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Kernel_23/include/CGAL/Aff_transformation_3.h $
00019 // $Id: Aff_transformation_3.h 42932 2008-04-17 10:13:31Z spion $
00020 //
00021 // Author(s)     : Andreas Fabri, Stefan Schirra
00022 
00023 #ifndef CGAL_AFF_TRANSFORMATION_3_H
00024 #define CGAL_AFF_TRANSFORMATION_3_H
00025 
00026 #include <CGAL/Dimension.h>
00027 
00028 CGAL_BEGIN_NAMESPACE
00029 
00030 template <class R_>
00031 class Aff_transformation_3 : public R_::Kernel_base::Aff_transformation_3
00032 {
00033   typedef typename R_::RT            RT;
00034   typedef typename R_::Vector_3      Vector_3;
00035   typedef typename R_::Kernel_base::Aff_transformation_3 RAff_transformation_3;
00036 public:
00037 
00038   typedef CGAL::Dimension_tag<3>    Ambient_dimension;
00039 
00040   typedef R_                        R;
00041 
00042   Aff_transformation_3() {}
00043 
00044   Aff_transformation_3(const RAff_transformation_3&  t)
00045     : RAff_transformation_3(t) {}
00046 
00047   Aff_transformation_3(const Identity_transformation& tag)
00048     : RAff_transformation_3(tag) {}
00049 
00050   Aff_transformation_3(const Translation tag,
00051                        const Vector_3& v)
00052     : RAff_transformation_3(tag, v) {}
00053 
00054   Aff_transformation_3(const Scaling tag,
00055                        const RT& s,
00056                        const RT& w= RT(1) )
00057     : RAff_transformation_3(tag, s, w) {}
00058 
00059   // the general case:
00060   Aff_transformation_3(
00061       const RT& m11, const RT& m12, const RT& m13, const RT& m14,
00062       const RT& m21, const RT& m22, const RT& m23, const RT& m24,
00063       const RT& m31, const RT& m32, const RT& m33, const RT& m34,
00064                                                    const RT& w= RT(1) )
00065     : RAff_transformation_3(m11, m12, m13, m14,
00066                             m21, m22, m23, m24,
00067                             m31, m32, m33, m34,
00068                                            w) {}
00069 
00070   Aff_transformation_3(
00071       const RT& m11, const RT& m12, const RT& m13,
00072       const RT& m21, const RT& m22, const RT& m23,
00073       const RT& m31, const RT& m32, const RT& m33,
00074                                                    const RT& w = RT(1) )
00075     : RAff_transformation_3(m11, m12, m13,
00076                            m21, m22, m23,
00077                            m31, m32, m33,
00078                                           w) {}
00079 };
00080 
00081 #ifndef CGAL_NO_OSTREAM_INSERT_AFF_TRANSFORMATION_3
00082 template < class R >
00083 std::ostream&
00084 operator<<(std::ostream& os, const CGAL::Aff_transformation_3<R>& t)
00085 {
00086   typedef typename R::Kernel_base::Aff_transformation_3 RAff_transformation_3;
00087   return os << static_cast<const RAff_transformation_3&>(t);
00088 }
00089 #endif // CGAL_NO_OSTREAM_INSERT_AFF_TRANSFORMATION_3
00090 
00091 #ifndef CGAL_NO_ISTREAM_EXTRACT_AFF_TRANSFORMATION_3
00092 template < class R >
00093 std::istream&
00094 operator>>(std::istream& is, CGAL::Aff_transformation_3<R>& t)
00095 {
00096   typedef typename R::Kernel_base::Aff_transformation_3 RAff_transformation_3;
00097   return is >> static_cast<const RAff_transformation_3&>(t);
00098 }
00099 #endif // CGAL_NO_ISTREAM_EXTRACT_AFF_TRANSFORMATION_3
00100 
00101 CGAL_END_NAMESPACE
00102 
00103 #endif // CGAL_AFF_TRANSFORMATION_3_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines