ViSP  2.8.0
vpCircle.h
1 /****************************************************************************
2  *
3  * $Id: vpCircle.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  * Visual feature circle.
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
47 #ifndef vpCircle_hh
48 #define vpCircle_hh
49 
50 #include <visp/vpHomogeneousMatrix.h>
51 #include <math.h>
52 #include <visp/vpDebug.h>
53 #include <visp/vpMath.h>
54 #include <visp/vpForwardProjection.h>
55 
61 class VISP_EXPORT vpCircle : public vpForwardProjection
62 {
63 public:
64  void init() ;
65  vpCircle() ;
66  virtual ~vpCircle() ;
67 
68 public:
69  typedef enum
70  {
72  line2
73  } vpLineCircleType;
74 
75  vpCircle(const vpColVector& oP) ;
76  vpCircle(const double A, const double B1,
77  const double C,
78  const double X0, const double Y0,
79  const double Z0,
80  const double R) ;
81 
82 
83  void setWorldCoordinates(const vpColVector& oP) ;
84  void setWorldCoordinates(const double A, const double B1,
85  const double C,
86  const double X0, const double Y0,
87  const double Z0,
88  const double R) ;
89 
90 
91  double getA() const { return cP[0] ; }
92  double getB() const{ return cP[1] ; }
93  double getC() const { return cP[2] ; }
94 
95  double getX() const { return cP[3] ; }
96  double getY() const { return cP[4] ; }
97  double getZ() const{ return cP[5] ; }
98 
99  double getR() const { return cP[6] ; }
100 
101 
102 
103  void projection() ;
104  void projection(const vpColVector &cP, vpColVector &p) ;
105  void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP) ;
106  void changeFrame(const vpHomogeneousMatrix &cMo) ;
107 
108 
109  void display(const vpImage<unsigned char> &I,
110  const vpCameraParameters &cam,
111  const vpColor &color=vpColor::green,
112  const unsigned int thickness=1) ;
113  void display(const vpImage<unsigned char> &I,
114  const vpHomogeneousMatrix &cMo,
115  const vpCameraParameters &cam,
116  const vpColor &color=vpColor::green,
117  const unsigned int thickness=1) ;
118  vpCircle *duplicate() const ;
119 
120 } ;
121 
122 
123 #endif
virtual void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP)=0
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
Class to define colors available for display functionnalities.
Definition: vpColor.h:125
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:96
virtual void init()=0
double getA() const
Definition: vpCircle.h:91
static const vpColor green
Definition: vpColor.h:170
double getZ() const
Definition: vpCircle.h:97
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:95
double getR() const
Definition: vpCircle.h:99
double getC() const
Definition: vpCircle.h:93
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
double getB() const
Definition: vpCircle.h:92
Class that defines what is a circle.
Definition: vpCircle.h:61
virtual vpForwardProjection * duplicate() const =0