90 static Int_t counter = 0;
109 Printf(
"Error Referenced shape does not exist: %s",shapename);
158 if(!shape) {
Printf(
"Illegal referenced shape");
return;}
187 fVisibility(no.fVisibility)
198 TAttLine::operator=(no);
199 TAttFill::operator=(no);
200 TAtt3D::operator=(no);
264 const Int_t big = 9999;
265 const Int_t inaxis = 7;
266 const Int_t maxdist = 5;
274 if (px < puxmin - inaxis)
return big;
275 if (py > puymin + inaxis)
return big;
276 if (px > puxmax + inaxis)
return big;
277 if (py < puymax - inaxis)
return big;
280 if (!view)
return big;
292 if (dist < maxdist) {
293 gPad->SetSelected(
this);
309 while ((obj = next())) {
312 if (dnode <= 0)
break;
313 if (dnode < dist) dist = dnode;
331 gROOT->MakeDefCanvas();
352 gPad->GetViewer3D(option);
382 TNode *node, *nodefound;
389 if (nodefound)
return nodefound;
401 const char *snull =
"";
402 if (!
gPad)
return (
char*)snull;
405 return const_cast<char*
>(info.
Data());
455 x = bomb*translation[0]
458 + local[2]*matrix[6];
460 y = bomb*translation[1]
463 + local[2]*matrix[7];
465 z = bomb*translation[2]
468 + local[2]*matrix[8];
470 master[0] =
x; master[1] =
y; master[2] = z;
489 x = bomb*translation[0]
492 + local[2]*matrix[6];
494 y = bomb*translation[1]
497 + local[2]*matrix[7];
499 z = bomb*translation[2]
502 + local[2]*matrix[8];
504 master[0] =
x; master[1] =
y; master[2] = z;
519 if (opt.
Contains(
"1")) maxlevel = 1;
520 if (opt.
Contains(
"2")) maxlevel = 2;
521 if (opt.
Contains(
"3")) maxlevel = 3;
522 if (opt.
Contains(
"4")) maxlevel = 4;
523 if (opt.
Contains(
"5")) maxlevel = 5;
530 const char *shapename, *matrixname;
532 else shapename =
"????";
539 std::cout<<
" NumPoints="<<
gSize3D.numPoints;
540 std::cout<<
" NumSegs ="<<
gSize3D.numSegs;
541 std::cout<<
" NumPolys ="<<
gSize3D.numPolys;
543 std::cout<<
" X="<<
fX<<
" Y="<<
fY<<
" Z="<<
fZ;
544 if (nsons) std::cout<<
" Sons="<<nsons;
546 else matrixname =
"Identity";
547 if(strcmp(matrixname,
"Identity")) std::cout<<
" Rot="<<matrixname;
549 std::cout<<std::endl;
577 Double_t xms = master[0] - bomb*translation[0];
578 Double_t yms = master[1] - bomb*translation[1];
579 Double_t zms = master[2] - bomb*translation[2];
581 x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
582 y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
583 z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];
585 local[0] =
x; local[1] =
y; local[2] = z;
604 Double_t xms = master[0] - bomb*translation[0];
605 Double_t yms = master[1] - bomb*translation[1];
606 Double_t zms = master[2] - bomb*translation[2];
608 x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
609 y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
610 z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];
612 local[0] =
x; local[1] =
y; local[2] = z;
660 Int_t reqSections = viewer3D->
AddObject(buffer, &viewerWantsSons);
664 viewer3D->
AddObject(buffer, &viewerWantsSons);
671 if(!nsons || !viewerWantsSons)
return;
677 while ((obj = next())) {
729 printf(
"Error: Cannot set parent node to be a child node:%s\n",
GetName());
730 printf(
" Operation not performed!\n");
768 }
else if (vis == -3 ) {
773 }
else if (vis == -2) {
777 }
else if (vis == -1) {
781 }
else if (vis == 0) {
784 }
else if (vis == 1) {
787 }
else if (vis == 2) {
791 }
else if (vis == 3) {
811 while ((obj = next())) {
826 b.ReadClassBuffer(TNode::Class(),
this, R__v, R__s, R__c);
831 TAttLine::Streamer(
b);
832 TAttFill::Streamer(
b);
843 b.CheckByteCount(R__s, R__c, TNode::IsA());
847 b.WriteClassBuffer(TNode::Class(),
this);
894 dxnew[0] = dx[0] +
x*rmat[0] +
y*rmat[3] + z*rmat[6];
895 dxnew[1] = dx[1] +
x*rmat[1] +
y*rmat[4] + z*rmat[7];
896 dxnew[2] = dx[2] +
x*rmat[2] +
y*rmat[5] + z*rmat[8];
898 rmatnew[0] = rmat[0]*matrix[0] + rmat[3]*matrix[1] + rmat[6]*matrix[2];
899 rmatnew[1] = rmat[1]*matrix[0] + rmat[4]*matrix[1] + rmat[7]*matrix[2];
900 rmatnew[2] = rmat[2]*matrix[0] + rmat[5]*matrix[1] + rmat[8]*matrix[2];
901 rmatnew[3] = rmat[0]*matrix[3] + rmat[3]*matrix[4] + rmat[6]*matrix[5];
902 rmatnew[4] = rmat[1]*matrix[3] + rmat[4]*matrix[4] + rmat[7]*matrix[5];
903 rmatnew[5] = rmat[2]*matrix[3] + rmat[5]*matrix[4] + rmat[8]*matrix[5];
904 rmatnew[6] = rmat[0]*matrix[6] + rmat[3]*matrix[7] + rmat[6]*matrix[8];
905 rmatnew[7] = rmat[1]*matrix[6] + rmat[4]*matrix[7] + rmat[7]*matrix[8];
906 rmatnew[8] = rmat[2]*matrix[6] + rmat[5]*matrix[7] + rmat[8]*matrix[8];
R__EXTERN TGeometry * gGeometry
static Double_t gRotMatrix[kMAXLEVELS][kMatrixSize]
static Double_t gTranslation[kMAXLEVELS][kVectorSize]
void Printf(const char *fmt,...)
Use this attribute class when an object should have 3D capabilities.
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual void Modify()
Change current line attributes if necessary.
Using a TBrowser one can browse all ROOT objects.
Generic 3D primitive description class.
Buffer base class used for serializing objects.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
TNode * GetCurrentNode() const
virtual void SetCurrentNode(TNode *node)
virtual void SetGeomLevel(Int_t level=0)
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual Int_t PushLevel()
TShape * GetShape(const char *name) const
Return pointer to Shape with name.
TList * GetListOfNodes() const
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObjLink * FirstLink() const
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
virtual const char * GetName() const
Returns name of object.
virtual void Draw(Option_t *option="")
Draw Referenced node with current parameters.
virtual void Master2Local(const Double_t *master, Double_t *local)
Convert one point from master system to local reference system.
virtual void UpdateTempMatrix(const Double_t *dx1, const Double_t *rmat1, Double_t x, Double_t y, Double_t z, Double_t *matrix, Double_t *dxnew, Double_t *rmatnew)
Compute new translation vector and global matrix.
virtual void UpdateMatrix()
Update global rotation matrix/translation vector for this node this function must be called before in...
virtual TNode * GetParent() const
Bool_t IsFolder() const
Return TRUE if node contains nodes, FALSE otherwise.
virtual void SetNameTitle(const char *name, const char *title)
Change the name and title of this Node.
virtual Double_t GetY() const
virtual ~TNode()
Node default destructor.
virtual Double_t GetX() const
virtual TRotMatrix * GetMatrix() const
virtual void BuildListOfNodes()
Create the list to support sons of this node.
TNode()
Node default constructor.
virtual void ls(Option_t *option="2") const
List Referenced object with current parameters.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void Browse(TBrowser *b)
Browse.
virtual void DrawOnly(Option_t *option="")
Draw only Sons of this node.
virtual void Paint(Option_t *option="")
Paint Referenced node with current parameters.
virtual Double_t GetZ() const
TNode & operator=(const TNode &)
assignment operator
virtual void SetName(const char *name)
Change the name of this Node.
virtual void Local2Master(const Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
virtual void SetParent(TNode *parent)
Set the pointer to the parent, keep parents informed about who they have.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Get object info.
virtual void Sizeof3D() const
Return total size of this 3-D Node with its attributes.
virtual void ImportShapeAttributes()
Copy shape attributes as node attributes.
virtual void SetVisibility(Int_t vis=1)
Set visibility for this node and its sons.
TList * GetListOfNodes() const
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of nodes of this node.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a Node.
virtual void cd(const char *path=0)
Change Current Reference node to this.
virtual TNode * GetNode(const char *name) const
Return pointer to node with name in the node tree.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Mother of all ROOT objects.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
Manages a detector rotation matrix.
virtual Double_t * GetMatrix()
virtual Bool_t IsReflection() const
This is the base class for all geometry shapes.
Int_t GetVisibility() const
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
void ToLower()
Change string to lower-case.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
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.
Abstract 3D shapes viewer.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.