Logo ROOT   6.10/09
Reference Guide
TEveProjectionAxes.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11 
12 #include "TEveProjectionAxes.h"
13 #include "TEveProjectionManager.h"
14 #include "TMath.h"
15 
16 
17 /** \class TEveProjectionAxes
18 \ingroup TEve
19 Axes for non-linear projections. Show scale of TEveProjectionManager
20 children. With different step mode tick-marks can positioned
21 equidistant or placed with value monotonically increasing from lower left corner
22 of bounding box.
23 */
24 
26 
27 ////////////////////////////////////////////////////////////////////////////////
28 /// Constructor.
29 
31  TEveElement(),
32  TNamed("TEveProjectionAxes", ""),
33  fManager(m),
34 
35  fUseColorSet(useCS),
36 
37  fLabMode(kValue),
38  fAxesMode(kAll),
39 
40  fDrawCenter(kFALSE),
41  fDrawOrigin(kFALSE)
42 {
44  fManager->AddDependent(this);
45 
46  // Axis attributes.
47  fNdivisions = 1010;
48  fLabelSize = 0.015;
49  fLabelColor = kGray+1;
50  fAxisColor = kGray+1;
51  fTickLength = 0.015;
52  fLabelOffset = 0.01;
53 }
54 
55 ////////////////////////////////////////////////////////////////////////////////
56 /// Destructor.
57 
59 {
61 }
62 
63 ////////////////////////////////////////////////////////////////////////////////
64 /// Paint this object. Only direct rendering is supported.
65 
67 {
68  PaintStandard(this);
69 }
70 
71 ////////////////////////////////////////////////////////////////////////////////
72 /// Virtual from TAttBBox; fill bounding-box information.
73 
75 {
76  static const TEveException eH("TEveProjectionManager::ComputeBBox ");
77 
78  BBoxZero();
79  if(fManager == 0 || fManager->GetBBox() == 0)
80  return;
81 
82  for (Int_t i=0; i<6; ++i)
83  fBBox[i] = fManager->GetBBox()[i];
84 
85  AssertBBoxExtents(0.1);
86 }
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Return TEveProjectionAxes icon.
90 
92 {
94 }
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return TEveProjectionAxes icon.
Color_t fAxisColor
Color of the line axis.
Definition: TAttAxis.h:21
Float_t fLabelOffset
Offset of labels.
Definition: TAttAxis.h:24
Bool_t fCanEditMainTrans
Definition: TEveElement.h:94
TEveProjectionManager * fManager
Float_t fLabelSize
Size of labels.
Definition: TAttAxis.h:25
const char Option_t
Definition: RtypesCore.h:62
Int_t fNdivisions
Number of divisions(10000*n3 + 100*n2 + n1)
Definition: TAttAxis.h:20
Definition: Rtypes.h:55
virtual void ComputeBBox()
Virtual from TAttBBox; fill bounding-box information.
static const TGPicture * fgListTreeIcons[9]
Definition: TEveElement.h:63
void RemoveDependent(TEveElement *el)
Remove el as dependent element.
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Axes for non-linear projections.
Float_t * fBBox
Definition: TAttBBox.h:20
void AddDependent(TEveElement *el)
Add el as dependent element.
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Color_t fLabelColor
Color of labels.
Definition: TAttAxis.h:22
Manager class for steering of projections and managing projected objects.
TMarker * m
Definition: textangle.C:8
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
Definition: TAttBBox.cxx:42
TEveProjectionAxes(const TEveProjectionAxes &)
const Bool_t kFALSE
Definition: RtypesCore.h:92
Float_t * GetBBox()
Definition: TAttBBox.h:44
#define ClassImp(name)
Definition: Rtypes.h:336
virtual ~TEveProjectionAxes()
Destructor.
virtual void Paint(Option_t *option="")
Paint this object. Only direct rendering is supported.
Float_t fTickLength
Length of tick marks.
Definition: TAttAxis.h:26
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
void AssertBBoxExtents(Float_t epsilon=0.005)
Assert extents of all sides of the bounding-box are at least epsilon.
Definition: TAttBBox.cxx:62