ROOT
6.12/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
n
o
p
r
s
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
tutorials
eve
compound.C File Reference
Tutorials
»
Event display tutorials
Detailed Description
Demonstrates usage of EVE compound objects - class
TEveCompound
.
TEveLine
* random_line(
TRandom
& rnd,
Int_t
n,
Float_t
delta)
{
TEveLine
*
line
=
new
TEveLine
;
line->
SetMainColor
(
kGreen
);
Float_t
x = 0, y = 0, z = 0;
for
(
Int_t
i=0; i<
n
; ++i)
{
line->
SetNextPoint
(x, y, z);
x += rnd.
Uniform
(0, delta);
y += rnd.
Uniform
(0, delta);
z += rnd.
Uniform
(0, delta);
}
return
line
;
}
void
compound()
{
TEveManager::Create
();
TEveLine
* ml =
new
TEveLine
;
ml->
SetMainColor
(kRed);
ml->
SetLineStyle
(2);
ml->
SetLineWidth
(3);
gEve
->
InsertVizDBEntry
(
"BigLine"
, ml);
TEveCompound
* cmp =
new
TEveCompound
;
cmp->
SetMainColor
(
kGreen
);
gEve
->
AddElement
(cmp);
TRandom
rnd(0);
cmp->
OpenCompound
();
cmp->
AddElement
(random_line(rnd, 20, 10));
cmp->
AddElement
(random_line(rnd, 20, 10));
TEveLine
* line = random_line(rnd, 20, 12);
line->
ApplyVizTag
(
"BigLine"
);
cmp->
AddElement
(line);
cmp->
CloseCompound
();
// Projected view
TEveViewer
*viewer =
gEve
->
SpawnNewViewer
(
"Projected"
);
TEveScene
*scene =
gEve
->
SpawnNewScene
(
"Projected Event"
);
viewer->
AddScene
(scene);
{
TGLViewer
* v = viewer->
GetGLViewer
();
v->
SetCurrentCamera
(
TGLViewer::kCameraOrthoXOY
);
}
// projections
TEveProjectionManager
* mng =
new
TEveProjectionManager
(
TEveProjection::kPT_RPhi
);
scene->
AddElement
(mng);
TEveProjectionAxes
* axes =
new
TEveProjectionAxes
(mng);
scene->
AddElement
(axes);
gEve
->
AddToListTree
(axes,
kTRUE
);
gEve
->
AddToListTree
(mng,
kTRUE
);
mng->
ImportElements
(cmp);
gEve
->
Redraw3D
(
kTRUE
);
}
Author
Matevz Tadel
Definition in file
compound.C
.