ViSP
 All Classes Functions Variables Enumerations Enumerator Friends Groups Pages
vpLine.h
1 /****************************************************************************
2  *
3  * $Id: vpLine.h 4056 2013-01-05 13:04:42Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 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  * Line feature.
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
42 
43 #ifndef vpLine_H
44 #define vpLine_H
45 
51 #include <visp/vpMatrix.h>
52 #include <visp/vpHomogeneousMatrix.h>
53 
54 #include <visp/vpForwardProjection.h>
55 
124 class VISP_EXPORT vpLine : public vpForwardProjection
125 {
126 
127 public:
128 
129  void init() ;
130 
131  vpLine() ;
133  virtual ~vpLine() { ; }
134 
144  void setRho(const double rho) { p[0] = rho ; };
145 
154  void setTheta(const double theta) { p[1] = theta ;};
155 
166  double getTheta() const { return p[1] ; }
167 
177  double getRho() const { return p[0] ; }
178 
179 
180 
181  void setWorldCoordinates(const double &A1, const double &B1,
182  const double &C1, const double &D1,
183  const double &A2, const double &B2,
184  const double &C2, const double &D2) ;
185 
186 
187  void setWorldCoordinates(const vpColVector &oP1,
188  const vpColVector &oP2) ;
189 
190 
191  void setWorldCoordinates(const vpColVector &oP) ;
192 
193 
194  void projection() ;
195  void projection(const vpColVector &cP, vpColVector &p) ;
196  void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP) ;
197  void changeFrame(const vpHomogeneousMatrix &cMo) ;
198 
199  void display(const vpImage<unsigned char> &I,
200  const vpCameraParameters &cam,
201  const vpColor &color=vpColor::green,
202  const unsigned int thickness=1) ;
203  void display(const vpImage<unsigned char> &I,
204  const vpHomogeneousMatrix &cMo,
205  const vpCameraParameters &cam,
206  const vpColor &color=vpColor::green,
207  const unsigned int thickness=1) ;
208 
209  vpLine *duplicate() const ;
210 } ;
211 
212 
213 #endif
214 
215 /*
216  * Local variables:
217  * c-basic-offset: 2
218  * End:
219  */