89 static Int_t counter = 0;
108 Printf(
"Error Referenced shape does not exist: %s",shapename);
157 if(!shape) {
Printf(
"Illegal referenced shape");
return;}
186 fVisibility(no.fVisibility)
263 const Int_t big = 9999;
264 const Int_t inaxis = 7;
265 const Int_t maxdist = 5;
273 if (px < puxmin - inaxis)
return big;
274 if (py > puymin + inaxis)
return big;
275 if (px > puxmax + inaxis)
return big;
276 if (py < puymax - inaxis)
return big;
279 if (!view)
return big;
291 if (
dist < maxdist) {
292 gPad->SetSelected(
this);
308 while ((obj = next())) {
311 if (dnode <= 0)
break;
330 gROOT->MakeDefCanvas();
351 gPad->GetViewer3D(option);
381 TNode *node, *nodefound;
388 if (nodefound)
return nodefound;
400 const char *snull =
"";
401 if (!
gPad)
return (
char*)snull;
404 return const_cast<char*
>(info.
Data());
454 x = bomb*translation[0]
457 + local[2]*matrix[6];
459 y = bomb*translation[1]
462 + local[2]*matrix[7];
464 z = bomb*translation[2]
467 + local[2]*matrix[8];
469 master[0] =
x; master[1] =
y; master[2] = z;
488 x = bomb*translation[0]
491 + local[2]*matrix[6];
493 y = bomb*translation[1]
496 + local[2]*matrix[7];
498 z = bomb*translation[2]
501 + local[2]*matrix[8];
503 master[0] =
x; master[1] =
y; master[2] = z;
518 if (opt.
Contains(
"1")) maxlevel = 1;
519 if (opt.
Contains(
"2")) maxlevel = 2;
520 if (opt.
Contains(
"3")) maxlevel = 3;
521 if (opt.
Contains(
"4")) maxlevel = 4;
522 if (opt.
Contains(
"5")) maxlevel = 5;
529 const char *shapename, *matrixname;
531 else shapename =
"????";
538 std::cout<<
" NumPoints="<<
gSize3D.numPoints;
539 std::cout<<
" NumSegs ="<<
gSize3D.numSegs;
540 std::cout<<
" NumPolys ="<<
gSize3D.numPolys;
542 std::cout<<
" X="<<
fX<<
" Y="<<
fY<<
" Z="<<
fZ;
543 if (nsons) std::cout<<
" Sons="<<nsons;
545 else matrixname =
"Identity";
546 if(strcmp(matrixname,
"Identity")) std::cout<<
" Rot="<<matrixname;
548 std::cout<<std::endl;
576 Double_t xms = master[0] - bomb*translation[0];
577 Double_t yms = master[1] - bomb*translation[1];
578 Double_t zms = master[2] - bomb*translation[2];
580 x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
581 y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
582 z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];
584 local[0] =
x; local[1] =
y; local[2] = z;
603 Double_t xms = master[0] - bomb*translation[0];
604 Double_t yms = master[1] - bomb*translation[1];
605 Double_t zms = master[2] - bomb*translation[2];
607 x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
608 y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
609 z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];
611 local[0] =
x; local[1] =
y; local[2] = z;
659 Int_t reqSections = viewer3D->
AddObject(buffer, &viewerWantsSons);
663 viewer3D->
AddObject(buffer, &viewerWantsSons);
670 if(!nsons || !viewerWantsSons)
return;
676 while ((obj = next())) {
728 printf(
"Error: Cannot set parent node to be a child node:%s\n",
GetName());
729 printf(
" Operation not performed!\n");
767 }
else if (vis == -3 ) {
772 }
else if (vis == -2) {
776 }
else if (vis == -1) {
780 }
else if (vis == 0) {
783 }
else if (vis == 1) {
786 }
else if (vis == 2) {
790 }
else if (vis == 3) {
810 while ((obj = next())) {
830 TAttLine::Streamer(
b);
831 TAttFill::Streamer(
b);
842 b.CheckByteCount(R__s, R__c, TNode::IsA());
893 dxnew[0] = dx[0] +
x*rmat[0] +
y*rmat[3] + z*rmat[6];
894 dxnew[1] = dx[1] +
x*rmat[1] +
y*rmat[4] + z*rmat[7];
895 dxnew[2] = dx[2] +
x*rmat[2] +
y*rmat[5] + z*rmat[8];
897 rmatnew[0] = rmat[0]*matrix[0] + rmat[3]*matrix[1] + rmat[6]*matrix[2];
898 rmatnew[1] = rmat[1]*matrix[0] + rmat[4]*matrix[1] + rmat[7]*matrix[2];
899 rmatnew[2] = rmat[2]*matrix[0] + rmat[5]*matrix[1] + rmat[8]*matrix[2];
900 rmatnew[3] = rmat[0]*matrix[3] + rmat[3]*matrix[4] + rmat[6]*matrix[5];
901 rmatnew[4] = rmat[1]*matrix[3] + rmat[4]*matrix[4] + rmat[7]*matrix[5];
902 rmatnew[5] = rmat[2]*matrix[3] + rmat[5]*matrix[4] + rmat[8]*matrix[5];
903 rmatnew[6] = rmat[0]*matrix[6] + rmat[3]*matrix[7] + rmat[6]*matrix[8];
904 rmatnew[7] = rmat[1]*matrix[6] + rmat[4]*matrix[7] + rmat[7]*matrix[8];
905 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]
Binding & operator=(OUT(*fun)(void))
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.
@ kNotDeleted
object has not been deleted
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
double dist(Rotation3D const &r1, Rotation3D const &r2)