73 fVisibility = kBothVisible;
92 static Int_t counter = 0;
95 if(!(counter%1000))std::cout<<
"TVolume count="<<counter<<
" name="<<name<<std::endl;
138 const Int_t mapVis[4] = {1, -2, 0, -1 };
148 const Int_t mapVis[4] = {1, -2, 0, -1 };
151 for (i =0; i<3;i++)
if (mapVis[i] == vis)
return i;
176 while ( (node = (
TNode *) next()) ){
191 if (IsMaster)
fShape = shape;
222 TIter next(positions);
258 else Error(
"Add",
"Can not create list of positions for the current node <%s>:<%s>",
GetName(),
GetTitle());
285 if (!volume)
return 0;
290 return Add(volume,position);
303 if (!volume)
return 0;
309 return Add(volume,position);
322 posNumber = nodePosition->
GetId();
329 b->
Add(nodePosition,posName.
Data());
352 const Int_t big = 9999;
355 const Int_t inaxis = 7;
356 const Int_t maxdist = 5;
364 if (px < puxmin - inaxis)
return big;
365 if (py > puymin + inaxis)
return big;
366 if (px > puxmax + inaxis)
return big;
367 if (py < puymax - inaxis)
return big;
370 if (!view)
return big;
374 if (!position) position = &nullPosition;
380 while ((shape = (
TShape *)nextShape())) {
384 if (dshape < maxdist) {
385 gPad->SetSelected(
this);
388 if (dshape < dist) dist = dshape;
398 if (posList && posList->
GetSize()) {
403 while ((obj = next())) {
407 if (dnode <= 0)
break;
408 if (dnode < dist) dist = dnode;
415 gPad->SetSelected(view);
430 gROOT->MakeDefCanvas();
436 Int_t iopt = atoi(option);
446 while (parent && ++iopt);
450 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05) 505 gIdentity->
SetName(
"Identity");
506 gIdentity->
SetTitle(
"Identity matrix");
509 memset(identityMatrix,0,9*
sizeof(
Double_t));
511 identityMatrix += 4; *identityMatrix = 1;
512 identityMatrix += 4; *identityMatrix = 1;
525 static char info[512];
528 ((
TPad *)
gPad)->AbsPixeltoXY(px,py,x[0],x[1]);
535 while( (shape = (
TShape *)nextShape()) ) {
536 Int_t nchi = strlen(info);
558 while ( (volume = (
TVolume *)next()) )
593 if (option) iopt = atoi(option);
594 if ( (0 < iopt) && (iopt <= level) )
return;
600 if (!position) position = &nullPosition;
612 if (posList && posList->
GetSize()) {
634 Bool_t rangeView = option && option[0]==
'r';
644 while( (shape = (
TShape *)nextShape()) ) {
657 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05) 672 const_cast<TBuffer3D &
>(buffer).fID =
this;
674 Int_t reqSections = viewer3D->
AddObject(buffer, &viewerWantsSons);
681 shape->
Paint(option);
692 if (!position)
return;
698 if (nextPosition && nextPosition == position) {
722 TCanvas dummyPad(
"--Dumm--",
"dum",1,1);
733 if (savePad) savePad->
cd();
757 while( (shape = (
TShape *)nextShape()) ) {
764 if (!
Nodes())
return;
768 while ((obj = next())) {
virtual void DeletePosition(TVolumePosition *position)
DeletePosition deletes the position of the TVolume *node from this TVolume and removes that volume fr...
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
virtual Double_t GetY() const
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetId() const
virtual Double_t * GetMatrix()
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
void AddFirst(TObject *obj)
Add object at the beginning of the list.
static Double_t gTranslation[kMAXLEVELS][kVectorSize]
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual void Add(TDataSet *dataset)
virtual ENodeSEEN GetVisibility() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual TRotMatrix * GetMatrix() const
TList * GetListOfNodes() const
static Int_t MapGEANT2StNodeVis(Int_t vis)
ENodeSEEN TVolume::MapGEANT2StNodeVis(Int_t vis) Maps the value of GEANT 3.21 "volume attributes" to ...
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
static Int_t MapStNode2GEANTVis(ENodeSEEN vis)
ENodeSEEN Visibility flag 00 - everything visible, 10 - this invisible, but sons are visible 01 - thi...
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
virtual void cd(const char *path=0)
Change Current Reference node to this.
void ToLower()
Change string to lower-case.
virtual Double_t GetX() const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void Draw(Option_t *depth="3")
Default Draw method for all objects.
virtual Double_t GetZ() const
virtual void Remove(TDataSet *set)
Remiove the "set" from this TDataSet.
void identityMatrix(AMatrix &X)
Set matrix to the identity matrix.
virtual void Modify()
Change current line attributes if necessary.
virtual void SetMatrix(const Double_t *matrix)
copy predefined 3x3 matrix into TRotMatrix object
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Width_t GetLineWidth() const
Return the line width.
virtual void PaintShape(Option_t *option="")
Paint shape of the volume To be called from the TObject::Paint method only.
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
const TRotMatrix * GetMatrix() const
virtual Style_t GetLineStyle() const
Return the line style.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Fill Area Attributes class.
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
virtual void Add(TDataSet *dataset)
virtual void SetVisibility(Int_t vis=1)
Set visibility for this node and its sons.
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void ImportShapeAttributes()
TShape * GetShape() const
const Option_t * GetOption() const
virtual TList * GetListOfPositions()
TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual Int_t PushLevel()
Abstract 3D shapes viewer.
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
to be documented
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Using a TBrowser one can browse all ROOT objects.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Double_t GetX(Int_t indx=0) const
static TRotMatrix * gIdentity
This is the base class for all geometry shapes.
Manages a detector rotation matrix.
const Option_t * GetOption() const
virtual void PaintNodePosition(Option_t *option="", TVolumePosition *postion=0)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void Browse(TBrowser *b)
to be documented
virtual void UpdatePosition(Option_t *option="")
to be documented
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
virtual TNode * CreateTNode(const TVolumePosition *position=0)
Convert a TVolume object into a TNode.
TVolume()
TVolume description.
The most important graphics class in the ROOT system.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Generic 3D primitive description class.
virtual void ImportShapeAttributes()
Copy shape attributes as node attributes.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
virtual TList * Nodes() const
virtual TObjLink * FirstLink() const
virtual void SetId(UInt_t id)
virtual Color_t GetLineColor() const
Return the line color.
virtual void DrawOnly(Option_t *option="")
virtual void Paint(Option_t *option="")
This method is used only when a shape is painted outside a TNode.
THashList * GetListOfMatrices() const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
Wrapper around a TObject so it can be stored in a TList.
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Double_t GetY() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void SetPositionsList(TList *list=0)
virtual Int_t DistancetoNodePrimitive(Int_t px, Int_t py, TVolumePosition *position=0)
Compute distance from point px,py to a TVolumeView.
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
virtual void SetGeomLevel(Int_t level=0)
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
virtual TVolume * GetNode() const
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
TObject * GetObject() const
TShape * GetShape() const
virtual void Add(TObject *obj)
virtual void GetLocalRange(Float_t *min, Float_t *max)
GetRange.
virtual void GetRange(Float_t *min, Float_t *max)=0
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
static Double_t gRotMatrix[kMAXLEVELS][kMatrixSize]
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Int_t GetSize() const
virtual Double_t GetZ() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
R__EXTERN TGeometry * gGeometry
Int_t GetVisibility() const
virtual TSeqCollection * GetCollection() const
virtual void PushMatrix()
Int_t GetVisibility() const
TShape * GetShape(const char *name) const
Return pointer to Shape with name.
virtual const char * GetTitle() const
Returns title of object.
virtual TDataSet * GetParent() const
const char * Data() const