point_tests.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  *  Point Cloud Library (PCL) - www.pointclouds.org
00005  *  Copyright (c) 2012-, Open Perception, Inc.
00006  *
00007  *  All rights reserved.
00008  *
00009  *  Redistribution and use in source and binary forms, with or without
00010  *  modification, are permitted provided that the following conditions
00011  *  are met:
00012  *
00013  *   * Redistributions of source code must retain the above copyright
00014  *     notice, this list of conditions and the following disclaimer.
00015  *   * Redistributions in binary form must reproduce the above
00016  *     copyright notice, this list of conditions and the following
00017  *     disclaimer in the documentation and/or other materials provided
00018  *     with the distribution.
00019  *   * Neither the name of the copyright holder(s) nor the names of its
00020  *     contributors may be used to endorse or promote products derived
00021  *     from this software without specific prior written permission.
00022  *
00023  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00026  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00027  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00028  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00029  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00032  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00033  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034  *  POSSIBILITY OF SUCH DAMAGE.
00035  *
00036  * $Id: point_types.hpp 6415 2012-07-16 20:11:47Z rusu $
00037  *
00038  */
00039 
00040 #ifndef PCL_COMMON_POINT_TESTS_H_
00041 #define PCL_COMMON_POINT_TESTS_H_
00042 
00043 #ifdef _MSC_VER
00044 #include <Eigen/src/StlSupport/details.h>
00045 #endif
00046 
00047 namespace pcl
00048 {
00052   template <typename PointT> inline bool
00053   isFinite (const PointT &pt)
00054   {
00055     return (pcl_isfinite (pt.x) && pcl_isfinite (pt.y) && pcl_isfinite (pt.z));
00056   }
00057 
00058 #ifdef _MSC_VER
00059   template <typename PointT> inline bool
00060   isFinite (const Eigen::internal::workaround_msvc_stl_support<PointT> &pt)
00061   {
00062     return isFinite<PointT> (static_cast<const PointT&> (pt));
00063   }
00064 #endif
00065 
00066   template<> inline bool isFinite<pcl::RGB> (const pcl::RGB&) { return (true); }
00067   template<> inline bool isFinite<pcl::Label> (const pcl::Label&) { return (true); }
00068   template<> inline bool isFinite<pcl::Axis> (const pcl::Axis&) { return (true); }
00069   template<> inline bool isFinite<pcl::MomentInvariants> (const pcl::MomentInvariants&) { return (true); }
00070   template<> inline bool isFinite<pcl::PrincipalRadiiRSD> (const pcl::PrincipalRadiiRSD&) { return (true); }
00071   template<> inline bool isFinite<pcl::Boundary> (const pcl::Boundary&) { return (true); }
00072   template<> inline bool isFinite<pcl::PrincipalCurvatures> (const pcl::PrincipalCurvatures&) { return (true); }
00073   template<> inline bool isFinite<pcl::SHOT352> (const pcl::SHOT352&) { return (true); }
00074   template<> inline bool isFinite<pcl::SHOT1344> (const pcl::SHOT1344&) { return (true); }
00075   template<> inline bool isFinite<pcl::ReferenceFrame> (const pcl::ReferenceFrame&) { return (true); }
00076   template<> inline bool isFinite<pcl::ShapeContext1980> (const pcl::ShapeContext1980&) { return (true); }
00077   template<> inline bool isFinite<pcl::PFHSignature125> (const pcl::PFHSignature125&) { return (true); }
00078   template<> inline bool isFinite<pcl::PFHRGBSignature250> (const pcl::PFHRGBSignature250&) { return (true); }
00079   template<> inline bool isFinite<pcl::PPFSignature> (const pcl::PPFSignature&) { return (true); }
00080   template<> inline bool isFinite<pcl::PPFRGBSignature> (const pcl::PPFRGBSignature&) { return (true); }
00081   template<> inline bool isFinite<pcl::NormalBasedSignature12> (const pcl::NormalBasedSignature12&) { return (true); }
00082   template<> inline bool isFinite<pcl::FPFHSignature33> (const pcl::FPFHSignature33&) { return (true); }
00083   template<> inline bool isFinite<pcl::VFHSignature308> (const pcl::VFHSignature308&) { return (true); }
00084   template<> inline bool isFinite<pcl::ESFSignature640> (const pcl::ESFSignature640&) { return (true); }
00085   template<> inline bool isFinite<pcl::IntensityGradient> (const pcl::IntensityGradient&) { return (true); }
00086 
00087   // specification for pcl::PointXY
00088   template <> inline bool
00089   isFinite<pcl::PointXY> (const pcl::PointXY &p)
00090   {
00091     return (pcl_isfinite (p.x) && pcl_isfinite (p.y));
00092   }
00093 
00094   // specification for pcl::BorderDescription
00095   template <> inline bool
00096   isFinite<pcl::BorderDescription> (const pcl::BorderDescription &p)
00097   {
00098     return (pcl_isfinite (p.x) && pcl_isfinite (p.y));
00099   }
00100 
00101   // specification for pcl::Normal
00102   template <> inline bool
00103   isFinite<pcl::Normal> (const pcl::Normal &n)
00104   {
00105     return (pcl_isfinite (n.normal_x) && pcl_isfinite (n.normal_y) && pcl_isfinite (n.normal_z));
00106   }
00107 }
00108 
00109 #endif    // PCL_COMMON_POINT_TESTS_H_
00110 


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:31:02