testing_planes.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * \file
00003  *
00004  * $Id:$
00005  *
00006  * Copyright (C) Brno University of Technology
00007  *
00008  * This file is part of software developed by dcgm-robotics@FIT group.
00009  *
00010  * Author: Vit Stancl (stancl@fit.vutbr.cz)
00011  * Supervised by: Michal Spanel (spanel@fit.vutbr.cz)
00012  * Date: dd/mm/2012
00013  *
00014  * This file is free software: you can redistribute it and/or modify
00015  * it under the terms of the GNU Lesser General Public License as published by
00016  * the Free Software Foundation, either version 3 of the License, or
00017  * (at your option) any later version.
00018  *
00019  * This file is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU Lesser General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this file.  If not, see <http://www.gnu.org/licenses/>.
00026  */
00027 #pragma once
00028 #ifndef TestingPlanes_H_included
00029 #define TestingPlanes_H_included
00030 
00031 #include "testing_object_base.h"
00032 
00033 #include <vector>
00034 #include <Eigen/Dense>
00035 
00036 
00037 namespace srs_env_model
00038 {
00039 
00043 class CTestingPlane : public CTestingObjectBase
00044 {
00045 public:
00047         typedef Eigen::Vector3f tPoint;
00048 
00049 public:
00050    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00051 
00052 public:
00054         CTestingPlane();
00055 
00057         CTestingPlane( const CTestingPlane &plane );
00058 
00060         CTestingPlane operator =( const CTestingPlane &plane );
00061 
00078         CTestingPlane( const tPoint &p1, const tPoint &p2, const tPoint &p3 );
00079 
00081         CTestingPlane( const tPoint &point, const tPoint &normal );
00082 
00084         void set( const tPoint &p1, const tPoint &p2, const tPoint &p3 );
00085 
00087         void set( const tPoint &point, const tPoint &normal );
00088 
00090         virtual bool isIn( double x, double y, double z );
00091 
00092 protected:
00094         tPoint m_plane;
00095 
00097         double m_d;
00098 
00099 }; // class CTestingPlane
00100 
00104 class CTestingPlanes : public CTestingObjectBase
00105 {
00106 public:
00108         typedef std::vector< CTestingPlane > tPlanesStack;
00109 
00110 public:
00112         CTestingPlanes();
00113 
00115         CTestingPlanes( const tPlanesStack & planes );
00116 
00118         void set( const tPlanesStack &planes );
00119 
00121         void addPlane( const CTestingPlane &plane ) { m_planes.push_back( plane ); }
00122 
00124         void clearPlanes(){ m_planes.clear(); }
00125 
00127         virtual bool isIn( double x, double y, double z );
00128 
00129 protected:
00131         tPlanesStack m_planes;
00132 
00133 }; // class CTestingPlanes
00134 
00135 }
00136 
00137 
00138 
00139  // namespace srs_env_model
00140 
00141 // TestingPlanes_H_included
00142 #endif
00143 
00144 


srs_env_model
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Tomas Lokaj, Jan Gorig, Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Sun Jan 5 2014 11:50:50