Demonstrates usage of REveBoxSet class.
{
}
{
pal->SetMin(80);
#define RND_BOX(x) (Float_t) r.Uniform(-(x), (x))
const float A = 40;
const float D = 1;
for (int i = 0; i < num; ++i) {
float a =
r.Uniform(0.2 * A, A);
q->DigitValue(
r.Uniform(0, 130));
}
#undef RND_BOX
q->SetAlwaysSecSelect(1);
q->SetTooltipCBFoo(customTooltip);
}
{
frm->SetAABoxCenterHalfSize(0, 0, 0, 12, 12, 12);
frm->SetFrameColor(
kCyan);
frm->SetBackColorRGBA(120, 120, 120, 20);
for (
Int_t i = 0; i < num; ++i) {
q->AddInstanceScaled(
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(0.2, 1),
r.Uniform(0.2, 1),
r.Uniform(0.2, 1));
q->DigitValue(
r.Uniform(0, 130));
}
q->SetAlwaysSecSelect(1);
q->SetTooltipCBFoo(customTooltip);
}
{
for (
Int_t i = 0; i < num; ++i) {
q->AddInstanceScaled(
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(0.2, 1),
r.Uniform(0.2, 1),
r.Uniform(0.2, 1));
q->DigitColor(
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255));
}
}
{
q->SetMainTransparency(50);
for (
Int_t i = 0; i < num; ++i) {
q->AddInstanceScaled(
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(0.2, 1),
r.Uniform(0.2, 1),
r.Uniform(0.2, 1));
}
}
{
q->SetMainTransparency(50);
for (
Int_t i = 0; i < num; ++i) {
q->AddInstance(
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(-10, 10));
}
q->SetAlwaysSecSelect(1);
}
{
for (
Int_t i = 0; i < num; ++i) {
q->AddHex(
REveVector(
r.Uniform(-10, 10),
r.Uniform(-10, 10),
r.Uniform(-10, 10)),
r.Uniform(0.2, 1),
r.Uniform(0, 60),
r.Uniform(0.2, 5));
q->DigitColor(
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255),
r.Uniform(20, 255));
}
q->SetAlwaysSecSelect(
true);
}
{
for (
Int_t i = 0; i < num; ++i) {
t.Scale(1, 1, 10);
t.RotateLF(1, 2,
r.Uniform(3.14));
float farr[16];
for (
int m = 0;
m < 16;
m++)
q->AddInstanceMat4(farr);
q->DigitColor(255, 0, 0, 100);
}
q->SetAlwaysSecSelect(
true);
}
void boxset()
{
enum EBoxDemo_t {
ScaledRotated,
Free,
AxisAligned,
Hexagon,
FixedDimension,
SingleColor
};
EBoxDemo_t demo = AxisAligned;
switch (demo) {
case ScaledRotated:
b = boxset_gentrans();
break;
case Free:
b = boxset_free();
break;
case AxisAligned:
b = boxset_axisaligned();
break;
case FixedDimension:
b = boxset_fixed_dim();
break;
case Hexagon:
b = boxset_hex();
break;
case SingleColor:
b = boxset_single_color();
break;
default: printf("Unsupported demo type. \n"); return;
}
eveMng->GetEventScene()->AddElement(
b);
eveMng->GetEventScene()->AddElement(
b->GetPalette());
b1->SetNSegments(80);
b1->SetMainTransparency(95);
}
#define R(a, b, c, d, e, f, g, h, i)
int Int_t
Signed integer 4 bytes (int).
short Color_t
Color number (short).
float Float_t
Float 4 bytes (float).
Collection of 3D primitives (fixed-size boxes, boxes of different sizes, or arbitrary sexto-epipeds,...
Description of a 2D or 3D frame that can be used to visually group a set of objects.
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
A generic, speed-optimised mapping from value to RGBA color supporting different wrapping and range t...
REveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Eve representation of a GL view.
@ kBT_InstancedScaledRotated
DigitBase_t * GetDigit(Int_t n) const
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
This is the base class for the ROOT Random number generators.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
ROOT::Experimental::REveManager * eveMng
Namespace for ROOT features in testing.
REveVectorT< Float_t > REveVector