#include "globals.hh"
#include "G4Visible.hh"
#include "G4ios.hh"
#include "G4Point3D.hh"
#include "G4Vector3D.hh"
Go to the source code of this file.
Data Structures | |
class | G4NURBS |
class | G4NURBS::KnotsIterator |
class | G4NURBS::CtrlPtsCoordsIterator |
class | G4NURBS::CtrlPtsIterator |
struct | G4NURBS::t_Dir |
Defines | |
#define | __C_G4NURBS__ 1 |
Functions | |
std::ostream & | operator<< (std::ostream &inout_OutStream, G4NURBS::t_KnotVectorGenFlag in_KVGFlag) |
std::ostream & | operator<< (std::ostream &inout_outStream, const G4NURBS &in_kNurb) |
#define __C_G4NURBS__ 1 |
Definition at line 40 of file G4NURBS.hh.
std::ostream& operator<< | ( | std::ostream & | inout_outStream, | |
const G4NURBS & | in_kNurb | |||
) |
Definition at line 46 of file G4NURBS.cc.
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 }
std::ostream& operator<< | ( | std::ostream & | inout_OutStream, | |
G4NURBS::t_KnotVectorGenFlag | in_KVGFlag | |||
) |
Definition at line 369 of file G4NURBS.cc.
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 }