Macro illustrating how to animate a geometry picture using a Timer.
{
TTRD2 *
trd2 =
new TTRD2(
"TRD2",
"TRD2",
"void", 200, 50, 200, 50, 100);
TTRAP *
trap =
new TTRAP(
"TRAP",
"TRAP",
"void", 190, 0, 0, 60, 40, 90, 15, 120, 80, 180, 15);
TPARA *
para =
new TPARA(
"PARA",
"PARA",
"void", 100, 200, 200, 15, 30, 30);
TGTRA *
gtra =
new TGTRA(
"GTRA",
"GTRA",
"void", 390, 0, 0, 20, 60, 40, 90, 15, 120, 80, 180, 15);
TTUBS *
tubs =
new TTUBS(
"TUBS",
"TUBS",
"void", 80, 100, 100, 90, 235);
TCONE *
cone =
new TCONE(
"CONE",
"CONE",
"void", 100, 50, 70, 120, 150);
TCONS *
cons =
new TCONS(
"CONS",
"CONS",
"void", 50, 100, 100, 200, 300, 90, 270);
TSPHE *
sphe =
new TSPHE(
"SPHE",
"SPHE",
"void", 25, 340, 45, 135, 0, 270);
TSPHE *
sphe1 =
new TSPHE(
"SPHE1",
"SPHE1",
"void", 0, 140, 0, 180, 0, 360);
TSPHE *
sphe2 =
new TSPHE(
"SPHE2",
"SPHE2",
"void", 0, 200, 10, 120, 45, 145);
pcon->DefineSection(0, -200, 50, 100);
pcon->DefineSection(1, -50, 50, 80);
pcon->DefineSection(2, 50, 50, 80);
pcon->DefineSection(3, 200, 50, 100);
pgon->DefineSection(0, -200, 50, 100);
pgon->DefineSection(1, -50, 50, 80);
pgon->DefineSection(2, 50, 50, 80);
pgon->DefineSection(3, 200, 50, 100);
timer->SetCommand(
"Animate()");
}
void Animate()
{
theta += 2;
phi += 2;
gPad->GetView()->RotateView(theta, phi);
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
A box with faces perpendicular to the axes.
A segment of a conical tube.
A general twisted trapezoid.
A trapezoid with the x dimension varying along z.
A trapezoid with both x and y dimensions varying along z.
Handles synchronous and a-synchronous timer events.