ROOT logo
// @(#)root/g3d:$Id: TNode.cxx 41218 2011-10-06 13:16:33Z couet $
// Author: Rene Brun   14/09/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "Riostream.h"
#include "TROOT.h"
#include "TClass.h"
#include "TVirtualPad.h"
#include "TView.h"
#include "TGeometry.h"
#include "TRotMatrix.h"
#include "TShape.h"
#include "TNode.h"
#include "TBrowser.h"
#include "X3DBuffer.h"
#include "TVirtualViewer3D.h"
#include "TBuffer3D.h"

#if 0
const Int_t kMAXLEVELS = 20;
const Int_t kVectorSize = 3;
const Int_t kMatrixSize = kVectorSize*kVectorSize;
#endif

static Double_t gTranslation[kMAXLEVELS][kVectorSize];
static Double_t gRotMatrix[kMAXLEVELS][kMatrixSize];
static Int_t gGeomLevel = 0;

TNode *gNode;


ClassImp(TNode)


//______________________________________________________________________________
//                    T N O D E  description
//                    ======================
//
//    A TNode object is used to build the geometry hierarchy (see TGeometry).
//    A node may contain other nodes.
//
//    A geometry node has attributes:
//      - name and title
//      - pointer to the referenced shape (see TShape).
//      - x,y,z offset with respect to the mother node.
//      - pointer to the rotation matrix (see TRotMatrix).
//
//    A node can be drawn.


//______________________________________________________________________________
TNode::TNode()
{
   // Node default constructor.

   fMatrix = 0;
   fParent = 0;
   fShape  = 0;
   fNodes  = 0;
   fVisibility = 1;
   fX = fY = fZ = 0;
}


//______________________________________________________________________________
TNode::TNode(const char *name, const char *title, const char *shapename, Double_t x, Double_t y, Double_t z, const char *matrixname, Option_t *option)
       :TNamed(name,title),TAttLine(), TAttFill()
{
   // Node normal constructor.
   //
   //    name    is the name of the node
   //    title   is title
   //    shapename is the name of the referenced shape
   //    x,y,z   are the offsets of the volume with respect to his mother
   //    matrixname  is the name of the rotation matrix
   //
   //    This new node is added into the list of sons of the current node

#ifdef WIN32
   // The color "1" - default produces a very bad 3D image with OpenGL
   Color_t lcolor = 16;
   SetLineColor(lcolor);
#endif
   static Int_t counter = 0;
   counter++;
   fX      = x;
   fY      = y;
   fZ      = z;
   fNodes  = 0;
   fShape  = gGeometry->GetShape(shapename);
   fParent = gGeometry->GetCurrentNode();
   fOption = option;
   fVisibility = 1;

   if (strlen(matrixname)) fMatrix = gGeometry->GetRotMatrix(matrixname);
   else {
      fMatrix = gGeometry->GetRotMatrix("Identity");
      if (!fMatrix)
         fMatrix  = new TRotMatrix("Identity","Identity matrix",90,0,90,90,0,0);
   }

   if (!fShape) {
      Printf("Error Referenced shape does not exist: %s",shapename);
      return;
   }

   ImportShapeAttributes();
   if (fParent) {
      fParent->BuildListOfNodes();
      fParent->GetListOfNodes()->Add(this);
   } else {
      gGeometry->GetListOfNodes()->Add(this);
      cd();
   }
}


//______________________________________________________________________________
TNode::TNode(const char *name, const char *title, TShape *shape, Double_t x, Double_t y, Double_t z, TRotMatrix *matrix, Option_t *option)
                :TNamed(name,title),TAttLine(),TAttFill()
{
   // Node normal constructor.
   //
   //    name    is the name of the node
   //    title   is title
   //    shape   is the pointer to the shape definition
   //    x,y,z   are the offsets of the volume with respect to his mother
   //    matrix  is the pointer to the rotation matrix
   //
   //    This new node is added into the list of sons of the current node

#ifdef WIN32
//*-* The color "1" - default produces a very bad 3D image with OpenGL
   Color_t lcolor = 16;
   SetLineColor(lcolor);
#endif

   fX      = x;
   fY      = y;
   fZ      = z;
   fNodes  = 0;
   fShape  = shape;
   fMatrix = matrix;
   fOption = option;
   fVisibility = 1;
   fParent = gGeometry->GetCurrentNode();
   if(!fMatrix) {
      fMatrix =gGeometry->GetRotMatrix("Identity");
      if (!fMatrix)
         fMatrix  = new TRotMatrix("Identity","Identity matrix",90,0,90,90,0,0);
   }

   if(!shape) {Printf("Illegal referenced shape"); return;}

   if (fParent) {
      fParent->BuildListOfNodes();
      fParent->GetListOfNodes()->Add(this);
      ImportShapeAttributes();
   } else {
      gGeometry->GetListOfNodes()->Add(this);
      cd();
   }

}

//______________________________________________________________________________
TNode::TNode(const TNode& no) :
  TNamed(no),
  TAttLine(no),
  TAttFill(no),
  TAtt3D(no),
  fX(no.fX),
  fY(no.fY),
  fZ(no.fZ),
  fMatrix(no.fMatrix),
  fShape(no.fShape),
  fParent(no.fParent),
  fNodes(no.fNodes),
  fOption(no.fOption),
  fVisibility(no.fVisibility)
{ 
//copy constructor
}

//______________________________________________________________________________
TNode& TNode::operator=(const TNode& no)
{
   //assignement operator
   if(this!=&no) {
      TNamed::operator=(no);
      TAttLine::operator=(no);
      TAttFill::operator=(no);
      TAtt3D::operator=(no);
      fX=no.fX;
      fY=no.fY;
      fZ=no.fZ;
      fMatrix=no.fMatrix;
      fShape=no.fShape;
      fParent=no.fParent;
      fNodes=no.fNodes;
      fOption=no.fOption;
      fVisibility=no.fVisibility;
   }
   return *this;
}

//______________________________________________________________________________
TNode::~TNode()
{
   // Node default destructor.

   if (fParent)     fParent->GetListOfNodes()->Remove(this);
   else    {if (gGeometry) gGeometry->GetListOfNodes()->Remove(this);}
   if (fNodes) fNodes->Delete();
   if (gGeometry && gGeometry->GetCurrentNode() == this) gGeometry->SetCurrentNode(0);
   delete fNodes;
   fNodes = 0;
}


//______________________________________________________________________________
void TNode::Browse(TBrowser *b)
{
   // Browse.

   if( fNodes ) {
      fNodes->Browse( b );
   } else {
      Draw();
      gPad->Update();
   }
}


//______________________________________________________________________________
void TNode::BuildListOfNodes()
{
   // Create the list to support sons of this node.

   if (!fNodes) fNodes   = new TList;
}


//______________________________________________________________________________
void TNode::cd(const char *)
{
   // Change Current Reference node to this.

   gGeometry->SetCurrentNode(this);
}


//______________________________________________________________________________
Int_t TNode::DistancetoPrimitive(Int_t px, Int_t py)
{
   // Compute distance from point px,py to a Node.
   //
   //  Compute the closest distance of approach from point px,py to this node.
   //  The distance is computed in pixels units.

   const Int_t big = 9999;
   const Int_t inaxis = 7;
   const Int_t maxdist = 5;

   Int_t puxmin = gPad->XtoAbsPixel(gPad->GetUxmin());
   Int_t puymin = gPad->YtoAbsPixel(gPad->GetUymin());
   Int_t puxmax = gPad->XtoAbsPixel(gPad->GetUxmax());
   Int_t puymax = gPad->YtoAbsPixel(gPad->GetUymax());

   // return if point is not in the user area
   if (px < puxmin - inaxis) return big;
   if (py > puymin + inaxis) return big;
   if (px > puxmax + inaxis) return big;
   if (py < puymax - inaxis) return big;

   TView *view =gPad->GetView();
   if (!view) return big;

   // Update translation vector and rotation matrix for new level
   if (fMatrix && gGeometry) {
      gGeometry->UpdateTempMatrix(fX,fY,fZ,fMatrix->GetMatrix(),fMatrix->IsReflection());
   }

   // Paint Referenced shape
   Int_t dist = big;
   if (fVisibility && fShape->GetVisibility()) {
      gNode = this;
      dist = fShape->DistancetoPrimitive(px,py);
      if (dist < maxdist) {
         gPad->SetSelected(this);
         return 0;
      }
   }
   if ( TestBit(kSonsInvisible) ) return dist;
   if (!gGeometry) return dist;

   // Loop on all sons
   Int_t nsons = 0;
   if (fNodes) nsons = fNodes->GetSize();
   Int_t dnode = dist;
   if (nsons) {
      gGeometry->PushLevel();
      TNode *node;
      TObject *obj;
      TIter  next(fNodes);
      while ((obj = next())) {
         node = (TNode*)obj;
         dnode = node->DistancetoPrimitive(px,py);
         if (dnode <= 0) break;
         if (dnode < dist) dist = dnode;
      }
      gGeometry->PopLevel();
   }

   return dnode;
}


//______________________________________________________________________________
void TNode::Draw(Option_t *option)
{
   // Draw Referenced node with current parameters.

   TString opt = option;
   opt.ToLower();

   // Clear pad if option "same" not given
   if (!gPad) {
      gROOT->MakeDefCanvas();
   }
   if (!opt.Contains("same")) gPad->Clear();

   // Draw Referenced node
   if (!gGeometry) new TGeometry;
   gGeometry->SetGeomLevel();
   gGeometry->UpdateTempMatrix();

   AppendPad(option);

   // Create a 3-D view
   TView *view = gPad->GetView();
   if (!view) {
      view = TView::CreateView(11,0,0);
      // Set the view to perform a first autorange (frame) draw. 
      // TViewer3DPad will revert view to normal painting after this
      if (view) view->SetAutoRange(kTRUE);
   }
   
   // Create a 3D viewer to draw us
   gPad->GetViewer3D(option);
}


//______________________________________________________________________________
void TNode::DrawOnly(Option_t *option)
{
   // Draw only Sons of this node.

   SetVisibility(2);
   Draw(option);
}


//______________________________________________________________________________
void TNode::ExecuteEvent(Int_t, Int_t, Int_t)
{
   // Execute action corresponding to one event.
   //
   //  This member function must be implemented to realize the action
   //  corresponding to the mouse click on the object in the window

   gPad->SetCursor(kHand);
}


//______________________________________________________________________________
TNode *TNode::GetNode(const char *name) const
{
   // Return pointer to node with name in the node tree.

   if (!strcmp(name, GetName())) return (TNode*)this;
   TNode *node, *nodefound;
   if (!fNodes) return 0;
   TObjLink *lnk = fNodes->FirstLink();
   while (lnk) {
      node = (TNode *)lnk->GetObject();
      if (node->TestBit(kNotDeleted)) {
         nodefound = node->GetNode(name);
         if (nodefound) return nodefound;
      }
      lnk = lnk->Next();
   }
   return 0;
}


//______________________________________________________________________________
char *TNode::GetObjectInfo(Int_t, Int_t) const
{
   // Get object info.

   const char *snull = "";
   if (!gPad) return (char*)snull;
   static TString info;
   info.Form("%s/%s, shape=%s/%s",GetName(),GetTitle(),fShape->GetName(),fShape->ClassName());
   return const_cast<char*>(info.Data());
}


//______________________________________________________________________________
void TNode::ImportShapeAttributes()
{
   // Copy shape attributes as node attributes.

   SetLineColor(fShape->GetLineColor());
   SetLineStyle(fShape->GetLineStyle());
   SetLineWidth(fShape->GetLineWidth());
   SetFillColor(fShape->GetFillColor());
   SetFillStyle(fShape->GetFillStyle());

   if (!fNodes) return;
   TNode *node;

   TObjLink *lnk = fNodes->FirstLink();
   while (lnk) {
      node = (TNode *)lnk->GetObject();
      node->ImportShapeAttributes();
      lnk = lnk->Next();
   }
}


//______________________________________________________________________________
Bool_t TNode::IsFolder() const
{
   // Return TRUE if node contains nodes, FALSE otherwise.

   if (fNodes) return kTRUE;
   else        return kFALSE;
}


//______________________________________________________________________________
void TNode::Local2Master(const Double_t *local, Double_t *master)
{
   // Convert one point from local system to master reference system.
   //
   //  Note that before invoking this function, the global rotation matrix
   //  and translation vector for this node must have been computed.
   //  This is automatically done by the Paint functions.
   //  Otherwise TNode::UpdateMatrix should be called before.

   Double_t x,y,z;
   Float_t bomb = gGeometry->GetBomb();

   Double_t *matrix      = &gRotMatrix[gGeomLevel][0];
   Double_t *translation = &gTranslation[gGeomLevel][0];

   x = bomb*translation[0]
     + local[0]*matrix[0]
     + local[1]*matrix[3]
     + local[2]*matrix[6];

   y = bomb*translation[1]
     + local[0]*matrix[1]
     + local[1]*matrix[4]
     + local[2]*matrix[7];

   z = bomb*translation[2]
     + local[0]*matrix[2]
     + local[1]*matrix[5]
     + local[2]*matrix[8];

   master[0] = x; master[1] = y; master[2] = z;
}


//______________________________________________________________________________
void TNode::Local2Master(const Float_t *local, Float_t *master)
{
   // Convert one point from local system to master reference system.
   //
   //  Note that before invoking this function, the global rotation matrix
   //  and translation vector for this node must have been computed.
   //  This is automatically done by the Paint functions.
   //  Otherwise TNode::UpdateMatrix should be called before.

   Float_t x,y,z;
   Float_t bomb = gGeometry->GetBomb();

   Double_t *matrix      = &gRotMatrix[gGeomLevel][0];
   Double_t *translation = &gTranslation[gGeomLevel][0];

   x = bomb*translation[0]
     + local[0]*matrix[0]
     + local[1]*matrix[3]
     + local[2]*matrix[6];

   y = bomb*translation[1]
     + local[0]*matrix[1]
     + local[1]*matrix[4]
     + local[2]*matrix[7];

   z = bomb*translation[2]
     + local[0]*matrix[2]
     + local[1]*matrix[5]
     + local[2]*matrix[8];

   master[0] = x; master[1] = y; master[2] = z;
}


//______________________________________________________________________________
void TNode::ls(Option_t *option) const
{
   // List Referenced object with current parameters.

   Int_t sizeX3D = 0;
   TString opt = option;
   opt.ToLower();

   if (!gGeometry) new TGeometry;

   Int_t maxlevel = 15;
   if (opt.Contains("1")) maxlevel = 1;
   if (opt.Contains("2")) maxlevel = 2;
   if (opt.Contains("3")) maxlevel = 3;
   if (opt.Contains("4")) maxlevel = 4;
   if (opt.Contains("5")) maxlevel = 5;
   if (opt.Contains("x")) sizeX3D  = 1;

   TROOT::IndentLevel();

   Int_t nsons = 0;
   if (fNodes) nsons = fNodes->GetSize();
   const char *shapename, *matrixname;
   if (fShape) shapename = fShape->IsA()->GetName();
   else        shapename = "????";
   cout<<GetName()<<":"<<GetTitle()<<" is a "<<shapename;
   if (sizeX3D) {
      gSize3D.numPoints = 0;
      gSize3D.numSegs   = 0;
      gSize3D.numPolys  = 0;
      Sizeof3D();
      cout<<" NumPoints="<<gSize3D.numPoints;
      cout<<" NumSegs  ="<<gSize3D.numSegs;
      cout<<" NumPolys ="<<gSize3D.numPolys;
   } else {
      cout<<" X="<<fX<<" Y="<<fY<<" Z="<<fZ;
      if (nsons) cout<<" Sons="<<nsons;
      if (fMatrix) matrixname   = fMatrix->GetName();
      else         matrixname   = "Identity";
      if(strcmp(matrixname,"Identity")) cout<<" Rot="<<matrixname;
   }
   cout<<endl;
   if(!nsons) return;
   if (gGeomLevel >= maxlevel) return;

   TROOT::IncreaseDirLevel();
   gGeomLevel++;
   fNodes->ls(option);
   gGeomLevel--;
   TROOT::DecreaseDirLevel();

}


//______________________________________________________________________________
void TNode::Master2Local(const Double_t *master, Double_t *local)
{
   // Convert one point from master system to local reference system.
   //
   //  Note that before invoking this function, the global rotation matrix
   //  and translation vector for this node must have been computed.
   //  This is automatically done by the Paint functions.
   //  Otherwise TNode::UpdateMatrix should be called before.

   Double_t x,y,z;
   Float_t bomb = gGeometry->GetBomb();

   Double_t *matrix      = &gRotMatrix[gGeomLevel][0];
   Double_t *translation = &gTranslation[gGeomLevel][0];

   Double_t xms = master[0] - bomb*translation[0];
   Double_t yms = master[1] - bomb*translation[1];
   Double_t zms = master[2] - bomb*translation[2];

   x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
   y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
   z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];

   local[0] = x; local[1] = y; local[2] = z;
}


//______________________________________________________________________________
void TNode::Master2Local(const Float_t *master, Float_t *local)
{
   // Convert one point from master system to local reference system.
   //
   //  Note that before invoking this function, the global rotation matrix
   //  and translation vector for this node must have been computed.
   //  This is automatically done by the Paint functions.
   //  Otherwise TNode::UpdateMatrix should be called before.

   Float_t x,y,z;
   Float_t bomb = gGeometry->GetBomb();

   Double_t *matrix      = &gRotMatrix[gGeomLevel][0];
   Double_t *translation = &gTranslation[gGeomLevel][0];

   Double_t xms = master[0] - bomb*translation[0];
   Double_t yms = master[1] - bomb*translation[1];
   Double_t zms = master[2] - bomb*translation[2];

   x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
   y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
   z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];

   local[0] = x; local[1] = y; local[2] = z;
}


//______________________________________________________________________________
void TNode::Paint(Option_t *option)
{
   // Paint Referenced node with current parameters.
   // 
   //  vis = 1  (default) shape is drawn
   //  vis = 0  shape is not drawn but its sons may be not drawn
   //  vis = -1 shape is not drawn. Its sons are not drawn
   //  vis = -2 shape is drawn. Its sons are not drawn

   Int_t level = 0;
   if (gGeometry) level = gGeometry->GeomLevel();

   // Update translation vector and rotation matrix for new level
   if (level) {
      gGeometry->UpdateTempMatrix(fX,fY,fZ,fMatrix->GetMatrix(),fMatrix->IsReflection());
   }

   // Paint Referenced shape
   Int_t nsons = 0;
   if (fNodes) nsons = fNodes->GetSize();

   TAttLine::Modify();
   TAttFill::Modify();

   Bool_t viewerWantsSons = kTRUE;

   if (fVisibility && fShape->GetVisibility()) {
      gNode = this;
      fShape->SetLineColor(GetLineColor());
      fShape->SetLineStyle(GetLineStyle());
      fShape->SetLineWidth(GetLineWidth());
      fShape->SetFillColor(GetFillColor());
      fShape->SetFillStyle(GetFillStyle());

      TVirtualViewer3D * viewer3D = gPad->GetViewer3D();
      if (viewer3D) {
         // We only provide master frame positions in these shapes
         // so don't ask viewer preference

         // Ask all shapes for kCore/kBoundingBox/kShapeSpecific
         // Not all will support the last two - which is fine
         const TBuffer3D & buffer = 
            fShape->GetBuffer3D(TBuffer3D::kCore|TBuffer3D::kBoundingBox|TBuffer3D::kShapeSpecific);

         Int_t reqSections = viewer3D->AddObject(buffer, &viewerWantsSons);
         if (reqSections != TBuffer3D::kNone)
         {
            fShape->GetBuffer3D(reqSections);
            viewer3D->AddObject(buffer, &viewerWantsSons);
         }
      }
   }
   if ( TestBit(kSonsInvisible) ) return;

   // Paint all sons
   if(!nsons || !viewerWantsSons) return;

   gGeometry->PushLevel();
   TNode *node;
   TObject *obj;
   TIter  next(fNodes);
   while ((obj = next())) {
      node = (TNode*)obj;
      node->Paint(option);
   }
   gGeometry->PopLevel();
}


//______________________________________________________________________________
void TNode::RecursiveRemove(TObject *obj)
{
   // Recursively remove object from the list of nodes of this node.

   if (fNodes && dynamic_cast<TNode*>(obj) ) fNodes->RecursiveRemove(obj);
}


//______________________________________________________________________________
void TNode::SetName(const char *name)
{
   // Change the name of this Node

   if (gPad) gPad->Modified();

   //  Nodes are named objects in a THashList.
   //  We must update the hashlist if we change the name
   if (fParent) fParent->GetListOfNodes()->Remove(this);
   fName = name;
   if (fParent) fParent->GetListOfNodes()->Add(this);
}


//______________________________________________________________________________
void TNode::SetNameTitle(const char *name, const char *title)
{
   // Change the name and title of this Node

   if (gPad) gPad->Modified();

   //  Nodes are named objects in a THashList.
   //  We must update the hashlist if we change the name
   if (fParent) fParent->GetListOfNodes()->Remove(this);
   fName  = name;
   fTitle = title;
   if (fParent) fParent->GetListOfNodes()->Add(this);
}


//______________________________________________________________________________
void TNode::SetParent(TNode *parent)
{
   // Set the pointer to the parent, keep parents informed about who they have

   TNode *pp = parent;
   while(pp) {
      if (pp == this) {
         printf("Error: Cannot set parent node to be a child node:%s\n",GetName());
         printf("       Operation not performed!\n");
         return;
      }
      pp = pp->GetParent();
   }

   if (fParent)   fParent->GetListOfNodes()->Remove(this);
   else         gGeometry->GetListOfNodes()->Remove(this);

   fParent = parent;

   if (fParent) {
      fParent->BuildListOfNodes(); // new parent might not have list
      fParent->GetListOfNodes()->Add(this);
   }
   else gGeometry->GetListOfNodes()->Add(this);
}


//______________________________________________________________________________
void TNode::SetVisibility(Int_t vis)
{
   // Set visibility for this node and its sons.
   //
   //  vis = 3  node is drawn and its sons are drawn
   //  vis = 2  node is not drawn but its sons are drawn
   //  vis = 1  (default) node is drawn
   //  vis = 0  node is not drawn
   //  vis = -1 node is not drawn. Its sons are not drawn
   //  vis = -2 node is drawn. Its sons are not drawn
   //  vis = -3 Only node leaves are drawn
   //  vis = -4 Node is not drawn. Its immediate sons are drawn

   ResetBit(kSonsInvisible);
   TNode *node;
   if (vis == -4 ) {         //Node is not drawn. Its immediate sons are drawn
      fVisibility = 0;
      if (!fNodes) { fVisibility = 1; return;}
      TIter  next(fNodes); while ((node = (TNode*)next())) { node->SetVisibility(-2); }
   } else if (vis == -3 ) {  //Only node leaves are drawn
      fVisibility = 0;
      if (!fNodes) { fVisibility = 1; return;}
      TIter  next(fNodes); while ((node = (TNode*)next())) { node->SetVisibility(-3); }

   } else if (vis == -2) {  //node is drawn. Its sons are not drawn
      fVisibility = 1; SetBit(kSonsInvisible); if (!fNodes) return;
      TIter  next(fNodes); while ((node = (TNode*)next())) { node->SetVisibility(-1); }

   } else if (vis == -1) {  //node is not drawn. Its sons are not drawn
      fVisibility = 0; SetBit(kSonsInvisible); if (!fNodes) return;
      TIter  next(fNodes); while ((node = (TNode*)next())) { node->SetVisibility(-1); }

   } else if (vis ==  0) {  //node is not drawn
      fVisibility = 0;

   } else if (vis ==  1) {  //node is drawn
      fVisibility = 1;

   } else if (vis ==  2) {  //node is not drawn but its sons are drawn
      fVisibility = 0; if (!fNodes) return;
      TIter  next(fNodes); while ((node = (TNode*)next())) { node->SetVisibility(3); }

   } else if (vis ==  3) {  //node is drawn and its sons are drawn
      fVisibility = 1; if (!fNodes) return;
      TIter  next(fNodes); while ((node = (TNode*)next())) { node->SetVisibility(3); }
   }
}


//______________________________________________________________________________
void TNode::Sizeof3D() const
{
   // Return total size of this 3-D Node with its attributes.

   if (fVisibility && fShape && fShape->GetVisibility()) {
      fShape->Sizeof3D();
   }
   if ( TestBit(kSonsInvisible) ) return;

   if (!fNodes) return;
   TNode *node;
   TObject *obj;
   TIter  next(fNodes);
   while ((obj = next())) {
      node = (TNode*)obj;
      node->Sizeof3D();
   }
}


//_______________________________________________________________________
void TNode::Streamer(TBuffer &b)
{
   // Stream a class object.

   if (b.IsReading()) {
      UInt_t R__s, R__c;
      Version_t R__v = b.ReadVersion(&R__s, &R__c);
      if (R__v > 2) {
         b.ReadClassBuffer(TNode::Class(), this, R__v, R__s, R__c);
         return;
      }
      //====process old versions before automatic schema evolution
      TNamed::Streamer(b);
      TAttLine::Streamer(b);
      TAttFill::Streamer(b);
      b >> fX;
      b >> fY;
      b >> fZ;
      b >> fMatrix;
      b >> fShape;
      b >> fParent;
      b >> fNodes;
      fOption.Streamer(b);
      if (R__v > 1) b >> fVisibility;
      else  fVisibility = fShape->GetVisibility();
      b.CheckByteCount(R__s, R__c, TNode::IsA());
      //====end of old versions

   } else {
      b.WriteClassBuffer(TNode::Class(),this);
   }
}


//______________________________________________________________________________
void TNode::UpdateMatrix()
{
   // Update global rotation matrix/translation vector for this node
   // this function must be called before invoking Local2Master

   TNode *nodes[kMAXLEVELS], *node;
   Int_t i;
   for (i=0;i<kVectorSize;i++) gTranslation[0][i] = 0;
   for (i=0;i<kMatrixSize;i++) gRotMatrix[0][i] = 0;
   gRotMatrix[0][0] = 1;   gRotMatrix[0][4] = 1;   gRotMatrix[0][8] = 1;

   node     = this;
   gGeomLevel  = 0;
   //build array of parent nodes
   while (node) {
      nodes[gGeomLevel] = node;
      node = node->GetParent();
      gGeomLevel++;
   }
   gGeomLevel--;
   //Update matrices in the hierarchy
   for (i=1;i<=gGeomLevel;i++) {
      node = nodes[gGeomLevel-i];
      UpdateTempMatrix(&(gTranslation[i-1][0]),&gRotMatrix[i-1][0]
                      ,node->GetX(),node->GetY(),node->GetZ(),node->GetMatrix()->GetMatrix()
                      ,&gTranslation[i][0],&gRotMatrix[i][0]);
   }
}


//______________________________________________________________________________
void TNode::UpdateTempMatrix(const Double_t *dx,const Double_t *rmat
                         , 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.
   //
   //  dx      old translation vector
   //  rmat    old global matrix
   //  x,y,z   offset of new local system with respect to mother
   //  dxnew   new translation vector
   //  rmatnew new global rotation matrix

   dxnew[0] = dx[0] + x*rmat[0] + y*rmat[3] + z*rmat[6];
   dxnew[1] = dx[1] + x*rmat[1] + y*rmat[4] + z*rmat[7];
   dxnew[2] = dx[2] + x*rmat[2] + y*rmat[5] + z*rmat[8];

   rmatnew[0] = rmat[0]*matrix[0] + rmat[3]*matrix[1] + rmat[6]*matrix[2];
   rmatnew[1] = rmat[1]*matrix[0] + rmat[4]*matrix[1] + rmat[7]*matrix[2];
   rmatnew[2] = rmat[2]*matrix[0] + rmat[5]*matrix[1] + rmat[8]*matrix[2];
   rmatnew[3] = rmat[0]*matrix[3] + rmat[3]*matrix[4] + rmat[6]*matrix[5];
   rmatnew[4] = rmat[1]*matrix[3] + rmat[4]*matrix[4] + rmat[7]*matrix[5];
   rmatnew[5] = rmat[2]*matrix[3] + rmat[5]*matrix[4] + rmat[8]*matrix[5];
   rmatnew[6] = rmat[0]*matrix[6] + rmat[3]*matrix[7] + rmat[6]*matrix[8];
   rmatnew[7] = rmat[1]*matrix[6] + rmat[4]*matrix[7] + rmat[7]*matrix[8];
   rmatnew[8] = rmat[2]*matrix[6] + rmat[5]*matrix[7] + rmat[8]*matrix[8];
}
 TNode.cxx:1
 TNode.cxx:2
 TNode.cxx:3
 TNode.cxx:4
 TNode.cxx:5
 TNode.cxx:6
 TNode.cxx:7
 TNode.cxx:8
 TNode.cxx:9
 TNode.cxx:10
 TNode.cxx:11
 TNode.cxx:12
 TNode.cxx:13
 TNode.cxx:14
 TNode.cxx:15
 TNode.cxx:16
 TNode.cxx:17
 TNode.cxx:18
 TNode.cxx:19
 TNode.cxx:20
 TNode.cxx:21
 TNode.cxx:22
 TNode.cxx:23
 TNode.cxx:24
 TNode.cxx:25
 TNode.cxx:26
 TNode.cxx:27
 TNode.cxx:28
 TNode.cxx:29
 TNode.cxx:30
 TNode.cxx:31
 TNode.cxx:32
 TNode.cxx:33
 TNode.cxx:34
 TNode.cxx:35
 TNode.cxx:36
 TNode.cxx:37
 TNode.cxx:38
 TNode.cxx:39
 TNode.cxx:40
 TNode.cxx:41
 TNode.cxx:42
 TNode.cxx:43
 TNode.cxx:44
 TNode.cxx:45
 TNode.cxx:46
 TNode.cxx:47
 TNode.cxx:48
 TNode.cxx:49
 TNode.cxx:50
 TNode.cxx:51
 TNode.cxx:52
 TNode.cxx:53
 TNode.cxx:54
 TNode.cxx:55
 TNode.cxx:56
 TNode.cxx:57
 TNode.cxx:58
 TNode.cxx:59
 TNode.cxx:60
 TNode.cxx:61
 TNode.cxx:62
 TNode.cxx:63
 TNode.cxx:64
 TNode.cxx:65
 TNode.cxx:66
 TNode.cxx:67
 TNode.cxx:68
 TNode.cxx:69
 TNode.cxx:70
 TNode.cxx:71
 TNode.cxx:72
 TNode.cxx:73
 TNode.cxx:74
 TNode.cxx:75
 TNode.cxx:76
 TNode.cxx:77
 TNode.cxx:78
 TNode.cxx:79
 TNode.cxx:80
 TNode.cxx:81
 TNode.cxx:82
 TNode.cxx:83
 TNode.cxx:84
 TNode.cxx:85
 TNode.cxx:86
 TNode.cxx:87
 TNode.cxx:88
 TNode.cxx:89
 TNode.cxx:90
 TNode.cxx:91
 TNode.cxx:92
 TNode.cxx:93
 TNode.cxx:94
 TNode.cxx:95
 TNode.cxx:96
 TNode.cxx:97
 TNode.cxx:98
 TNode.cxx:99
 TNode.cxx:100
 TNode.cxx:101
 TNode.cxx:102
 TNode.cxx:103
 TNode.cxx:104
 TNode.cxx:105
 TNode.cxx:106
 TNode.cxx:107
 TNode.cxx:108
 TNode.cxx:109
 TNode.cxx:110
 TNode.cxx:111
 TNode.cxx:112
 TNode.cxx:113
 TNode.cxx:114
 TNode.cxx:115
 TNode.cxx:116
 TNode.cxx:117
 TNode.cxx:118
 TNode.cxx:119
 TNode.cxx:120
 TNode.cxx:121
 TNode.cxx:122
 TNode.cxx:123
 TNode.cxx:124
 TNode.cxx:125
 TNode.cxx:126
 TNode.cxx:127
 TNode.cxx:128
 TNode.cxx:129
 TNode.cxx:130
 TNode.cxx:131
 TNode.cxx:132
 TNode.cxx:133
 TNode.cxx:134
 TNode.cxx:135
 TNode.cxx:136
 TNode.cxx:137
 TNode.cxx:138
 TNode.cxx:139
 TNode.cxx:140
 TNode.cxx:141
 TNode.cxx:142
 TNode.cxx:143
 TNode.cxx:144
 TNode.cxx:145
 TNode.cxx:146
 TNode.cxx:147
 TNode.cxx:148
 TNode.cxx:149
 TNode.cxx:150
 TNode.cxx:151
 TNode.cxx:152
 TNode.cxx:153
 TNode.cxx:154
 TNode.cxx:155
 TNode.cxx:156
 TNode.cxx:157
 TNode.cxx:158
 TNode.cxx:159
 TNode.cxx:160
 TNode.cxx:161
 TNode.cxx:162
 TNode.cxx:163
 TNode.cxx:164
 TNode.cxx:165
 TNode.cxx:166
 TNode.cxx:167
 TNode.cxx:168
 TNode.cxx:169
 TNode.cxx:170
 TNode.cxx:171
 TNode.cxx:172
 TNode.cxx:173
 TNode.cxx:174
 TNode.cxx:175
 TNode.cxx:176
 TNode.cxx:177
 TNode.cxx:178
 TNode.cxx:179
 TNode.cxx:180
 TNode.cxx:181
 TNode.cxx:182
 TNode.cxx:183
 TNode.cxx:184
 TNode.cxx:185
 TNode.cxx:186
 TNode.cxx:187
 TNode.cxx:188
 TNode.cxx:189
 TNode.cxx:190
 TNode.cxx:191
 TNode.cxx:192
 TNode.cxx:193
 TNode.cxx:194
 TNode.cxx:195
 TNode.cxx:196
 TNode.cxx:197
 TNode.cxx:198
 TNode.cxx:199
 TNode.cxx:200
 TNode.cxx:201
 TNode.cxx:202
 TNode.cxx:203
 TNode.cxx:204
 TNode.cxx:205
 TNode.cxx:206
 TNode.cxx:207
 TNode.cxx:208
 TNode.cxx:209
 TNode.cxx:210
 TNode.cxx:211
 TNode.cxx:212
 TNode.cxx:213
 TNode.cxx:214
 TNode.cxx:215
 TNode.cxx:216
 TNode.cxx:217
 TNode.cxx:218
 TNode.cxx:219
 TNode.cxx:220
 TNode.cxx:221
 TNode.cxx:222
 TNode.cxx:223
 TNode.cxx:224
 TNode.cxx:225
 TNode.cxx:226
 TNode.cxx:227
 TNode.cxx:228
 TNode.cxx:229
 TNode.cxx:230
 TNode.cxx:231
 TNode.cxx:232
 TNode.cxx:233
 TNode.cxx:234
 TNode.cxx:235
 TNode.cxx:236
 TNode.cxx:237
 TNode.cxx:238
 TNode.cxx:239
 TNode.cxx:240
 TNode.cxx:241
 TNode.cxx:242
 TNode.cxx:243
 TNode.cxx:244
 TNode.cxx:245
 TNode.cxx:246
 TNode.cxx:247
 TNode.cxx:248
 TNode.cxx:249
 TNode.cxx:250
 TNode.cxx:251
 TNode.cxx:252
 TNode.cxx:253
 TNode.cxx:254
 TNode.cxx:255
 TNode.cxx:256
 TNode.cxx:257
 TNode.cxx:258
 TNode.cxx:259
 TNode.cxx:260
 TNode.cxx:261
 TNode.cxx:262
 TNode.cxx:263
 TNode.cxx:264
 TNode.cxx:265
 TNode.cxx:266
 TNode.cxx:267
 TNode.cxx:268
 TNode.cxx:269
 TNode.cxx:270
 TNode.cxx:271
 TNode.cxx:272
 TNode.cxx:273
 TNode.cxx:274
 TNode.cxx:275
 TNode.cxx:276
 TNode.cxx:277
 TNode.cxx:278
 TNode.cxx:279
 TNode.cxx:280
 TNode.cxx:281
 TNode.cxx:282
 TNode.cxx:283
 TNode.cxx:284
 TNode.cxx:285
 TNode.cxx:286
 TNode.cxx:287
 TNode.cxx:288
 TNode.cxx:289
 TNode.cxx:290
 TNode.cxx:291
 TNode.cxx:292
 TNode.cxx:293
 TNode.cxx:294
 TNode.cxx:295
 TNode.cxx:296
 TNode.cxx:297
 TNode.cxx:298
 TNode.cxx:299
 TNode.cxx:300
 TNode.cxx:301
 TNode.cxx:302
 TNode.cxx:303
 TNode.cxx:304
 TNode.cxx:305
 TNode.cxx:306
 TNode.cxx:307
 TNode.cxx:308
 TNode.cxx:309
 TNode.cxx:310
 TNode.cxx:311
 TNode.cxx:312
 TNode.cxx:313
 TNode.cxx:314
 TNode.cxx:315
 TNode.cxx:316
 TNode.cxx:317
 TNode.cxx:318
 TNode.cxx:319
 TNode.cxx:320
 TNode.cxx:321
 TNode.cxx:322
 TNode.cxx:323
 TNode.cxx:324
 TNode.cxx:325
 TNode.cxx:326
 TNode.cxx:327
 TNode.cxx:328
 TNode.cxx:329
 TNode.cxx:330
 TNode.cxx:331
 TNode.cxx:332
 TNode.cxx:333
 TNode.cxx:334
 TNode.cxx:335
 TNode.cxx:336
 TNode.cxx:337
 TNode.cxx:338
 TNode.cxx:339
 TNode.cxx:340
 TNode.cxx:341
 TNode.cxx:342
 TNode.cxx:343
 TNode.cxx:344
 TNode.cxx:345
 TNode.cxx:346
 TNode.cxx:347
 TNode.cxx:348
 TNode.cxx:349
 TNode.cxx:350
 TNode.cxx:351
 TNode.cxx:352
 TNode.cxx:353
 TNode.cxx:354
 TNode.cxx:355
 TNode.cxx:356
 TNode.cxx:357
 TNode.cxx:358
 TNode.cxx:359
 TNode.cxx:360
 TNode.cxx:361
 TNode.cxx:362
 TNode.cxx:363
 TNode.cxx:364
 TNode.cxx:365
 TNode.cxx:366
 TNode.cxx:367
 TNode.cxx:368
 TNode.cxx:369
 TNode.cxx:370
 TNode.cxx:371
 TNode.cxx:372
 TNode.cxx:373
 TNode.cxx:374
 TNode.cxx:375
 TNode.cxx:376
 TNode.cxx:377
 TNode.cxx:378
 TNode.cxx:379
 TNode.cxx:380
 TNode.cxx:381
 TNode.cxx:382
 TNode.cxx:383
 TNode.cxx:384
 TNode.cxx:385
 TNode.cxx:386
 TNode.cxx:387
 TNode.cxx:388
 TNode.cxx:389
 TNode.cxx:390
 TNode.cxx:391
 TNode.cxx:392
 TNode.cxx:393
 TNode.cxx:394
 TNode.cxx:395
 TNode.cxx:396
 TNode.cxx:397
 TNode.cxx:398
 TNode.cxx:399
 TNode.cxx:400
 TNode.cxx:401
 TNode.cxx:402
 TNode.cxx:403
 TNode.cxx:404
 TNode.cxx:405
 TNode.cxx:406
 TNode.cxx:407
 TNode.cxx:408
 TNode.cxx:409
 TNode.cxx:410
 TNode.cxx:411
 TNode.cxx:412
 TNode.cxx:413
 TNode.cxx:414
 TNode.cxx:415
 TNode.cxx:416
 TNode.cxx:417
 TNode.cxx:418
 TNode.cxx:419
 TNode.cxx:420
 TNode.cxx:421
 TNode.cxx:422
 TNode.cxx:423
 TNode.cxx:424
 TNode.cxx:425
 TNode.cxx:426
 TNode.cxx:427
 TNode.cxx:428
 TNode.cxx:429
 TNode.cxx:430
 TNode.cxx:431
 TNode.cxx:432
 TNode.cxx:433
 TNode.cxx:434
 TNode.cxx:435
 TNode.cxx:436
 TNode.cxx:437
 TNode.cxx:438
 TNode.cxx:439
 TNode.cxx:440
 TNode.cxx:441
 TNode.cxx:442
 TNode.cxx:443
 TNode.cxx:444
 TNode.cxx:445
 TNode.cxx:446
 TNode.cxx:447
 TNode.cxx:448
 TNode.cxx:449
 TNode.cxx:450
 TNode.cxx:451
 TNode.cxx:452
 TNode.cxx:453
 TNode.cxx:454
 TNode.cxx:455
 TNode.cxx:456
 TNode.cxx:457
 TNode.cxx:458
 TNode.cxx:459
 TNode.cxx:460
 TNode.cxx:461
 TNode.cxx:462
 TNode.cxx:463
 TNode.cxx:464
 TNode.cxx:465
 TNode.cxx:466
 TNode.cxx:467
 TNode.cxx:468
 TNode.cxx:469
 TNode.cxx:470
 TNode.cxx:471
 TNode.cxx:472
 TNode.cxx:473
 TNode.cxx:474
 TNode.cxx:475
 TNode.cxx:476
 TNode.cxx:477
 TNode.cxx:478
 TNode.cxx:479
 TNode.cxx:480
 TNode.cxx:481
 TNode.cxx:482
 TNode.cxx:483
 TNode.cxx:484
 TNode.cxx:485
 TNode.cxx:486
 TNode.cxx:487
 TNode.cxx:488
 TNode.cxx:489
 TNode.cxx:490
 TNode.cxx:491
 TNode.cxx:492
 TNode.cxx:493
 TNode.cxx:494
 TNode.cxx:495
 TNode.cxx:496
 TNode.cxx:497
 TNode.cxx:498
 TNode.cxx:499
 TNode.cxx:500
 TNode.cxx:501
 TNode.cxx:502
 TNode.cxx:503
 TNode.cxx:504
 TNode.cxx:505
 TNode.cxx:506
 TNode.cxx:507
 TNode.cxx:508
 TNode.cxx:509
 TNode.cxx:510
 TNode.cxx:511
 TNode.cxx:512
 TNode.cxx:513
 TNode.cxx:514
 TNode.cxx:515
 TNode.cxx:516
 TNode.cxx:517
 TNode.cxx:518
 TNode.cxx:519
 TNode.cxx:520
 TNode.cxx:521
 TNode.cxx:522
 TNode.cxx:523
 TNode.cxx:524
 TNode.cxx:525
 TNode.cxx:526
 TNode.cxx:527
 TNode.cxx:528
 TNode.cxx:529
 TNode.cxx:530
 TNode.cxx:531
 TNode.cxx:532
 TNode.cxx:533
 TNode.cxx:534
 TNode.cxx:535
 TNode.cxx:536
 TNode.cxx:537
 TNode.cxx:538
 TNode.cxx:539
 TNode.cxx:540
 TNode.cxx:541
 TNode.cxx:542
 TNode.cxx:543
 TNode.cxx:544
 TNode.cxx:545
 TNode.cxx:546
 TNode.cxx:547
 TNode.cxx:548
 TNode.cxx:549
 TNode.cxx:550
 TNode.cxx:551
 TNode.cxx:552
 TNode.cxx:553
 TNode.cxx:554
 TNode.cxx:555
 TNode.cxx:556
 TNode.cxx:557
 TNode.cxx:558
 TNode.cxx:559
 TNode.cxx:560
 TNode.cxx:561
 TNode.cxx:562
 TNode.cxx:563
 TNode.cxx:564
 TNode.cxx:565
 TNode.cxx:566
 TNode.cxx:567
 TNode.cxx:568
 TNode.cxx:569
 TNode.cxx:570
 TNode.cxx:571
 TNode.cxx:572
 TNode.cxx:573
 TNode.cxx:574
 TNode.cxx:575
 TNode.cxx:576
 TNode.cxx:577
 TNode.cxx:578
 TNode.cxx:579
 TNode.cxx:580
 TNode.cxx:581
 TNode.cxx:582
 TNode.cxx:583
 TNode.cxx:584
 TNode.cxx:585
 TNode.cxx:586
 TNode.cxx:587
 TNode.cxx:588
 TNode.cxx:589
 TNode.cxx:590
 TNode.cxx:591
 TNode.cxx:592
 TNode.cxx:593
 TNode.cxx:594
 TNode.cxx:595
 TNode.cxx:596
 TNode.cxx:597
 TNode.cxx:598
 TNode.cxx:599
 TNode.cxx:600
 TNode.cxx:601
 TNode.cxx:602
 TNode.cxx:603
 TNode.cxx:604
 TNode.cxx:605
 TNode.cxx:606
 TNode.cxx:607
 TNode.cxx:608
 TNode.cxx:609
 TNode.cxx:610
 TNode.cxx:611
 TNode.cxx:612
 TNode.cxx:613
 TNode.cxx:614
 TNode.cxx:615
 TNode.cxx:616
 TNode.cxx:617
 TNode.cxx:618
 TNode.cxx:619
 TNode.cxx:620
 TNode.cxx:621
 TNode.cxx:622
 TNode.cxx:623
 TNode.cxx:624
 TNode.cxx:625
 TNode.cxx:626
 TNode.cxx:627
 TNode.cxx:628
 TNode.cxx:629
 TNode.cxx:630
 TNode.cxx:631
 TNode.cxx:632
 TNode.cxx:633
 TNode.cxx:634
 TNode.cxx:635
 TNode.cxx:636
 TNode.cxx:637
 TNode.cxx:638
 TNode.cxx:639
 TNode.cxx:640
 TNode.cxx:641
 TNode.cxx:642
 TNode.cxx:643
 TNode.cxx:644
 TNode.cxx:645
 TNode.cxx:646
 TNode.cxx:647
 TNode.cxx:648
 TNode.cxx:649
 TNode.cxx:650
 TNode.cxx:651
 TNode.cxx:652
 TNode.cxx:653
 TNode.cxx:654
 TNode.cxx:655
 TNode.cxx:656
 TNode.cxx:657
 TNode.cxx:658
 TNode.cxx:659
 TNode.cxx:660
 TNode.cxx:661
 TNode.cxx:662
 TNode.cxx:663
 TNode.cxx:664
 TNode.cxx:665
 TNode.cxx:666
 TNode.cxx:667
 TNode.cxx:668
 TNode.cxx:669
 TNode.cxx:670
 TNode.cxx:671
 TNode.cxx:672
 TNode.cxx:673
 TNode.cxx:674
 TNode.cxx:675
 TNode.cxx:676
 TNode.cxx:677
 TNode.cxx:678
 TNode.cxx:679
 TNode.cxx:680
 TNode.cxx:681
 TNode.cxx:682
 TNode.cxx:683
 TNode.cxx:684
 TNode.cxx:685
 TNode.cxx:686
 TNode.cxx:687
 TNode.cxx:688
 TNode.cxx:689
 TNode.cxx:690
 TNode.cxx:691
 TNode.cxx:692
 TNode.cxx:693
 TNode.cxx:694
 TNode.cxx:695
 TNode.cxx:696
 TNode.cxx:697
 TNode.cxx:698
 TNode.cxx:699
 TNode.cxx:700
 TNode.cxx:701
 TNode.cxx:702
 TNode.cxx:703
 TNode.cxx:704
 TNode.cxx:705
 TNode.cxx:706
 TNode.cxx:707
 TNode.cxx:708
 TNode.cxx:709
 TNode.cxx:710
 TNode.cxx:711
 TNode.cxx:712
 TNode.cxx:713
 TNode.cxx:714
 TNode.cxx:715
 TNode.cxx:716
 TNode.cxx:717
 TNode.cxx:718
 TNode.cxx:719
 TNode.cxx:720
 TNode.cxx:721
 TNode.cxx:722
 TNode.cxx:723
 TNode.cxx:724
 TNode.cxx:725
 TNode.cxx:726
 TNode.cxx:727
 TNode.cxx:728
 TNode.cxx:729
 TNode.cxx:730
 TNode.cxx:731
 TNode.cxx:732
 TNode.cxx:733
 TNode.cxx:734
 TNode.cxx:735
 TNode.cxx:736
 TNode.cxx:737
 TNode.cxx:738
 TNode.cxx:739
 TNode.cxx:740
 TNode.cxx:741
 TNode.cxx:742
 TNode.cxx:743
 TNode.cxx:744
 TNode.cxx:745
 TNode.cxx:746
 TNode.cxx:747
 TNode.cxx:748
 TNode.cxx:749
 TNode.cxx:750
 TNode.cxx:751
 TNode.cxx:752
 TNode.cxx:753
 TNode.cxx:754
 TNode.cxx:755
 TNode.cxx:756
 TNode.cxx:757
 TNode.cxx:758
 TNode.cxx:759
 TNode.cxx:760
 TNode.cxx:761
 TNode.cxx:762
 TNode.cxx:763
 TNode.cxx:764
 TNode.cxx:765
 TNode.cxx:766
 TNode.cxx:767
 TNode.cxx:768
 TNode.cxx:769
 TNode.cxx:770
 TNode.cxx:771
 TNode.cxx:772
 TNode.cxx:773
 TNode.cxx:774
 TNode.cxx:775
 TNode.cxx:776
 TNode.cxx:777
 TNode.cxx:778
 TNode.cxx:779
 TNode.cxx:780
 TNode.cxx:781
 TNode.cxx:782
 TNode.cxx:783
 TNode.cxx:784
 TNode.cxx:785
 TNode.cxx:786
 TNode.cxx:787
 TNode.cxx:788
 TNode.cxx:789
 TNode.cxx:790
 TNode.cxx:791
 TNode.cxx:792
 TNode.cxx:793
 TNode.cxx:794
 TNode.cxx:795
 TNode.cxx:796
 TNode.cxx:797
 TNode.cxx:798
 TNode.cxx:799
 TNode.cxx:800
 TNode.cxx:801
 TNode.cxx:802
 TNode.cxx:803
 TNode.cxx:804
 TNode.cxx:805
 TNode.cxx:806
 TNode.cxx:807
 TNode.cxx:808
 TNode.cxx:809
 TNode.cxx:810
 TNode.cxx:811
 TNode.cxx:812
 TNode.cxx:813
 TNode.cxx:814
 TNode.cxx:815
 TNode.cxx:816
 TNode.cxx:817
 TNode.cxx:818
 TNode.cxx:819
 TNode.cxx:820
 TNode.cxx:821
 TNode.cxx:822
 TNode.cxx:823
 TNode.cxx:824
 TNode.cxx:825
 TNode.cxx:826
 TNode.cxx:827
 TNode.cxx:828
 TNode.cxx:829
 TNode.cxx:830
 TNode.cxx:831
 TNode.cxx:832
 TNode.cxx:833
 TNode.cxx:834
 TNode.cxx:835
 TNode.cxx:836
 TNode.cxx:837
 TNode.cxx:838
 TNode.cxx:839
 TNode.cxx:840
 TNode.cxx:841
 TNode.cxx:842
 TNode.cxx:843
 TNode.cxx:844
 TNode.cxx:845
 TNode.cxx:846
 TNode.cxx:847
 TNode.cxx:848
 TNode.cxx:849
 TNode.cxx:850
 TNode.cxx:851
 TNode.cxx:852
 TNode.cxx:853
 TNode.cxx:854
 TNode.cxx:855
 TNode.cxx:856
 TNode.cxx:857
 TNode.cxx:858
 TNode.cxx:859
 TNode.cxx:860
 TNode.cxx:861
 TNode.cxx:862
 TNode.cxx:863
 TNode.cxx:864
 TNode.cxx:865
 TNode.cxx:866
 TNode.cxx:867
 TNode.cxx:868
 TNode.cxx:869
 TNode.cxx:870
 TNode.cxx:871
 TNode.cxx:872
 TNode.cxx:873
 TNode.cxx:874
 TNode.cxx:875
 TNode.cxx:876
 TNode.cxx:877
 TNode.cxx:878
 TNode.cxx:879
 TNode.cxx:880
 TNode.cxx:881
 TNode.cxx:882
 TNode.cxx:883
 TNode.cxx:884
 TNode.cxx:885
 TNode.cxx:886
 TNode.cxx:887
 TNode.cxx:888
 TNode.cxx:889
 TNode.cxx:890
 TNode.cxx:891
 TNode.cxx:892
 TNode.cxx:893
 TNode.cxx:894
 TNode.cxx:895
 TNode.cxx:896
 TNode.cxx:897
 TNode.cxx:898
 TNode.cxx:899
 TNode.cxx:900
 TNode.cxx:901
 TNode.cxx:902
 TNode.cxx:903
 TNode.cxx:904
 TNode.cxx:905
 TNode.cxx:906
 TNode.cxx:907
 TNode.cxx:908
 TNode.cxx:909
 TNode.cxx:910
 TNode.cxx:911
 TNode.cxx:912
 TNode.cxx:913
 TNode.cxx:914
 TNode.cxx:915
 TNode.cxx:916
 TNode.cxx:917
 TNode.cxx:918
 TNode.cxx:919
 TNode.cxx:920
 TNode.cxx:921
 TNode.cxx:922
 TNode.cxx:923
 TNode.cxx:924
 TNode.cxx:925
 TNode.cxx:926
 TNode.cxx:927
 TNode.cxx:928
 TNode.cxx:929
 TNode.cxx:930
 TNode.cxx:931
 TNode.cxx:932