ViSP  2.6.2
vpMbtHiddenFace.h
1 /****************************************************************************
2  *
3  * $Id: vpMbtHiddenFace.h 3530 2012-01-03 10:52:12Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2012 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Make the complete tracking of an object by using its CAD model
36  *
37  * Authors:
38  * Nicolas Melchior
39  * Romain Tallonneau
40  * Eric Marchand
41  *
42  *****************************************************************************/
43 
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45 
51 #ifndef vpMbtHiddenFace_HH
52 #define vpMbtHiddenFace_HH
53 
54 #include <visp/vpPoint.h>
55 
56 #include <list>
57 
64 class VISP_EXPORT vpMbtPolygon
65 {
66  public:
68  int index;
70  unsigned int nbpt;
71  bool isvisible;
72  bool isappearing;
73 
74  private:
75  double angle_1;
76  int negative;
77 
78  public:
79  vpPoint *p ;
80  vpMbtPolygon() ;
81  ~vpMbtPolygon() ;
82  void setIndex(const int i ) { index = i ; }
83  void setNbPoint(const unsigned int nb) ;
84  unsigned int getNbPoint() const {return nbpt ; }
85  void addPoint(const unsigned int n, const vpPoint &P) ;
86 
87  int getIndex() const {return index ;}
88  void changeFrame(const vpHomogeneousMatrix &cMo) ;
89  bool isVisible(const vpHomogeneousMatrix &cMo) ;
90  bool isVisible(const vpHomogeneousMatrix &cMo, const double alpha) ;
91  bool isVisible() const {return isvisible;}
92  bool isAppearing() const {return isappearing;}
93 };
94 
101 class VISP_EXPORT vpMbtHiddenFaces
102 {
103  private:
104  std::list<vpMbtPolygon *> Lpol ;
105  public :
106  vpMbtHiddenFaces() ;
107  ~vpMbtHiddenFaces() ;
108  void addPolygon(vpMbtPolygon *p) ;
109  unsigned int setVisible(const vpHomogeneousMatrix &cMo) ;
110  bool isVisible(const int index) ;
111  bool isAppearing(const int index);
112  void reset();
113 
114  std::list<vpMbtPolygon *>& getPolygon() {return Lpol;}
115 } ;
116 
117 #endif
118 #endif
119 
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
Class that defines what is a point.
Definition: vpPoint.h:65