point.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 * VCGLib                                                            o o     *
00003 * Visual and Computer Graphics Library                            o     o   *
00004 *                                                                _   O  _   *
00005 * Copyright(C) 2004                                                \/)\/    *
00006 * Visual Computing Lab                                            /\/|      *
00007 * ISTI - Italian National Research Council                           |      *
00008 *                                                                    \      *
00009 * All rights reserved.                                                      *
00010 *                                                                           *
00011 * This program is free software; you can redistribute it and/or modify      *
00012 * it under the terms of the GNU General Public License as published by      *
00013 * the Free Software Foundation; either version 2 of the License, or         *
00014 * (at your option) any later version.                                       *
00015 *                                                                           *
00016 * This program is distributed in the hope that it will be useful,           *
00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
00019 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
00020 * for more details.                                                         *
00021 *                                                                           *
00022 ****************************************************************************/
00023 
00024 #ifndef VCG_USE_EIGEN
00025 #include "deprecated_point.h"
00026 #else
00027 
00028 #ifndef __VCGLIB_POINT
00029 #define __VCGLIB_POINT
00030 
00031 #include "../math/eigen.h"
00032 #include <vcg/math/base.h>
00033 #include <vcg/space/space.h>
00034 
00035 namespace vcg {
00036 template<typename Scalar> class Point2;
00037 template<typename Scalar> class Point3;
00038 template<typename Scalar> class Point4;
00039 
00040 namespace ndim{
00041 template <int Size, typename Scalar> class Point;
00042 }
00043 }
00044 
00045 namespace vcg {
00046 namespace ndim{
00047 
00056 template <int N, class S> class Point : public Eigen::Matrix<S,N,1>
00057 {
00058 //----------------------------------------
00059 // template typedef part
00060 // use it as follow: typename Point<N,S>::Type instead of simply Point<N,S>
00061 //----------------------------------------
00062 public:
00063         typedef Eigen::Matrix<S,N,1> Type;
00064 //----------------------------------------
00065 // inheritence part
00066 //----------------------------------------
00067 private:
00068         typedef Eigen::Matrix<S,N,1> _Base;
00069 public:
00070 
00071         using _Base::coeff;
00072         using _Base::coeffRef;
00073         using _Base::setZero;
00074         using _Base::data;
00075         using _Base::V;
00076 
00077         _EIGEN_GENERIC_PUBLIC_INTERFACE(Point,_Base);
00078         VCG_EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Point)
00079 
00080         inline Point() : Base() {}
00081         template<typename OtherDerived>
00082         inline Point(const Eigen::MatrixBase<OtherDerived>& other) : Base(other) {}
00083 
00085         inline S StableDot (const Point& p) const;
00086 
00089                 // inline S operator % ( PointType const & p ) const;
00090 
00091 }; // end class definition
00092 
00093 
00094 typedef Eigen::Matrix<short ,2,1> Point2s;
00095 typedef Eigen::Matrix<int   ,2,1> Point2i;
00096 typedef Eigen::Matrix<float ,2,1> Point2f;
00097 typedef Eigen::Matrix<double,2,1> Point2d;
00098 typedef Eigen::Matrix<short ,2,1> Vector2s;
00099 typedef Eigen::Matrix<int   ,2,1> Vector2i;
00100 typedef Eigen::Matrix<float ,2,1> Vector2f;
00101 typedef Eigen::Matrix<double,2,1> Vector2d;
00102 
00103 typedef Eigen::Matrix<short ,3,1> Point3s;
00104 typedef Eigen::Matrix<int   ,3,1> Point3i;
00105 typedef Eigen::Matrix<float ,3,1> Point3f;
00106 typedef Eigen::Matrix<double,3,1> Point3d;
00107 typedef Eigen::Matrix<short ,3,1> Vector3s;
00108 typedef Eigen::Matrix<int   ,3,1> Vector3i;
00109 typedef Eigen::Matrix<float ,3,1> Vector3f;
00110 typedef Eigen::Matrix<double,3,1> Vector3d;
00111 
00112 
00113 typedef Eigen::Matrix<short ,4,1> Point4s;
00114 typedef Eigen::Matrix<int   ,4,1> Point4i;
00115 typedef Eigen::Matrix<float ,4,1> Point4f;
00116 typedef Eigen::Matrix<double,4,1> Point4d;
00117 typedef Eigen::Matrix<short ,4,1> Vector4s;
00118 typedef Eigen::Matrix<int   ,4,1> Vector4i;
00119 typedef Eigen::Matrix<float ,4,1> Vector4f;
00120 typedef Eigen::Matrix<double,4,1> Vector4d;
00121 
00122 
00125 } // end namespace ndim
00126 } // end namespace vcg
00127 #endif
00128 
00129 #endif


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:34:12