Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GMocrenTrack Class Reference

#include <G4GMocrenIO.hh>

Classes

struct  Step
 

Public Member Functions

 GMocrenTrack ()
 
 ~GMocrenTrack ()
 
int getNumberOfSteps ()
 
void addStep (float _startx, float _starty, float _startz, float _endx, float _endy, float _endz)
 
void getStep (float &_startx, float &_starty, float &_startz, float &_endx, float &_endy, float &_endz, int _num)
 
void setTrack (std::vector< struct Step > &_aTrack)
 
void setColor (unsigned char _color[3])
 
void getColor (unsigned char _color[3])
 
void translate (std::vector< float > &_tranlate)
 

Protected Attributes

std::vector< struct StepkTrack
 
unsigned char kColor [3]
 

Detailed Description

Definition at line 91 of file G4GMocrenIO.hh.

Constructor & Destructor Documentation

GMocrenTrack::GMocrenTrack ( )

Definition at line 250 of file G4GMocrenIO.cc.

250  {
251  kTrack.clear();
252  for(int i = 0; i < 3; i++) kColor[i] = 0;
253 }
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98
unsigned char kColor[3]
Definition: G4GMocrenIO.hh:99
GMocrenTrack::~GMocrenTrack ( )
inline

Definition at line 103 of file G4GMocrenIO.hh.

103 {;}

Member Function Documentation

void GMocrenTrack::addStep ( float  _startx,
float  _starty,
float  _startz,
float  _endx,
float  _endy,
float  _endz 
)

Definition at line 255 of file G4GMocrenIO.cc.

256  {
257  struct Step step;
258  step.startPoint[0] = _startx;
259  step.startPoint[1] = _starty;
260  step.startPoint[2] = _startz;
261  step.endPoint[0] = _endx;
262  step.endPoint[1] = _endy;
263  step.endPoint[2] = _endz;
264  kTrack.push_back(step);
265 }
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98
void GMocrenTrack::getColor ( unsigned char  _color[3])
inline

Definition at line 116 of file G4GMocrenIO.hh.

116  {
117  for(int i = 0; i < 3; i++) _color[i] = kColor[i];
118  }
unsigned char kColor[3]
Definition: G4GMocrenIO.hh:99
int GMocrenTrack::getNumberOfSteps ( )
inline

Definition at line 106 of file G4GMocrenIO.hh.

106 {return (int)kTrack.size();}
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98
void GMocrenTrack::getStep ( float &  _startx,
float &  _starty,
float &  _startz,
float &  _endx,
float &  _endy,
float &  _endz,
int  _num 
)

Definition at line 266 of file G4GMocrenIO.cc.

268  {
269  if(_num >= (int)kTrack.size()) {
271  G4cout << "GMocrenTrack::getStep(...) Error: "
272  << "invalid step # : " << _num << G4endl;
273  return;
274  }
275 
276  _startx = kTrack[_num].startPoint[0];
277  _starty = kTrack[_num].startPoint[1];
278  _startz = kTrack[_num].startPoint[2];
279  _endx = kTrack[_num].endPoint[0];
280  _endy = kTrack[_num].endPoint[1];
281  _endz = kTrack[_num].endPoint[2];
282 }
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98
G4GLOB_DLL std::ostream G4cout
static Verbosity GetVerbosity()
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void GMocrenTrack::setColor ( unsigned char  _color[3])
inline

Definition at line 113 of file G4GMocrenIO.hh.

113  {
114  for(int i = 0; i < 3; i++) kColor[i] = _color[i];
115  }
unsigned char kColor[3]
Definition: G4GMocrenIO.hh:99

Here is the caller graph for this function:

void GMocrenTrack::setTrack ( std::vector< struct Step > &  _aTrack)
inline

Definition at line 112 of file G4GMocrenIO.hh.

112 {kTrack = _aTrack;}
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98

Here is the caller graph for this function:

void GMocrenTrack::translate ( std::vector< float > &  _tranlate)

Definition at line 283 of file G4GMocrenIO.cc.

283  {
284  std::vector<struct Step>::iterator itr = kTrack.begin();
285  for(; itr != kTrack.end(); itr++) {
286  for(int i = 0; i < 3; i++ ) {
287  itr->startPoint[i] += _translate[i];
288  itr->endPoint[i] += _translate[i];
289  }
290  }
291 }
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98

Member Data Documentation

unsigned char GMocrenTrack::kColor[3]
protected

Definition at line 99 of file G4GMocrenIO.hh.

std::vector<struct Step> GMocrenTrack::kTrack
protected

Definition at line 98 of file G4GMocrenIO.hh.


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