Visual Servoing Platform  version 3.0.0
vpProjectionDisplay.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Interface with the image for feature display.
32  *
33  * Authors:
34  * Eric Marchand
35  *
36  *****************************************************************************/
37 
38 
39 #ifndef vpProjectionDisplay_H
40 #define vpProjectionDisplay_H
41 
47 #include <visp3/core/vpConfig.h>
48 #if defined (VISP_HAVE_DISPLAY)
49 
50 #include <visp3/core/vpCameraParameters.h>
51 #include <visp3/core/vpColor.h>
52 #include <visp3/core/vpImage.h>
53 #include <visp3/gui/vpDisplayX.h>
54 #include <visp3/gui/vpDisplayGTK.h>
55 #include <visp3/gui/vpDisplayGDI.h>
56 #include <visp3/gui/vpDisplayOpenCV.h>
57 #include <visp3/gui/vpDisplayD3D.h>
58 #include <visp3/core/vpForwardProjection.h>
59 
60 #include <list>
61 
67 class VISP_EXPORT vpProjectionDisplay
68 {
69 private:
72 
73 #if defined VISP_HAVE_X11
74  vpDisplayX dIcam ;
75  vpDisplayX dIext ;
76 #elif defined VISP_HAVE_GTK
77  vpDisplayGTK dIcam ;
78  vpDisplayGTK dIext ;
79 #elif defined VISP_HAVE_GDI
80  vpDisplayGDI dIcam ;
81  vpDisplayGDI dIext ;
82 #elif defined VISP_HAVE_OPENCV
83  vpDisplayOpenCV dIcam ;
84  vpDisplayOpenCV dIext ;
85 #elif defined(VISP_HAVE_D3D9)
86  vpDisplayD3D dIcam ;
87  vpDisplayD3D dIext ;
88 #endif
89 public:
90  void init() ;
91  void init(int select) ;
92  void close() ;
93  static int internalView() { return 0x01 ; }
94  static int externalView() { return 0x02 ; }
95 
98  : Icam(), Iext(),
99 #if defined (VISP_HAVE_DISPLAY)
100  dIcam(), dIext(),
101 #endif
102  listFp(), o(), x(), y(), z(), traj()
103  {
104  init();
105  }
107  : Icam(), Iext(),
108 #if defined (VISP_HAVE_DISPLAY)
109  dIcam(), dIext(),
110 #endif
111  listFp(), o(), x(), y(), z(), traj()
112  {
113  init(select) ;
114  }
115 
116  void insert( vpForwardProjection &fp) ;
117  void display(vpImage<unsigned char> &I,
118  const vpHomogeneousMatrix &cextMo,
119  const vpHomogeneousMatrix &cMo,
120  const vpCameraParameters &cam,
121  const vpColor &color,
122  const bool &displayTraj = false,
123  const unsigned int thickness=1);
124  void displayCamera(vpImage<unsigned char> &I,
125  const vpHomogeneousMatrix &cextMo,
126  const vpHomogeneousMatrix &cMo,
127  const vpCameraParameters &cam,
128  const unsigned int thickness=1) ;
129 
130 private:
131  std::list<vpForwardProjection *> listFp ;
132  vpPoint o ;
133  vpPoint x ;
134  vpPoint y ;
135  vpPoint z ;
136  vpMatrix traj;
137 } ;
138 
139 
140 
141 #endif
142 #endif
143 
144 /*
145  * Local variables:
146  * c-basic-offset: 2
147  * End:
148  */
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:92
Implementation of an homogeneous matrix and operations on such kind of matrices.
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
Class to define colors available for display functionnalities.
Definition: vpColor.h:121
Define the X11 console to display images.
Definition: vpDisplayX.h:148
Class that defines what is a point.
Definition: vpPoint.h:59
Display for windows using Direct3D.
Definition: vpDisplayD3D.h:105
Class that defines what is a generic geometric feature.
The vpDisplayOpenCV allows to display image using the opencv library.
Generic class defining intrinsic camera parameters.
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
Definition: vpDisplayGTK.h:141
interface with the image for feature display