#ifndef ArLinePV3_HH #define ArLinePV3_HH ///////////////////////////////////////////////////////////////////// //! file="amma/ArrayOf/ArLinPV3.hh" //! lib=Magarr //! userlevel=Normal //! author="Radek Marik" //! docentry="Containers.Arrays.1-D Arrays.Specialized Arrays" //! rcsid="$Id: ArLinPV3.hh,v 1.7 1999/09/23 15:07:10 ees1cg Exp $" //! date="06/08/95" #include "amma/Array1d.hh" #include "amma/Line3dPV.hh" class istream; class ostream; //==================================================================== //======= Line3dPVArray1dC =========================================== //==================================================================== //: 1 dimensional array of lines in 3D space // The class Line3dPVArray1dC represents 1-dimensional array of 3-dimensional // lines represented by one point and direction vector. class Line3dPVArray1dC: public Array1dC { private: typedef Array1dC Foo1T; // to help GNU C++ 2.6.0 public: // =============== // == BIG OBJECT = // =============== typedef double RealT; // general real parameter. public: inline Line3dPVArray1dC(); // Empty array of lines. inline Line3dPVArray1dC(const SizeT n); // Creates an array of 'n' lines. Line3dPVArray1dC(const char * filename); // Creates an array of lines from the input file 'filename'. Line3dPVArray1dC(istream & s); // Creates an array of lines from the input stream s. inline Line3dPVArray1dC(const Array1dC & lines); // Constructs an array of lines from the array (as a big object). inline Line3dPVArray1dC(const Line3dPVArray1dC & lines); // Another access to the array of lines. Point3dC Intersection() const; // Returns the point which has the smallest distance from the set // of line. The criterion is Sum(dist^2(point, line)) -> min. void SaveAsGF(char * filename) const; // The array of lines is saved into the file with the name 'filename'. }; istream & operator>>(istream & s, Line3dPVArray1dC & lines); // Reads the array of data from the input stream ostream & operator<<(ostream & s, const Line3dPVArray1dC & lines); // Sends the array of data into the output stream inline Line3dPVArray1dC::Line3dPVArray1dC() //================================== : Array1dC() {} inline Line3dPVArray1dC::Line3dPVArray1dC(const SizeT n) //=============================================== : Array1dC(n) {} inline Line3dPVArray1dC::Line3dPVArray1dC(const Array1dC & lines) //=================================================================== : Array1dC(lines) {} inline Line3dPVArray1dC::Line3dPVArray1dC(const Line3dPVArray1dC & lines) //================================================================ : Array1dC(lines) {} #endif // IAPS - Image analysis program system. // End of include file ArLinePV3.hh