Public Member Functions | |
Surface (BLCMDtorus *_torus, G4RotationMatrix *globalRotation, G4ThreeVector &globalPosition) | |
void | callback (int type) |
Private Attributes | |
BLCMDtorus * | torus |
G4RotationMatrix * | rot |
G4ThreeVector | position |
Surface::Surface | ( | BLCMDtorus * | _torus, | |
G4RotationMatrix * | globalRotation, | |||
G4ThreeVector & | globalPosition | |||
) | [inline] |
References BLManager::getObject(), position, BLManager::registerCallback(), rot, and torus.
00120 { torus = _torus; rot = globalRotation; position = globalPosition; 00121 BLManager::getObject()->registerCallback(this,4); 00122 }
void Surface::callback | ( | int | type | ) | [virtual] |
Reimplemented from BLCallback.
References position, rot, BLCMDtorus::torus, and torus.
00266 { 00267 G4VVisManager* visManager = G4VVisManager::GetConcreteInstance(); 00268 if(visManager) { 00269 printf("Surface::callback(%d)\n",type); 00270 for(int i=0; i<5000; ++i) { 00271 G4ThreeVector pos = torus->torus->GetPointOnSurface(); 00272 if(rot) pos = *rot * pos; 00273 pos += position; 00274 G4Circle circle(pos); 00275 circle.SetScreenDiameter(1.0); 00276 circle.SetFillStyle(G4Circle::filled); 00277 G4Colour colour(1.,0.,0.); 00278 G4VisAttributes attribs(colour); 00279 circle.SetVisAttributes(attribs); 00280 visManager->Draw(circle); 00281 } 00282 } 00283 }
BLCMDtorus* Surface::torus [private] |
Referenced by callback(), and Surface().
G4RotationMatrix* Surface::rot [private] |
Referenced by callback(), and Surface().
G4ThreeVector Surface::position [private] |
Referenced by callback(), and Surface().