Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpCircle.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 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  * Visual feature circle.
32  *
33  * Authors:
34  * Eric Marchand
35  *
36  *****************************************************************************/
37 
43 #ifndef vpCircle_hh
44 #define vpCircle_hh
45 
46 #include <visp3/core/vpHomogeneousMatrix.h>
47 #include <math.h>
48 #include <visp3/core/vpDebug.h>
49 #include <visp3/core/vpMath.h>
50 #include <visp3/core/vpForwardProjection.h>
51 
57 class VISP_EXPORT vpCircle : public vpForwardProjection
58 {
59 public:
60  void init() ;
61  vpCircle() ;
62  vpCircle(const vpColVector& oP) ;
63  vpCircle(const double A, const double B,
64  const double C,
65  const double X0, const double Y0,
66  const double Z0,
67  const double R) ;
68  virtual ~vpCircle() ;
69 
70 
71  void setWorldCoordinates(const vpColVector& oP) ;
72  void setWorldCoordinates(const double A, const double B,
73  const double C,
74  const double X0, const double Y0,
75  const double Z0,
76  const double R) ;
77 
78 
79  double getA() const { return cP[0] ; }
80  double getB() const{ return cP[1] ; }
81  double getC() const { return cP[2] ; }
82 
83  double getX() const { return cP[3] ; }
84  double getY() const { return cP[4] ; }
85  double getZ() const{ return cP[5] ; }
86 
87  double getR() const { return cP[6] ; }
88 
89 
90 
91  void projection() ;
92  void projection(const vpColVector &cP, vpColVector &p) ;
93  void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP) ;
94  void changeFrame(const vpHomogeneousMatrix &cMo) ;
95 
96 
97  void display(const vpImage<unsigned char> &I,
98  const vpCameraParameters &cam,
99  const vpColor &color=vpColor::green,
100  const unsigned int thickness=1) ;
101  void display(const vpImage<unsigned char> &I,
102  const vpHomogeneousMatrix &cMo,
103  const vpCameraParameters &cam,
104  const vpColor &color=vpColor::green,
105  const unsigned int thickness=1) ;
106  vpCircle *duplicate() const ;
107 
108  //###################
109  // Static Functions
110  //###################
111 
112  public:
113  static void computeIntersectionPoint(const vpCircle &circle, const vpCameraParameters &cam, const double &rho, const double &theta, double &i, double &j);
114 
115 } ;
116 
117 
118 #endif
virtual void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP)=0
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class to define colors available for display functionnalities.
Definition: vpColor.h:121
virtual void display(const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1)=0
double getY() const
Definition: vpCircle.h:84
virtual void init()=0
double getA() const
Definition: vpCircle.h:79
static const vpColor green
Definition: vpColor.h:166
double getZ() const
Definition: vpCircle.h:85
virtual void projection()=0
Class that defines what is a generic geometric feature.
virtual void setWorldCoordinates(const vpColVector &oP)=0
Generic class defining intrinsic camera parameters.
double getX() const
Definition: vpCircle.h:83
double getR() const
Definition: vpCircle.h:87
double getC() const
Definition: vpCircle.h:81
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
double getB() const
Definition: vpCircle.h:80
Class that defines what is a circle.
Definition: vpCircle.h:57
virtual vpForwardProjection * duplicate() const =0