#include "G4NURBS.hh"
Go to the source code of this file.
Defines | |
#define | MAXORDER 50 |
Functions | |
std::ostream & | operator<< (std::ostream &inout_outStream, const G4NURBS &in_kNurb) |
std::ostream & | operator<< (std::ostream &io_ostr, G4NURBS::t_KnotVectorGenFlag in_f) |
#define MAXORDER 50 |
Referenced by G4NURBS::CalcPoint().
std::ostream& operator<< | ( | std::ostream & | io_ostr, | |
G4NURBS::t_KnotVectorGenFlag | in_f | |||
) |
Definition at line 369 of file G4NURBS.cc.
References G4NURBS::Regular, G4NURBS::RegularRep, and G4NURBS::UserDefined.
00371 { 00372 switch (in_f) 00373 { 00374 case G4NURBS::UserDefined: io_ostr << "UserDefined"; break; 00375 case G4NURBS::Regular: io_ostr << "Regular"; break; 00376 case G4NURBS::RegularRep: io_ostr << "RegularRep"; break; 00377 default: io_ostr << (G4int)in_f; 00378 } 00379 return io_ostr; 00380 }
std::ostream& operator<< | ( | std::ostream & | inout_outStream, | |
const G4NURBS & | in_kNurb | |||
) |
Definition at line 46 of file G4NURBS.cc.
References G4endl, G4NURBS::GetnbrKnots(), G4NURBS::GetUnbrCtrlPts(), G4NURBS::GetUorder(), G4NURBS::GetVnbrCtrlPts(), G4NURBS::GetVorder(), G4NURBS::NofD, G4NURBS::CtrlPtsIterator::pick(), G4NURBS::KnotsIterator::pick(), G4NURBS::Tochar(), G4NURBS::U, G4NURBS::W, G4NURBS::Whoami(), G4NURBS::X, G4NURBS::Y, and G4NURBS::Z.
00048 { 00049 inout_outStream 00050 // the magic could be changed for good reasons only 00051 << "##ojc{NURBS}def[1.01.96.7] Just a magic. Could be added to /etc/magic" 00052 << "\n# NURBS Definition File (human and computer readable format)" 00053 << "\n# :" << in_kNurb.Whoami() 00054 << "\n# U order\tV order : " 00055 << '\n' << in_kNurb.GetUorder() << "\t\t" << in_kNurb.GetVorder(); 00056 // number of knots and knots themselves for U and V 00057 for (G4NURBS::t_direction dir = G4NURBS::U; dir < G4NURBS::NofD; 00058 /*(*(G4int *)(&dir))++*/ dir=(G4NURBS::t_direction)(((G4int)(dir))+1) ) 00059 { 00060 inout_outStream 00061 << "\n# Number of knots along " << G4NURBS::Tochar(dir) 00062 << '\n' << in_kNurb.GetnbrKnots(dir) 00063 << "\n# " << G4NURBS::Tochar(dir) << " knots vector (as a column)"; 00064 { // begin knots iteration 00065 G4double oneKnot; 00066 G4NURBS::KnotsIterator knotI(in_kNurb,dir); 00067 G4bool otherKnots; 00068 do 00069 { 00070 otherKnots = knotI.pick(&oneKnot); 00071 inout_outStream << "\n\t\t" << oneKnot; 00072 } 00073 while (otherKnots); 00074 } // end of knots iteration 00075 } // end of direction loop 00076 00077 // number of control points in U and V direction 00078 // and controlpoints 00079 inout_outStream 00080 << "\n# Number of control points along U and V" 00081 << '\n' << in_kNurb.GetUnbrCtrlPts() 00082 << " " << in_kNurb.GetVnbrCtrlPts() 00083 << "\n# Control Points (one by line, U increasing first)"; 00084 { // begin of control points iteration 00085 G4NURBS::t_doubleCtrlPt oneCP; 00086 G4NURBS::CtrlPtsIterator cpI(in_kNurb); 00087 G4bool otherCPs; 00088 do 00089 { 00090 otherCPs = cpI.pick(&oneCP); 00091 inout_outStream 00092 << "\n\t" << oneCP[G4NURBS::X] 00093 << "\t" << oneCP[G4NURBS::Y] 00094 << "\t" << oneCP[G4NURBS::Z] 00095 << "\t" << oneCP[G4NURBS::W]; 00096 } 00097 while (otherCPs); 00098 } // end of control point iteration 00099 00100 inout_outStream << "\n# That's all!" 00101 << G4endl; // endl do an \n and a flush 00102 return inout_outStream; 00103 }