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

◆ CtrlPtsCoordsIterator()

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

Definition at line 267 of file G4NURBS.cc.

269 : kmpMax((const t_Coord *)(in_rNurb.mpCtrlPts + in_rNurb.mtotnbrCtrlPts))
270{
271 if (in_startCtrlPtIndex < in_rNurb.mtotnbrCtrlPts )
272 mp = (const t_Coord *)(in_rNurb.mpCtrlPts + in_startCtrlPtIndex);
273 else
274 {
275 G4cerr << "\nERROR: G4NURBS::CtrlPtsCoordsIterator: "
276 << "in_startCtrlPtIndex out of range"
277 << "\n\tin_startCtrlPtIndex : " << in_startCtrlPtIndex
278 << ", nbr of CtrlPts : " << in_rNurb.mtotnbrCtrlPts
279 << "\n\t mp set to NULL, calls to picking functions will fail"
280 << G4endl;
281 mp = 0;
282 }
283}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
const t_Coord *const kmpMax
Definition: G4NURBS.hh:246
t_CtrlPt * mpCtrlPts
Definition: G4NURBS.hh:350
t_indCtrlPt mtotnbrCtrlPts
Definition: G4NURBS.hh:349
G4Float t_Coord
Definition: G4NURBS.hh:181

Member Function Documentation

◆ pick() [1/2]

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

Definition at line 285 of file G4NURBS.cc.

286{
287 (*inout_pDbl) = (G4double)((*mp));
288 return (G4bool)((++mp)<kmpMax);
289}
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67

◆ pick() [2/2]

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

Definition at line 291 of file G4NURBS.cc.

292{
293 (*inout_pFlt) = (G4float)((*mp));
294 return (G4bool)((++mp)<kmpMax);
295}
float G4float
Definition: G4Types.hh:65

Member Data Documentation

◆ kmpMax

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

Definition at line 246 of file G4NURBS.hh.

◆ mp

const t_Coord* G4NURBS::CtrlPtsCoordsIterator::mp
protected

Definition at line 247 of file G4NURBS.hh.

Referenced by CtrlPtsCoordsIterator().


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