#include <G4NURBS.hh>
Public Member Functions | |
CtrlPtsIterator (const G4NURBS &in_rNurb, t_indCtrlPt in_startIndex=0) | |
G4bool | pick (t_doubleCtrlPt *inout_pDblCtrlPt) |
G4bool | pick (t_floatCtrlPt *inout_pFltCtrlPt) |
Protected Attributes | |
const t_CtrlPt *const | kmpMax |
const t_CtrlPt * | mp |
Definition at line 252 of file G4NURBS.hh.
G4NURBS::CtrlPtsIterator::CtrlPtsIterator | ( | const G4NURBS & | in_rNurb, | |
t_indCtrlPt | in_startIndex = 0 | |||
) |
Definition at line 297 of file G4NURBS.cc.
References G4cerr, G4endl, mp, G4NURBS::mpCtrlPts, and G4NURBS::mtotnbrCtrlPts.
00299 : kmpMax(in_rNurb.mpCtrlPts + in_rNurb.mtotnbrCtrlPts) 00300 { 00301 if (in_startIndex < in_rNurb.mtotnbrCtrlPts ) 00302 mp = (in_rNurb.mpCtrlPts + in_startIndex); 00303 else 00304 { 00305 G4cerr << "\nERROR: G4NURBS::CtrlPtsIterator: in_startIndex out of range" 00306 << "\n\tin_startIndex : " << in_startIndex 00307 << ", nbr of CtrlPts : " << in_rNurb.mtotnbrCtrlPts 00308 << "\n\t mp set to NULL, calls to picking functions will fail" 00309 << G4endl; 00310 mp = 0; 00311 } 00312 }
G4bool G4NURBS::CtrlPtsIterator::pick | ( | t_floatCtrlPt * | inout_pFltCtrlPt | ) |
Definition at line 321 of file G4NURBS.cc.
References kmpMax, mp, G4NURBS::NofC, and G4NURBS::X.
00322 { 00323 for (t_indCoord i = G4NURBS::X; i < G4NURBS::NofC; i++) 00324 (*inout_pFltCtrlPt)[i] = (G4float)((*mp)[i]); 00325 return (G4bool)((++mp)<kmpMax); 00326 }
G4bool G4NURBS::CtrlPtsIterator::pick | ( | t_doubleCtrlPt * | inout_pDblCtrlPt | ) |
Definition at line 314 of file G4NURBS.cc.
References kmpMax, mp, G4NURBS::NofC, and G4NURBS::X.
Referenced by operator<<().
00315 { 00316 for (t_indCoord i = G4NURBS::X; i < G4NURBS::NofC; i++) 00317 (*inout_pDblCtrlPt)[i] = (G4double)((*mp)[i]); 00318 return (G4bool)((++mp)<kmpMax); 00319 }
const t_CtrlPt* const G4NURBS::CtrlPtsIterator::kmpMax [protected] |
const t_CtrlPt* G4NURBS::CtrlPtsIterator::mp [protected] |