Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gul::dump_point Class Template Reference

#include <gul_io.h>

List of all members.

Public Methods

 dump_point (const EP &P, dump_format f, dump_point_format e)
 dump_point (const EP &P)
std::ostream & out_human (std::ostream &s) const
std::ostream & out_gul (std::ostream &s) const

Public Attributes

EP m_P
dump_format m_f
dump_point_format m_e

template<class EP>
class gul::dump_point< EP >


Constructor & Destructor Documentation

template<class EP>
gul::dump_point< EP >::dump_point const EP &    P,
dump_format    f,
dump_point_format    e
[inline]
 

Definition at line 58 of file gul_io.h.

References gul::dump_format, gul::dump_point_format, m_e, m_f, and m_P.

00059   {
00060     m_P = P;
00061     m_f = f;
00062     m_e = e;
00063   }

template<class EP>
gul::dump_point< EP >::dump_point const EP &    P [inline]
 

Definition at line 64 of file gul_io.h.

References m_e, m_f, and m_P.

00065   {
00066     m_P = P;
00067     m_f = dump_defaults::m_format;
00068     m_e = dump_defaults::m_point_format;
00069   }


Member Function Documentation

template<class EP>
std::ostream& gul::dump_point< EP >::out_gul std::ostream &    s const [inline]
 

Definition at line 107 of file gul_io.h.

References gul::euclidian, gul::gul_format, gul::homogeneous, gul::human_readable, m_e, m_P, and gul::mixed.

00108   {
00109     int i;
00110 
00111     if( (!EP::hom()) || (m_e == homogeneous) )
00112     {
00113       s << "(" << m_P[0];
00114       for( i = 1; i < EP::dim(); i++ )
00115       {
00116         s << ", ";
00117         s << m_P[i];   
00118       }
00119       s << ")";
00120     }
00121     else if( m_e == euclidian )
00122     {
00123       s << "(" << m_P[0]/m_P.weight();
00124       for( i = 1; i < EP::dim()-1; i++ )
00125       {
00126         s << ", ";
00127         s << m_P[i]/m_P.weight();   
00128       }
00129       s << ")";
00130     }
00131    else if( m_e == mixed )
00132     {
00133       s << "(" << m_P[0]/m_P.weight();
00134       for( i = 1; i < EP::dim()-1; i++ )
00135       {
00136         s << ", ";
00137         s << m_P[i]/m_P.weight();   
00138       }
00139       s << ", ";
00140       s << m_P.weight();   
00141       s << ")";
00142     }
00143     return s;
00144   }

template<class EP>
std::ostream& gul::dump_point< EP >::out_human std::ostream &    s const [inline]
 

Definition at line 71 of file gul_io.h.

References gul::euclidian, gul::homogeneous, m_e, m_P, and gul::mixed.

00072   {
00073     int i;
00074 
00075     if( (!EP::hom()) || (m_e == homogeneous) )
00076     {
00077       s << m_P[0];
00078       for( i = 1; i < EP::dim(); i++ )
00079       {
00080         s << " ";
00081         s << m_P[i];   
00082       }
00083     }
00084     else if( m_e == euclidian )
00085     {
00086       s << m_P[0]/m_P.weight();
00087       for( i = 1; i < EP::dim()-1; i++ )
00088       {
00089         s << " ";
00090         s << m_P[i]/m_P.weight();   
00091       }
00092     }
00093     else if( m_e == mixed )
00094     {
00095       s << m_P[0]/m_P.weight();
00096       for( i = 1; i < EP::dim()-1; i++ )
00097       {
00098         s << " ";
00099         s << m_P[i]/m_P.weight();   
00100       }
00101       s << " ";
00102       s << m_P.weight();   
00103     }
00104     return s;
00105   }


Member Data Documentation

template<class EP>
dump_point_format gul::dump_point::m_e
 

Definition at line 56 of file gul_io.h.

Referenced by dump_point(), out_gul(), and out_human().

template<class EP>
dump_format gul::dump_point::m_f
 

Definition at line 55 of file gul_io.h.

Referenced by dump_point().

template<class EP>
EP gul::dump_point::m_P
 

Definition at line 54 of file gul_io.h.

Referenced by dump_point(), out_gul(), and out_human().


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 04:17:57 2002 for GUL 0.6 - Geometry Utility Library by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001