forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEveProjectionAxes.cxx
94 lines (72 loc) · 2.56 KB
/
TEveProjectionAxes.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// @(#)root/eve:$Id$
// Author: Matevz Tadel 2007
/*************************************************************************
* Copyright (C) 1995-2007, 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 "TEveProjectionAxes.h"
#include "TEveProjectionManager.h"
#include "TMath.h"
/** \class TEveProjectionAxes
\ingroup TEve
Axes for non-linear projections. Show scale of TEveProjectionManager
children. With different step mode tick-marks can positioned
equidistant or placed with value monotonically increasing from lower left corner
of bounding box.
*/
ClassImp(TEveProjectionAxes);
////////////////////////////////////////////////////////////////////////////////
/// Constructor.
TEveProjectionAxes::TEveProjectionAxes(TEveProjectionManager* m, Bool_t useCS) :
TEveElement(),
TNamed("TEveProjectionAxes", ""),
fManager(m),
fUseColorSet(useCS),
fLabMode(kValue),
fAxesMode(kAll),
fDrawCenter(kFALSE),
fDrawOrigin(kFALSE)
{
fCanEditMainTrans = kFALSE;
fManager->AddDependent(this);
// Axis attributes.
fNdivisions = 1010;
fLabelSize = 0.015;
fLabelColor = kGray+1;
fAxisColor = kGray+1;
fTickLength = 0.015;
fLabelOffset = 0.01;
}
////////////////////////////////////////////////////////////////////////////////
/// Destructor.
TEveProjectionAxes::~TEveProjectionAxes()
{
fManager->RemoveDependent(this);
}
////////////////////////////////////////////////////////////////////////////////
/// Paint this object. Only direct rendering is supported.
void TEveProjectionAxes::Paint(Option_t*)
{
PaintStandard(this);
}
////////////////////////////////////////////////////////////////////////////////
/// Virtual from TAttBBox; fill bounding-box information.
void TEveProjectionAxes::ComputeBBox()
{
static const TEveException eH("TEveProjectionManager::ComputeBBox ");
BBoxZero();
if(fManager == 0 || fManager->GetBBox() == 0)
return;
for (Int_t i=0; i<6; ++i)
fBBox[i] = fManager->GetBBox()[i];
AssertBBoxExtents(0.1);
}
////////////////////////////////////////////////////////////////////////////////
/// Return TEveProjectionAxes icon.
const TGPicture* TEveProjectionAxes::GetListTreeIcon(Bool_t)
{
return TEveElement::fgListTreeIcons[6];
}