Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveBoxSet.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 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 "ROOT/REveBoxSet.hxx"
13#include "ROOT/REveShape.hxx"
16#include "ROOT/REveManager.hxx"
17#include "ROOT/REveTrans.hxx"
18
19#include "TRandom.h"
20#include <algorithm>
21#include <cassert>
22#include <cmath>
23
24#include <nlohmann/json.hpp>
25
26using namespace::ROOT::Experimental;
27
28/** \class REveBoxSet
29\ingroup REve
30Collection of 3D primitives (fixed-size boxes, boxes of different
31sizes, or arbitrary sexto-epipeds, cones). Each primitive can be assigned
32a signal value and a TRef.
33
34A collection of 3D-markers. The way how they are defined depends
35on the fBoxType data-member.
36 - kBT_Vertices arbitrary box: specify its 8 vertices, 8*(x,y,z)
37 - kBT_InstancedScaled axis-aligned box of its own size
38 - kBT_Instanced axis-aligned box of the default size, set by
39 SetDefWidth() & co., or SetDefHalfWidth() & co.
40 - kBT_InstancedScaledRotated any transformation of the instance shape, a box,
41 hexagonal prism or cone: AddInstanceMat4(), AddHex(),
42 AddCone(), AddEllipticCone()
43
44An axis-aligned box is stored as its centre and half size, and spans centre -
45half size to centre + half size. AddInstance() and AddInstanceScaled() take the
46centre and the half size. AddInstanceCorner() and AddInstanceScaledCorner() take
47the lower corner and the full size, as TEveBoxSet's AddBox() does. The default
48size of a kBT_Instanced box is set as the full size with SetDefWidth(),
49SetDefHeight() and SetDefDepth(), or as the half size with SetDefHalfWidth(),
50SetDefHalfHeight() and SetDefHalfDepth(). It defaults to 1, a unit box, as in
51TEveBoxSet.
52
53Each primitive can be assigned:
54
55 1. Color or signal value. Thresholds and signal-to-color mapping
56 can then be set dynamically via the REveRGBAPalette class.
57 2. External TObject* (stored as TRef).
58
59See also base-class REveDigitSet for more information.
60Tutorial: tutorials/visualisation/eve/boxset_test.C
61*/
62
63////////////////////////////////////////////////////////////////////////////////
64
65REveBoxSet::REveBoxSet(const char* n, const char* t) :
66 REveDigitSet (n, t),
67
68 fBoxType (kBT_Undef),
69
70 fBoxSkip (0),
71
72 fDrawConeCap (kFALSE)
73{
74 // Constructor.
75
76 // Override from REveDigitSet.
78}
79
80////////////////////////////////////////////////////////////////////////////////
81/// Return size of data-structure describing a box of type bt.
82
84{
85 static const REveException eH("REveBoxSet::SizeofAtom ");
86
87 switch (bt) {
88 case kBT_Undef: return 0;
89 case kBT_Vertices: return sizeof(Vertices_t);
90 case kBT_Instanced: return sizeof(Instanced_t);
91 case kBT_InstancedScaled: return sizeof(InstancedScaled_t);
93 default: throw(eH + "unexpected atom type.");
94 }
95 return 0;
96}
97
98////////////////////////////////////////////////////////////////////////////////
99/// Half size of an axis-aligned instance, kBT_Instanced or kBT_InstancedScaled,
100/// as the client draws it. It can be negative where the size is.
101
102void REveBoxSet::InstanceHalfSize(const DigitBase_t &digit, Float_t half[3]) const
103{
105 const InstancedScaled_t &b = (const InstancedScaled_t &)digit;
106 half[0] = b.fW;
107 half[1] = b.fH;
108 half[2] = b.fD;
109 } else {
110 half[0] = fDefHalfWidth;
111 half[1] = fDefHalfHeight;
112 half[2] = fDefHalfDepth;
113 }
114}
115
116////////////////////////////////////////////////////////////////////////////////
117/// Reset the data containers to zero size.
118/// The arguments describe the basic parameters of data storage.
119
120void REveBoxSet::Reset(REveBoxSet::EBoxType_e boxType, Bool_t valIsCol, Int_t chunkSize)
121{
122 fBoxType = boxType;
123 fValueIsColor = valIsCol;
124 fDefaultValue = valIsCol ? 0 : kMinInt;
125 ReleaseIds();
126 fPlex.Reset(SizeofAtom(fBoxType), chunkSize);
127}
128
129////////////////////////////////////////////////////////////////////////////////
130/// Reset the data containers to zero size.
131/// Keep the old data-storage parameters.
132
138
139////////////////////////////////////////////////////////////////////////////////
140/// Create a new box from a set of 8 vertices.
141/// To be used for box-type kBT_Vertices.
142
144{
145 static const REveException eH("REveBoxSet::AddVertices ");
146
147 if (fBoxType != kBT_Vertices)
148 throw(eH + "expect box-type kBT_Vertices.");
149
151 memcpy(b->fVertices, verts, sizeof(b->fVertices));
153}
154
155////////////////////////////////////////////////////////////////////////////////
156/// Create a new axis-aligned box with centre (cx, cy, cz) and half size
157/// (hw, hh, hd).
158/// To be used for box-type kBT_InstancedScaled.
159
161{
162 static const REveException eH("REveBoxSet::AddInstanceScaled ");
163
165 throw(eH + "expect box-type kBT_InstancedScaled.");
166
168 box->fX = cx;
169 box->fY = cy;
170 box->fZ = cz;
171 box->fW = hw;
172 box->fH = hh;
173 box->fD = hd;
174}
175
176////////////////////////////////////////////////////////////////////////////////
177/// Create a new axis-aligned box with lower corner (x, y, z) and size
178/// (w, h, d).
179/// To be used for box-type kBT_InstancedScaled.
180
182{
183 AddInstanceScaled(x + 0.5f * w, y + 0.5f * h, z + 0.5f * d, 0.5f * w, 0.5f * h, 0.5f * d);
184}
185
186////////////////////////////////////////////////////////////////////////////////
187/// Create a new axis-aligned box with centre (cx, cy, cz) and the default
188/// size, see SetDefWidth() and SetDefHalfWidth().
189/// To be used for box-type kBT_Instanced.
190
192{
193 static const REveException eH("REveBoxSet::AddInstance ");
194
195 if (fBoxType != kBT_Instanced)
196 throw(eH + "expect box-type kBT_Instanced.");
197
199 box->fX = cx;
200 box->fY = cy;
201 box->fZ = cz;
202}
203
204////////////////////////////////////////////////////////////////////////////////
205/// Create a new axis-aligned box with lower corner (x, y, z) and the default
206/// size, see SetDefWidth() and SetDefHalfWidth(). The box is stored by its
207/// centre, computed with the current default size, so set that first.
208/// To be used for box-type kBT_Instanced.
209
214
215////////////////////////////////////////////////////////////////////////////////
216/// Create shape with arbitrary transformtaion
217///
219{
220 static const REveException eH("REveBoxSet::AddInstanceMat4 ");
222 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
223
225 memcpy(b->fMat, arr, sizeof(b->fMat));
226}
227
228////////////////////////////////////////////////////////////////////////////////
229/// Create a cone with apex at pos, axis dir and radius r.
230/// To be used for box-type kBT_InstancedScaledRotated.
231
232void REveBoxSet::AddCone(const REveVector& pos, const REveVector& dir, Float_t r)
233{
234 static const REveException eH("REveBoxSet::AddCone ");
235 using namespace TMath;
237 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
239
240 REveTrans t;
241 float h = dir.Mag();
242 float phi = ATan2(dir.fY, dir.fX);
243 float theta = ATan (dir.fZ / Sqrt(dir.fX*dir.fX + dir.fY*dir.fY));
244
245 theta = Pi()/2 -theta;
246 t.RotateLF(1, 2, phi);
247 t.RotateLF(3, 1, theta);
248 t.SetScale(r, r, h);
249 t.SetPos(pos.fX, pos.fY, pos.fZ);
250
252 for(Int_t i=0; i<16; ++i)
253 cone->fMat[i] = t[i];
254}
255
256////////////////////////////////////////////////////////////////////////////////
257/// Create a cone with apex at pos, axis dir and radius r.
258/// To be used for box-type kBT_EllipticCone.
259
262{
263 static const REveException eH("REveBoxSet::AddEllipticCone ");
264 using namespace TMath;
266 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
268 REveTrans t;
269 float h = dir.Mag();
270 float phi = ATan2(dir.fY, dir.fX);
271 float theta = ATan (dir.fZ / Sqrt(dir.fX*dir.fX + dir.fY*dir.fY));
272
273 theta = Pi()/2 -theta;
274 t.RotateLF(1, 2, phi);
275 t.RotateLF(3, 1, theta);
276 t.RotateLF(1, 2, angle * TMath::DegToRad());
277 t.SetScale(r, r2, h);
278 t.SetPos(pos.fX, pos.fY, pos.fZ);
279
281 for(Int_t i=0; i<16; ++i)
282 cone->fMat[i] = t[i];
283}
284
285////////////////////////////////////////////////////////////////////////////////
286/// Create a hexagonal prism with center of one hexagon at pos, radius of
287/// hexagon vertices r, rotation angle angle (in degrees), and length along z
288/// of depth. To be used for box-type kBT_Hex.
289
291{
292 static const REveException eH("REveBoxSet::AddHex ");
293
295 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
296
298
300 REveTrans t; // AMT do we need to reuse ???
301 t.SetPos(pos.fX, pos.fY, pos.fZ);
302 t.SetScale(r,r,depth);
303 t.RotateLF(1, 2, angle * TMath::DegToRad());
304 for(Int_t i=0; i<16; ++i)
305 hex->fMat[i] = t[i];
306}
307////////////////////////////////////////////////////////////////////////////////
308/// Fill the bounding box (virtual from REveElement).
309/// If member 'REveFrameBox* fFrame' is set, frame's corners are used as bbox.
310
312{
313 static const REveException eH("REveBoxSet::ComputeBBox ");
314
315 if (fFrame != nullptr)
316 {
317 BBoxInit();
318 Int_t n = fFrame->GetFrameSize() / 3;
319 Float_t *bbps = fFrame->GetFramePoints();
320 for (int i=0; i<n; ++i, bbps+=3)
321 BBoxCheckPoint(bbps);
322 return;
323 }
324
325 if(fPlex.Size() == 0)
326 {
327 BBoxZero();
328 return;
329 }
330
331 BBoxInit();
332
333 // An instance is drawn at pos + M * v, with v in [-1, 1]^3 and M its half
334 // sizes or its matrix. Each instance adds its own axis-aligned box.
336 switch (fBoxType) {
337
338 case kBT_Vertices: {
339 while (bi.next()) {
340 Vertices_t &b = *(Vertices_t *)bi();
341 for (Int_t i = 0; i < 8; ++i)
342 BBoxCheckPoint(b.fVertices[i]);
343 }
344 break;
345 }
346
348 case kBT_Instanced: {
349 Float_t half[3];
350 while (bi.next()) {
351 Instanced_t &b = *(Instanced_t *)bi();
352 InstanceHalfSize(b, half);
353 BBoxCheckBox(REveVector(b.fX, b.fY, b.fZ), REveVector(half[0], half[1], half[2]));
354 }
355 break;
356 }
357
359 while (bi.next()) {
361 float *a = b.fMat;
362 // Column-major: column j of M is a[4j], a[4j+1], a[4j+2]. M [-1, 1]^3
363 // reaches |a[k]| + |a[4+k]| + |a[8+k]| along axis k.
365 for (Int_t k = 0; k < 3; ++k)
366 h[k] = std::abs(a[k]) + std::abs(a[4 + k]) + std::abs(a[8 + k]);
367 BBoxCheckBox(REveVector(a[12], a[13], a[14]), h);
368 }
369 break;
370 }
371
372 default: {
373 throw eH + "unsupported box-type.";
374 }
375
376 } // end switch box-type
377}
378
379////////////////////////////////////////////////////////////////////////////////
380/// Fill core part of JSON representation.
381
382Int_t REveBoxSet::WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
383{
384 j["boxType"] = int(fBoxType);
385 j["shapeType"] = int(fInstanceShape);
386 if (fInstanceShape == kIS_Cone) {
387 j["coneCap"] = fDrawConeCap;
388 }
389
390 j["instanced"] = Instanced();
391 if (Instanced())
392 {
393 int N = fPlex.N();
394 int N_tex = 0;
395 std::string instanceFlag;
396 switch (fBoxType)
397 {
398 case kBT_Instanced:
399 instanceFlag = "FixedDimension";
400 N_tex = N;
401 break;
403 instanceFlag = "ScalePerDigit";
404 N_tex = 2*N;
405 break;
407 instanceFlag = "Mat4Trans";
408 N_tex = 4*N;
409 break;
410 default:
411 R__LOG_ERROR(REveLog()) << "REveBoxSet::WriteCoreJson Unhandled instancing type.";
412 }
413
415
416 j["N"] = N;
417 j["texX"] = fTexX;
418 j["texY"] = fTexY;
419 j["instanceFlag"] = instanceFlag;
420 // The client scales the shape template, which is within [-1, 1]^3, by
421 // these: the default half size for kBT_Instanced, 1 for the types that
422 // carry their own size or matrix.
423 const bool fixed = (fBoxType == kBT_Instanced);
424 j["defWidth"] = fixed ? fDefHalfWidth : 1.f;
425 j["defHeight"] = fixed ? fDefHalfHeight : 1.f;
426 j["defDepth"] = fixed ? fDefHalfDepth : 1.f;
427
428 // printf("TEXTURE SIZE X=%d, Y=%d\n", fTexX, fTexY);
429 }
430
431 // AMT:: the base class WroteCoreJson needs to be called after
432 // setting the texture value
433 Int_t ret = REveDigitSet::WriteCoreJson(j, rnr_offset);
434 return ret;
435}
436
437////////////////////////////////////////////////////////////////////////////////
438/// Creates 3D point array for rendering.
439
441{
442 if (fPlex.Size() == 0)
443 return;
444
445 fRenderData = std::make_unique<REveRenderData>("makeBoxSet", fPlex.Size() * 24, 0, fPlex.Size());
446
448 while (bi.next()) {
450 if (IsDigitVisible(b)) {
452 if (fSingleColor == false) {
453
454 if (fValueIsColor) {
455 fRenderData->PushI(int(b->fValue));
456 } else {
457 UChar_t c[4] = {0, 0, 0, 0};
459
460 int value = c[0] + c[1] * 256 + c[2] * 256 * 256;
461 // printf("box val [%d] values (%d, %d, %d) -> int <%d>\n", b.fValue, c[0], c[1], c[2], value);
462 fRenderData->PushI(value);
463 }
464 }
465 }
466 }
467 if (Instanced()) {
468 // printf(" >>> resize render data %d \n", 4 * fTexX * fTexY);
469 fRenderData->ResizeV(4 * fTexX * fTexY);
470 }
471
473}
474
475////////////////////////////////////////////////////////////////////////////////
476/// Get int value for color. Used for case of instancing.
477///
479{
480 if (fSingleColor == false) {
481 if (fValueIsColor) {
482 UChar_t* c = (UChar_t*) & digi.fValue;
483 return (c[0] << 16) + (c[1] << 8) + c[2];
484 } else {
485 // printf("palette\n");
486 UChar_t c[4] = {0, 0, 0, 0};
488 return (c[0] << 16) + (c[1] << 8) + c[2];
489 }
490 }
491 // printf("main color %d\n", GetMainColor());
492 UChar_t c[4] = {0, 0, 0, 0};
494 // printf("rgb %d %d %d\n", c[0], c[1], c[2]);
495 return (c[0] << 16) + (c[1] << 8) + c[2]; // AMT perhaps this can be ignored
496}
497
499{
500 uint32_t c = GetColorFromDigit(digit);
501 // this line required to avoid strict-aliasing rules warning
502 auto pc = (float *) &c;
503 return *pc;
504}
505
506
507////////////////////////////////////////////////////////////////////////////////
508/// Write shape data for different cases
509///
511{
512 switch (fBoxType) {
515 // vertices
516 for (int c = 0; c < 8; c++) {
517 for (int j = 0; j < 3; j++)
518 fRenderData->PushV(b.fVertices[c][j]);
519 }
520 break;
521 }
522
525 // position
526 fRenderData->PushV(b.fX, b.fY, b.fZ);
527 fRenderData->PushV(GetColorFromDigitAsFloat(b)); // color ?
528 fRenderData->PushV(b.fW, b.fH, b.fD);
529 fRenderData->PushV(2.f); // trasp ?
530 break;
531 }
533 Instanced_t &b =(Instanced_t &)(digit);
534 // position
535 fRenderData->PushV(b.fX, b.fY, b.fZ);
536 fRenderData->PushV(GetColorFromDigitAsFloat(b)); // color ?
537 fRenderData->PushV(2.f); // trasp ?
538 break;
539 }
542 float* a = b.fMat;
543 fRenderData->PushV(a[12], a[13], a[14]);
545 // write the first three columns
546 for (int i = 0; i < 12; i++) {
547 fRenderData->PushV(a[i]);
548 }
549 break;
550 }
551
552 default: assert(false && "REveBoxSet::BuildRenderData only kBT_Vertices type supported");
553 }
554}
555
556////////////////////////////////////////////////////////////////////////////////
557/// Fill the structure with a random set of boxes.
558
560{
562 TRandom rnd(0);
563 const Float_t origin = 10, size = 2;
564 Int_t color;
565 for(Int_t i=0; i<nboxes; ++i)
566 {
567 AddInstanceScaled(origin * rnd.Uniform(-1, 1),
568 origin * rnd.Uniform(-1, 1),
569 origin * rnd.Uniform(-1, 1),
570 size * rnd.Uniform(0.1, 1),
571 size * rnd.Uniform(0.1, 1),
572 size * rnd.Uniform(0.1, 1));
573
574 REveUtil::ColorFromIdx(rnd.Integer(256), (UChar_t*)&color);
575 DigitValue(color);
576 }
577}
578
579////////////////////////////////////////////////////////////////////////////////
580/// Use instancing in RenderCore.
581
583{
584 return gEve->IsRCore() && (fBoxType != kBT_Vertices);
585}
586
587
588/*
589////////////////////////////////////////////////////////////////////////////////
590/// Set DigitShape
591
592bool REveBoxSet::SetDigitShape(const std::vector<float>& vrtBuff, const std::vector<int>& idxBuff)
593{
594 fGeoShape.v = v;
595
596}
597*/
#define R__LOG_ERROR(...)
Definition RLogger.hxx:356
#define d(i)
Definition RSha256.hxx:102
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
Definition RtypesCore.h:53
constexpr Int_t kMinInt
Definition RtypesCore.h:121
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
constexpr Bool_t kTRUE
Definition RtypesCore.h:108
#define N
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint angle
void AddInstanceMat4(const Float_t *mat4)
Create shape with arbitrary transformtaion.
void AddEllipticCone(const REveVector &pos, const REveVector &dir, Float_t r, Float_t r2, Float_t angle=0)
Create a cone with apex at pos, axis dir and radius r.
void ComputeBBox() override
Fill the bounding box (virtual from REveElement).
void AddInstanceCorner(Float_t x, Float_t y, Float_t z)
Create a new axis-aligned box with lower corner (x, y, z) and the default size, see SetDefWidth() and...
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
void BuildRenderData() override
Creates 3D point array for rendering.
void Test(Int_t nboxes)
Fill the structure with a random set of boxes.
void AddCone(const REveVector &pos, const REveVector &dir, Float_t r)
Create a cone with apex at pos, axis dir and radius r.
void Reset()
Reset the data containers to zero size.
void InstanceHalfSize(const DigitBase_t &digit, Float_t half[3]) const
Half size of an axis-aligned instance, kBT_Instanced or kBT_InstancedScaled, as the client draws it.
EInstanceShape_e fInstanceShape
void AddVertices(const Float_t *verts)
Create a new box from a set of 8 vertices.
void AddInstanceScaled(Float_t cx, Float_t cy, Float_t cz, Float_t hw, Float_t hh, Float_t hd)
Create a new axis-aligned box with centre (cx, cy, cz) and half size (hw, hh, hd).
void AddHex(const REveVector &pos, Float_t r, Float_t angle, Float_t depth)
Create a hexagonal prism with center of one hexagon at pos, radius of hexagon vertices r,...
unsigned int GetColorFromDigit(REveDigitSet::DigitBase_t &digit)
Get int value for color.
float GetColorFromDigitAsFloat(REveDigitSet::DigitBase_t &digit)
void WriteShapeData(REveDigitSet::DigitBase_t &digit)
Write shape data for different cases.
static Int_t SizeofAtom(EBoxType_e bt)
Return size of data-structure describing a box of type bt.
bool Instanced()
Use instancing in RenderCore.
void AddInstance(Float_t cx, Float_t cy, Float_t cz)
Create a new axis-aligned box with centre (cx, cy, cz) and the default size, see SetDefWidth() and Se...
void AddInstanceScaledCorner(Float_t x, Float_t y, Float_t z, Float_t w, Float_t h, Float_t d)
Create a new axis-aligned box with lower corner (x, y, z) and size (w, h, d).
void Reset(Int_t atom_size, Int_t chunk_size)
Empty the container and reset it with given atom and chunk sizes.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
DigitBase_t * NewDigit()
Protected method called whenever a new digit is added.
bool IsDigitVisible(const DigitBase_t *) const
Utility function for maping digit idx with visible shape idx.
void ReleaseIds()
Protected method.
void DigitValue(Int_t value)
Set signal value for the last digit added.
void BBoxCheckPoint(const REveVector &v)
std::unique_ptr< REveRenderData > fRenderData
! Vertex / normal / triangle index information for rendering.
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Set the bounding box to a cube of half-side epsilon at (x, y, z); with the defaults,...
void BBoxInit()
Start filling the bounding box with BBoxCheckPoint(): min at +infinity, max at -infinity,...
void BBoxCheckBox(const REveVector &c, const REveVector &h)
Grow the box to hold the axis-aligned box with centre c and half sizes h.
virtual Color_t GetMainColor() const
virtual void BuildRenderData()
Build fRenderData, what the client draws.
REveException Exception-type thrown by Eve classes.
Definition REveTypes.hxx:42
const UChar_t * ColorFromValue(Int_t val) const
static void CalcTextureSize(int nel, int align, int &sx, int &sy)
Calculate texture dimensions to hold nel elements with given alignment on x axis.
static void CheckAndFixBoxOrientationFv(Float_t box[8][3])
Make sure box orientation is consistent with standard arrangement.
void RotateLF(Int_t i1, Int_t i2, Double_t amount)
Rotate in local frame. Does optimised version of MultRight.
void SetScale(Double_t sx, Double_t sy, Double_t sz)
Set scaling.
void SetPos(Double_t x, Double_t y, Double_t z)
Set position (base-vec 4).
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
Fill col with RGBA values corresponding to index ci.
Definition REveUtil.cxx:187
This is the base class for the ROOT Random number generators.
Definition TRandom.h:28
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
Definition TRandom.cxx:681
virtual UInt_t Integer(UInt_t imax)
Returns a random integer uniformly distributed on the interval [ 0, imax-1 ].
Definition TRandom.cxx:360
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
ROOT::RLogChannel & REveLog()
Log channel for Eve diagnostics.
Definition REveTypes.cxx:52
R__EXTERN REveManager * gEve
REveVectorT< Float_t > REveVector
TMath.
Definition TMathBase.h:35
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:249
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Definition TMath.h:82