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

gul::dump_surf Class Template Reference

#include <gul_io.h>

List of all members.

Public Methods

 dump_surf (int nu, int pu, Ptr< T > &U, int nv, int pv, Ptr< T > &V, Ptr< Ptr< HP > > &Pw, dump_format f, dump_point_format e)
 dump_surf (int nu, int pu, Ptr< T > &U, int nv, int pv, Ptr< T > &V, Ptr< Ptr< HP > > &Pw)
std::ostream & out_human (std::ostream &os) const
std::ostream & out_gul (std::ostream &os) const

Public Attributes

int m_nu
int m_pu
Ptr< T > m_U
int m_nv
int m_pv
Ptr< T > m_V
Ptr< Ptr< HP > > m_Pw
dump_format m_f
dump_point_format m_e

template<class T, class HP>
class gul::dump_surf< T, HP >


Constructor & Destructor Documentation

template<class T, class HP>
gul::dump_surf< T, HP >::dump_surf int    nu,
int    pu,
Ptr< T > &    U,
int    nv,
int    pv,
Ptr< T > &    V,
Ptr< Ptr< HP > > &    Pw,
dump_format    f,
dump_point_format    e
[inline]
 

Definition at line 309 of file gul_io.h.

References gul::dump_format, gul::dump_point_format, m_e, m_f, m_nu, m_nv, m_pu, m_pv, m_Pw, m_U, and m_V.

00311   {
00312     m_nu = nu;
00313     m_pu = pu;
00314     m_U = U;
00315     m_nv = nv;
00316     m_pv = pv;
00317     m_V = V;
00318     m_Pw = Pw;
00319     m_f = f;
00320     m_e = e;
00321   }

template<class T, class HP>
gul::dump_surf< T, HP >::dump_surf int    nu,
int    pu,
Ptr< T > &    U,
int    nv,
int    pv,
Ptr< T > &    V,
Ptr< Ptr< HP > > &    Pw
[inline]
 

Definition at line 322 of file gul_io.h.

References m_e, m_f, m_nu, m_nv, m_pu, m_pv, m_Pw, m_U, and m_V.

00324   {
00325     m_nu = nu;
00326     m_pu = pu;
00327     m_U = U;
00328     m_nv = nv;
00329     m_pv = pv;
00330     m_V = V;
00331     m_Pw = Pw;
00332     m_f = dump_defaults::m_format;
00333     m_e = dump_defaults::m_point_format;
00334   }


Member Function Documentation

template<class T, class HP>
std::ostream& gul::dump_surf< T, HP >::out_gul std::ostream &    os const [inline]
 

Definition at line 362 of file gul_io.h.

References gul::gul_format, gul::human_readable, m_e, m_f, m_nu, m_nv, m_pu, m_pv, m_Pw, m_U, and m_V.

00363   {
00364     int i,j;
00365 
00366     os << "(\n";
00367     // u knot vector
00368     os << "  (\n";
00369     os << "    " << m_U[0];
00370     for( i = 1; i < m_nu + m_pu + 2; i++ )
00371     {
00372       os << ",\n";
00373       os << "    " << m_U[i];        
00374     }
00375     os << "\n";
00376     os << "  ),\n";
00377 
00378     // v knot vector
00379     os << "  (\n";
00380     os << "    " << m_V[0];
00381     for( i = 1; i < m_nv + m_pv + 2; i++ )
00382     {
00383       os << ",\n";
00384       os << "    " << m_V[i];        
00385     }
00386     os << "\n  ),\n";
00387 
00388     // control point matrix
00389     os << "  (\n";
00390 
00391     // first row
00392     os << "    (\n";
00393     os << "      " << dump_point<HP>(m_Pw[0][0],m_f,m_e);
00394     for( i = 1; i <= m_nu; i++ )
00395     {
00396       os << ",\n";
00397       os << "      " << dump_point<HP>(m_Pw[0][i],m_f,m_e);
00398     }
00399     os << "\n    )";
00400 
00401     // remaining rows
00402     for( j = 1; j <= m_nv; j++ )
00403     {
00404       os << ",\n";
00405       os << "    (\n";
00406       os << "      " << dump_point<HP>(m_Pw[j][0],m_f,m_e);
00407       for( i = 1; i <= m_nu; i++ )
00408       {
00409         os << ",\n";
00410         os << "      " << dump_point<HP>(m_Pw[j][i],m_f,m_e);
00411       }
00412       os << "\n    )";
00413     }
00414 
00415     os << "\n  )\n";
00416     os << ")";
00417 
00418     return os;
00419   }

template<class T, class HP>
std::ostream& gul::dump_surf< T, HP >::out_human std::ostream &    os const [inline]
 

Definition at line 336 of file gul_io.h.

References m_e, m_f, m_nu, m_nv, m_pu, m_pv, m_Pw, m_U, and m_V.

00337   {
00338    int i,j;
00339 
00340     os << "Knot Vector V\n";
00341     for( i = 0; i < m_nv+m_pv+2; i++ )
00342       os << m_V[i] << " ";
00343     os << "\n";
00344 
00345     os << "Knot Vector U\n";
00346     for( i = 0; i < m_nu+m_pu+2; i++ )
00347       cout << m_U[i] << " ";
00348     os << "\n";
00349     os.flush();
00350 
00351     os << "Control Points:\n";
00352     for( i = 0; i < m_nv+1; i++ )
00353     {
00354       for( j = 0; j < m_nu+1; j++ )
00355         os << "(" << dump_point<HP>(m_Pw[i][j],m_f,m_e) << ") ";
00356       os << "\n";
00357     }
00358     os.flush();
00359 
00360     return os;
00361   }


Member Data Documentation

template<class T, class HP>
dump_point_format gul::dump_surf::m_e
 

Definition at line 307 of file gul_io.h.

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

template<class T, class HP>
dump_format gul::dump_surf::m_f
 

Definition at line 306 of file gul_io.h.

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

template<class T, class HP>
int gul::dump_surf::m_nu
 

Definition at line 299 of file gul_io.h.

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

template<class T, class HP>
int gul::dump_surf::m_nv
 

Definition at line 302 of file gul_io.h.

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

template<class T, class HP>
int gul::dump_surf::m_pu
 

Definition at line 300 of file gul_io.h.

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

template<class T, class HP>
int gul::dump_surf::m_pv
 

Definition at line 303 of file gul_io.h.

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

template<class T, class HP>
Ptr< Ptr< HP > > gul::dump_surf::m_Pw
 

Definition at line 305 of file gul_io.h.

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

template<class T, class HP>
Ptr<T> gul::dump_surf::m_U
 

Definition at line 301 of file gul_io.h.

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

template<class T, class HP>
Ptr<T> gul::dump_surf::m_V
 

Definition at line 304 of file gul_io.h.

Referenced by dump_surf(), 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