G4NURBS::CtrlPtsCoordsIterator Class Reference

#include <G4NURBS.hh>


Public Member Functions

 CtrlPtsCoordsIterator (const G4NURBS &in_rNurb, t_indCtrlPt in_startCtrlPtIndex=0)
G4bool pick (G4double *inout_pDbl)
G4bool pick (G4float *inout_pFlt)

Protected Attributes

const t_Coord *const kmpMax
const t_Coordmp


Detailed Description

Definition at line 236 of file G4NURBS.hh.


Constructor & Destructor Documentation

G4NURBS::CtrlPtsCoordsIterator::CtrlPtsCoordsIterator ( const G4NURBS in_rNurb,
t_indCtrlPt  in_startCtrlPtIndex = 0 
)

Definition at line 267 of file G4NURBS.cc.

References G4cerr, G4endl, mp, G4NURBS::mpCtrlPts, and G4NURBS::mtotnbrCtrlPts.

00269  : kmpMax((const t_Coord *)(in_rNurb.mpCtrlPts + in_rNurb.mtotnbrCtrlPts))
00270 {
00271   if (in_startCtrlPtIndex < in_rNurb.mtotnbrCtrlPts )
00272     mp = (const t_Coord *)(in_rNurb.mpCtrlPts + in_startCtrlPtIndex);
00273   else
00274   {
00275     G4cerr << "\nERROR: G4NURBS::CtrlPtsCoordsIterator: "
00276            << "in_startCtrlPtIndex out of range"
00277            << "\n\tin_startCtrlPtIndex : " << in_startCtrlPtIndex
00278            << ", nbr of CtrlPts : " << in_rNurb.mtotnbrCtrlPts 
00279            << "\n\t mp set to NULL, calls to picking functions will fail"
00280            << G4endl;
00281     mp = 0;
00282   }
00283 }


Member Function Documentation

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

Definition at line 291 of file G4NURBS.cc.

References kmpMax, and mp.

00292 {
00293   (*inout_pFlt) = (G4float)((*mp));
00294   return (G4bool)((++mp)<kmpMax);
00295 }

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

Definition at line 285 of file G4NURBS.cc.

References kmpMax, and mp.

00286 {
00287   (*inout_pDbl) = (G4double)((*mp));
00288   return (G4bool)((++mp)<kmpMax);
00289 }


Field Documentation

const t_Coord* const G4NURBS::CtrlPtsCoordsIterator::kmpMax [protected]

Definition at line 246 of file G4NURBS.hh.

Referenced by pick().

const t_Coord* G4NURBS::CtrlPtsCoordsIterator::mp [protected]

Definition at line 247 of file G4NURBS.hh.

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