TEveProjectionAxes.cxx

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveProjectionAxes.cxx 37192 2010-12-02 15:54:26Z matevz $
00002 // Author: Matevz Tadel 2007
00003 
00004 /*************************************************************************
00005 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006 * All rights reserved.                                                  *
00007 *                                                                       *
00008 * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010 *************************************************************************/
00011 
00012 #include "TEveProjectionAxes.h"
00013 #include "TEveProjectionManager.h"
00014 #include "TMath.h"
00015 
00016 
00017 //______________________________________________________________________________
00018 //
00019 // Axes for non-linear projections. Show scale of TEveProjectionManager
00020 // children. With different step mode tick-marks can positioned
00021 // equidistant or placed with value monotonically increasing from lower left corner
00022 // of bounding box.
00023 
00024 ClassImp(TEveProjectionAxes);
00025 
00026 //______________________________________________________________________________
00027 TEveProjectionAxes::TEveProjectionAxes(TEveProjectionManager* m, Bool_t useCS) :
00028    TEveElement(),
00029    TNamed("TEveProjectionAxes", ""),
00030    fManager(m),
00031 
00032    fUseColorSet(useCS),
00033 
00034    fLabMode(kValue),
00035    fAxesMode(kAll),
00036 
00037    fDrawCenter(kFALSE),
00038    fDrawOrigin(kFALSE)
00039 {
00040    // Constructor.
00041 
00042    fCanEditMainTrans = kFALSE;
00043    fManager->AddDependent(this);
00044 
00045    // Axis attributes.
00046    fNdivisions = 1010;
00047    fLabelSize = 0.015;
00048    fLabelColor = kGray+1;
00049    fAxisColor = kGray+1;
00050    fTickLength = 0.015;
00051    fLabelOffset = 0.01;
00052 }
00053 
00054 //______________________________________________________________________________
00055 TEveProjectionAxes::~TEveProjectionAxes()
00056 {
00057    // Destructor.
00058 
00059    fManager->RemoveDependent(this);
00060 }
00061 
00062 //______________________________________________________________________________
00063 void TEveProjectionAxes::Paint(Option_t*)
00064 {
00065    // Paint this object. Only direct rendering is supported.
00066 
00067    PaintStandard(this);
00068 }
00069 
00070 //______________________________________________________________________________
00071 void TEveProjectionAxes::ComputeBBox()
00072 {
00073    // Virtual from TAttBBox; fill bounding-box information.
00074 
00075    static const TEveException eH("TEveProjectionManager::ComputeBBox ");
00076 
00077    BBoxZero();
00078    if(fManager == 0 || fManager->GetBBox() == 0)
00079       return;
00080 
00081    for (Int_t i=0; i<6; ++i)
00082       fBBox[i] = fManager->GetBBox()[i];
00083 
00084    AssertBBoxExtents(0.1);
00085 }
00086 
00087 //______________________________________________________________________________
00088 const TGPicture* TEveProjectionAxes::GetListTreeIcon(Bool_t)
00089 {
00090    // Return TEveProjectionAxes icon.
00091 
00092    return TEveElement::fgListTreeIcons[6];
00093 }

Generated on Tue Jul 5 14:16:13 2011 for ROOT_528-00b_version by  doxygen 1.5.1