Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PlueckerMatrix.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #ifndef __PlueckerMatrix_hh__
26 #define __PlueckerMatrix_hh__
27 #include "bias_config.h"
28 
29 #include <Base/Geometry/HomgPoint3D.hh>
30 #include <Base/Math/Vector3.hh>
31 #include <Base/Math/Vector2.hh>
32 #include <Base/Math/Vector.hh>
33 #include <Base/Math/Matrix.hh>
34 #include <Base/Math/Matrix4x4.hh>
35 
36 #define PLUECKERMATRIX_TYPE double
37 
38 namespace BIAS{
39 
40 /** @class PlueckerMatrix
41  @brief represente a 3d line using a 4x4 Pluecker matrix
42  @author woelk 03/2006 */
43 
44  class BIASGeometryBase_EXPORT PlueckerMatrix
45  : public Matrix4x4<PLUECKERMATRIX_TYPE>
46  {
47  public:
48  inline PlueckerMatrix() : Matrix4x4<PLUECKERMATRIX_TYPE>(MatrixZero) {}
49 
50  /** @brief cast constructor, checks special constraints */
52 
53  /** @brief construction of a line through 2 points */
54  inline PlueckerMatrix(const HomgPoint3D& p1, const HomgPoint3D& p2)
55  { Set(p1, p2); }
56 
57  virtual ~PlueckerMatrix() {};
58 
59  /** @brief construction of a line through 2 points */
60  void Set(const HomgPoint3D& p1, const HomgPoint3D& p2);
61 
62  Vector<PLUECKERMATRIX_TYPE> GetPlueckerLineCoordinates() const;
63 
64  /** @brief direction vetor */
65  HomgPoint3D GetDirection() const;
66 
67  /** @brief normal vector to the line */
68  HomgPoint3D GetNormal() const;
69 
70  protected:
71  /** @brief checks for the rank two constraint, i.e. f the direction
72  and the normal vector are perpendicular to each other */
73  bool CheckConstraint_() const;
74  };
75 
76 
77 } // namespace BIAS
78 
79 
80 #endif // __PlueckerMatrix_hh__
class for column vectors with arbitrary size
represente a 3d line using a 4x4 Pluecker matrix
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
Definition: HomgPoint3D.hh:61
is a &#39;fixed size&#39; quadratic matrix of dim.
Definition: Matrix4x4.hh:54
PlueckerMatrix(const HomgPoint3D &p1, const HomgPoint3D &p2)
construction of a line through 2 points