G4NURBS::KnotsIterator Class Reference

#include <G4NURBS.hh>


Public Member Functions

 KnotsIterator (const G4NURBS &in_rNurb, t_direction in_dir, t_indKnot in_startIndex=0)
G4bool pick (G4double *inout_pDbl)
G4bool pick (G4float *inout_pFlt)

Protected Attributes

const t_direction kmdir
const t_Knot *const kmpMax
const t_Knotmp


Detailed Description

Definition at line 212 of file G4NURBS.hh.


Constructor & Destructor Documentation

G4NURBS::KnotsIterator::KnotsIterator ( const G4NURBS in_rNurb,
t_direction  in_dir,
t_indKnot  in_startIndex = 0 
)

Definition at line 236 of file G4NURBS.cc.

References G4cerr, G4endl, kmdir, G4NURBS::m, mp, G4NURBS::t_Dir::nbrKnots, and G4NURBS::t_Dir::pKnots.

00239  : kmdir((G4NURBS::t_direction)(in_dir &  G4NURBS::DMask)),
00240    kmpMax(in_rNurb.m[kmdir].pKnots + in_rNurb.m[kmdir].nbrKnots)
00241 {
00242   if (in_startIndex < in_rNurb.m[kmdir].nbrKnots)
00243     mp = in_rNurb.m[kmdir].pKnots + in_startIndex;
00244   else
00245   {
00246     G4cerr   << "\nERROR: G4NURBS::KnotsIterator: in_startIndex out of range"
00247              << "\n\tin_startIndex : " << in_startIndex
00248              << ", nbr of knots : " << in_rNurb.m[kmdir].nbrKnots
00249              << "\n\t mp set to NULL, calls to picking functions will fail"
00250              << G4endl;
00251     mp = 0;
00252   }
00253 }


Member Function Documentation

G4bool G4NURBS::KnotsIterator::pick ( G4float inout_pFlt  ) 

Definition at line 261 of file G4NURBS.cc.

References kmpMax, and mp.

00262 {
00263   (*inout_pFlt) = (G4float)(*mp);
00264   return (G4bool)((++mp)<kmpMax);
00265 }

G4bool G4NURBS::KnotsIterator::pick ( G4double inout_pDbl  ) 

Definition at line 255 of file G4NURBS.cc.

References kmpMax, and mp.

Referenced by operator<<().

00256 {
00257   (*inout_pDbl) = (G4double)(*mp);
00258   return (G4bool)((++mp)<kmpMax);
00259 }


Field Documentation

const t_direction G4NURBS::KnotsIterator::kmdir [protected]

Definition at line 222 of file G4NURBS.hh.

Referenced by KnotsIterator().

const t_Knot* const G4NURBS::KnotsIterator::kmpMax [protected]

Definition at line 223 of file G4NURBS.hh.

Referenced by pick().

const t_Knot* G4NURBS::KnotsIterator::mp [protected]

Definition at line 224 of file G4NURBS.hh.

Referenced by KnotsIterator(), and pick().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:46 2013 for Geant4 by  doxygen 1.4.7