Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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

◆ KnotsIterator()

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

Definition at line 236 of file G4NURBS.cc.

240 kmpMax(in_rNurb.m[kmdir].pKnots + in_rNurb.m[kmdir].nbrKnots)
241{
242 if (in_startIndex < in_rNurb.m[kmdir].nbrKnots)
243 mp = in_rNurb.m[kmdir].pKnots + in_startIndex;
244 else
245 {
246 G4cerr << "\nERROR: G4NURBS::KnotsIterator: in_startIndex out of range"
247 << "\n\tin_startIndex : " << in_startIndex
248 << ", nbr of knots : " << in_rNurb.m[kmdir].nbrKnots
249 << "\n\t mp set to NULL, calls to picking functions will fail"
250 << G4endl;
251 mp = 0;
252 }
253}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
const t_Knot * mp
Definition: G4NURBS.hh:224
const t_Knot *const kmpMax
Definition: G4NURBS.hh:223
const t_direction kmdir
Definition: G4NURBS.hh:222
t_Dir m[NofD]
Definition: G4NURBS.hh:348
t_direction
Definition: G4NURBS.hh:72
@ DMask
Definition: G4NURBS.hh:75
t_indKnot nbrKnots
Definition: G4NURBS.hh:274
t_Knot * pKnots
Definition: G4NURBS.hh:275

Member Function Documentation

◆ pick() [1/2]

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

Definition at line 255 of file G4NURBS.cc.

256{
257 (*inout_pDbl) = (G4double)(*mp);
258 return (G4bool)((++mp)<kmpMax);
259}
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67

Referenced by operator<<().

◆ pick() [2/2]

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

Definition at line 261 of file G4NURBS.cc.

262{
263 (*inout_pFlt) = (G4float)(*mp);
264 return (G4bool)((++mp)<kmpMax);
265}
float G4float
Definition: G4Types.hh:65

Member Data Documentation

◆ kmdir

const t_direction G4NURBS::KnotsIterator::kmdir
protected

Definition at line 222 of file G4NURBS.hh.

Referenced by KnotsIterator().

◆ kmpMax

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

Definition at line 223 of file G4NURBS.hh.

◆ mp

const t_Knot* G4NURBS::KnotsIterator::mp
protected

Definition at line 224 of file G4NURBS.hh.

Referenced by KnotsIterator().


The documentation for this class was generated from the following files: