Surface Class Reference

Inheritance diagram for Surface:

BLCallback

List of all members.


Detailed Description

class Surface will display points on the surface of a torus

Public Member Functions

 Surface (BLCMDtorus *_torus, G4RotationMatrix *globalRotation, G4ThreeVector &globalPosition)
void callback (int type)

Private Attributes

BLCMDtorustorus
G4RotationMatrix * rot
G4ThreeVector position

Constructor & Destructor Documentation

Surface::Surface ( BLCMDtorus _torus,
G4RotationMatrix *  globalRotation,
G4ThreeVector &  globalPosition 
) [inline]

References BLManager::getObject(), position, BLManager::registerCallback(), rot, and torus.

00121                 { torus = _torus; rot = globalRotation; position = globalPosition; 
00122                   BLManager::getObject()->registerCallback(this,4);
00123                 }


Member Function Documentation

void Surface::callback ( int  type  )  [virtual]

Reimplemented from BLCallback.

References position, rot, BLCMDtorus::torus, and torus.

00267 {
00268         G4VVisManager* visManager = G4VVisManager::GetConcreteInstance(); 
00269         if(visManager) { 
00270                 printf("Surface::callback(%d)\n",type);
00271                 for(int i=0; i<5000; ++i) {
00272                         G4ThreeVector pos = torus->torus->GetPointOnSurface();
00273                         if(rot) pos = *rot * pos;
00274                         pos += position;
00275                         G4Circle circle(pos);
00276                         circle.SetScreenDiameter(1.0);
00277                         circle.SetFillStyle(G4Circle::filled);
00278                         G4Colour colour(1.,0.,0.);
00279                         G4VisAttributes attribs(colour);
00280                         circle.SetVisAttributes(attribs);
00281                         visManager->Draw(circle);
00282                 }
00283         }
00284 }


Member Data Documentation

Referenced by callback(), and Surface().

G4RotationMatrix* Surface::rot [private]

Referenced by callback(), and Surface().

G4ThreeVector Surface::position [private]

Referenced by callback(), and Surface().


The documentation for this class was generated from the following file:
g4beamline