/usr/include/visp/vpPlane.h is in libvisp-dev 2.8.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | /****************************************************************************
*
* $Id: vpPlane.h 4056 2013-01-05 13:04:42Z fspindle $
*
* This file is part of the ViSP software.
* Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* ("GPL") version 2 as published by the Free Software Foundation.
* See the file LICENSE.txt at the root directory of this source
* distribution for additional information about the GNU GPL.
*
* For using ViSP with software that can not be combined with the GNU
* GPL, please contact INRIA about acquiring a ViSP Professional
* Edition License.
*
* See http://www.irisa.fr/lagadic/visp/visp.html for more information.
*
* This software was developed at:
* INRIA Rennes - Bretagne Atlantique
* Campus Universitaire de Beaulieu
* 35042 Rennes Cedex
* France
* http://www.irisa.fr/lagadic
*
* If you have questions regarding the use of this file, please contact
* INRIA at visp@inria.fr
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*
* Description:
* Plane geometrical structure.
*
* Authors:
* Eric Marchand
*
*****************************************************************************/
#ifndef vpPlane_hh
#define vpPlane_hh
/*!
\class vpPlane
\ingroup GeometryPlane
\brief This class defines the container for a plane geometrical structure.
A plane is given by the equation \f$Ax + By + Cz + D = 0\f$ where
(x,y,z) are the coordinates of a point and \f$[A,B,C]^T\f$ is normal
vector of the plane.
*/
#include <visp/vpColVector.h>
#include <visp/vpPoint.h>
#include <visp/vpHomogeneousMatrix.h>
class VISP_EXPORT vpPlane
{
#ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
// for backward compatibility
public:
#else
private:
#endif
double A,B,C,D ;
public:
vpPlane() ;
vpPlane(const vpPlane& P) ;
vpPlane(const double A, const double B,const double C,const double D) ;
vpPlane(const vpPoint& P, const vpColVector &n) ;
vpPlane(const vpPoint &P, const vpPoint &Q, const vpPoint &R) ;
void init(const vpPoint& P, const vpPoint& Q, const vpPoint& R) ;
void init(const vpColVector& P, const vpColVector &n) ;
void init(const vpPlane& P) ;
// SET the parameter
/*! Set plane parameter A. */
inline void setA(const double A) { this->A = A ; }
/*! Set plane parameter B. */
inline void setB(const double B) { this->B = B ; }
/*! Set plane parameter C. */
inline void setC(const double C) { this->C = C ; }
/*! Set plane parameter D. */
inline void setD(const double D) { this->D = D ; }
/*! Set plane parameters A, B, C, D. */
inline void setABCD(const double A, const double B,
const double C, const double D)
{
this->A = A;
this->B = B;
this->C = C;
this->D = D;
}
vpPlane& operator =(const vpPlane& f) ;
// GET information
/*! \return The value of the plane parameter A. */
double getA() const { return A ; }
/*! \return The value of the plane parameter B. */
double getB() const { return B ; }
/*! \return The value of the plane parameter C. */
double getC() const { return C ; }
/*! \return The value of the plane parameter D. */
double getD() const { return D ; }
/*!
\return Return the four dimension vector \f$[A,B,C,D]^T\f$
corresponding to the plane parameters.
*/
inline vpColVector getABCD() const {
vpColVector n(4);
n[0]=A;
n[1]=B;
n[2]=C;
n[3]=D;
return n;
}
/*!
\warning This method is provided for compatibility with the
previous versions. Users should now use getABCD().
\return Return the four dimension vector \f$[A,B,C,D]^T\f$
corresponding to the plane parameters.
\sa getABCD()
*/
inline vpColVector abcd() const {
vpColVector n(4);
n[0]=A;
n[1]=B;
n[2]=C;
n[3]=D;
return n;
}
vpColVector getNormal() const;
void getNormal(vpColVector &n) const;
/*!
Print the plane parameters as a stream like "(A,B,C,D) " where
A,B,C and D correspond to the parameters of the plane.
*/
friend VISP_EXPORT std::ostream& operator<< (std::ostream& os, vpPlane& p)
{
return (os << "("<<p.getA() << ","<<p.getB()
<< ","<<p.getC()<< ","<<p.getD() <<") ") ;
} ;
// Operation with Plane
void projectionPointOnPlan(const vpPoint& P, vpPoint& Pproj) const ;
double rayIntersection(const vpPoint &M0,
const vpPoint &M1,
vpColVector &H )const ;
double getIntersection(const vpColVector &M1,vpColVector &H )const ;
void changeFrame(const vpHomogeneousMatrix &cMo);
} ;
#endif
|