@@ -29,70 +29,68 @@ class uStraightLine;
2929using Eigen::Matrix3d;
3030using Eigen::Vector3d;
3131
32+ // ! Namespace Conic
3233namespace Conic {
3334
34-
35+ // ! Base class for conics
3536class ConicBase : public Matrix3d
3637{
3738protected:
38- ConicBase () = default ;
39+ ConicBase () = default ; // !< Standard constructor
3940 virtual ~ConicBase () = default ;
4041
4142public:
42- ConicBase (const ConicBase &) = delete ;
43- ConicBase ( ConicBase &&) = delete ;
44- ConicBase & operator = ( const ConicBase &) = delete ;
45- ConicBase & operator = ( ConicBase &&) = delete ;
46- ConicBase ( const Matrix3d& other) : Matrix3d(other) {
47- // Q_ASSERT( isSymmetric()==true);
48- assert ( isSymmetric ()==true );
49- }
50- ConicBase & operator = ( const Matrix3d & other);
51-
52- bool isEllipse () const ; // obsolete
53- bool isHyperbola () const ; // obsolete
54- bool isParabola () const ; // obsolete
55- bool isCentral () const ;
56- bool isProper () const ; // obsolete
57-
58- Vector3d center () const ;
59- Vector3d polar ( const Vector3d & x ) const ;
60- std::pair<Vector3d,Vector3d> intersect ( const Vector3d & l ) const ;
43+ ConicBase (const ConicBase &) = delete ; // !< Copy constructor
44+ ConicBase ( ConicBase &&) = delete ; // !< Move constructor
45+ ConicBase & operator = ( const ConicBase &) = delete ; // !< Copy assignment operator
46+ ConicBase & operator = ( ConicBase &&) = delete ; // !< Move assignment operator
47+ ConicBase ( const Matrix3d & other); // !< Value constructor
48+ ConicBase & operator = ( const Matrix3d & other); // !< Assignment operator
49+
50+ bool isEllipse () const ; // !< Check if conic is an ellipse (not required)
51+ bool isHyperbola () const ; // !< Check if conic is a hyperbola (not required)
52+ bool isParabola () const ; // !< Check if conic is a parabola (not required)
53+ bool isCentral () const ; // !< Check if conic has a central point
54+ bool isProper () const ; // !< Check if conic is non-degenerated
55+
56+ Vector3d center () const ; // !< Get center point of conic
57+ Vector3d polar ( const Vector3d & x ) const ; // !< Compute polar l (straight line) for point x, i.e., l=C*x
58+ std::pair<Vector3d,Vector3d> intersect ( const Vector3d & l ) const ; // !< Two intersection points with a straight line
6159
6260protected:
63- void transform ( const Matrix3d & HH );
64- Matrix3d cof3 ( const Matrix3d & MM ) const ; // !< 3x3 cofactor matrix
61+ void transform ( const Matrix3d & HH ); // !< Transformtion of conic according to x'=H*x
62+ Matrix3d cof3 ( const Matrix3d & MM ) const ; // !< 3x3 cofactor matrix, i.e., transposed adjunct
6563
6664private:
6765 Matrix3d skew ( const Vector3d & x ) const ;
6866 bool isSymmetric () const ;
6967};
7068
7169
72-
70+ // ! Ellipse
7371class Ellipse : public ConicBase
7472{
7573public:
76- Ellipse ( const Uncertain::uPoint &ux, double k2=1.0 );
74+ Ellipse ( const Uncertain::uPoint &ux, double k2=1.0 ); // !< Value constructor (uncertain point)
7775
78- std::pair<Eigen::VectorXd,Eigen::VectorXd> poly ( int N ) const ;
79- void scale ( double s ); // obsolete
76+ std::pair<Eigen::VectorXd,Eigen::VectorXd> poly ( int N ) const ; // !< Get N points on ellipse
77+ void scale ( double s ); // !< Scale (enlarge, shrink) the ellipse (not required)
8078
8179 using ConicBase::operator =;
8280};
8381
8482
85-
83+ // ! Hyperbola
8684class Hyperbola : public ConicBase
8785{
8886public:
89- Hyperbola ( const Uncertain::uStraightLine &l, double k2=1.0 );
87+ Hyperbola ( const Uncertain::uStraightLine &l, double k2=1.0 ); // !< Value constructor (uncertain straight line)
9088 using ConicBase::operator =;
9189
92- Vector3d centerline () const ;
93- std::pair<double ,double > lengthsSemiAxes () const ;
94- double angle_rad () const ;
95- double angle_deg () const ;
90+ Vector3d centerline () const ; // !< Get straight line
91+ std::pair<double ,double > lengthsSemiAxes () const ; // !< Get lengths/2 of axes
92+ double angle_rad () const ; // !< Get angle between straight line and x-axis in radians.
93+ double angle_deg () const ; // !< Get angle between straight line and x-axis in degerees.
9694
9795private:
9896 std::pair<double ,double > eigenvalues () const ;
0 commit comments