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/RLogger.hxx"
17#include "ROOT/REveTrans.hxx"
18
19#include "TRandom.h"
20#include <algorithm>
21#include <cassert>
22#include <cmath>
23#include <cstring>
24
25#include <nlohmann/json.hpp>
26
27using namespace::ROOT::Experimental;
28
29/** \class REveBoxSet
30\ingroup REve
31Collection of 3D primitives (fixed-size boxes, boxes of different
32sizes, or arbitrary sexto-epipeds, cones). Each primitive can be assigned
33a signal value and a TRef.
34
35A collection of 3D-markers. The way how they are defined depends
36on the fBoxType data-member.
37 - kBT_Vertices arbitrary box: specify its 8 vertices, 8*(x,y,z)
38 - kBT_InstancedScaled axis-aligned box of its own size
39 - kBT_Instanced axis-aligned box of the default size, set by
40 SetDefWidth() & co., or SetDefHalfWidth() & co.
41 - kBT_InstancedScaledRotated any transformation of the instance shape, a box,
42 hexagonal prism or cone: AddInstanceMat4(), AddHex(),
43 AddCone(), AddEllipticCone()
44
45An axis-aligned box is stored as its centre and half size, and spans centre -
46half size to centre + half size. AddInstance() and AddInstanceScaled() take the
47centre and the half size. AddInstanceCorner() and AddInstanceScaledCorner() take
48the lower corner and the full size, as TEveBoxSet's AddBox() does. The default
49size of a kBT_Instanced box is set as the full size with SetDefWidth(),
50SetDefHeight() and SetDefDepth(), or as the half size with SetDefHalfWidth(),
51SetDefHalfHeight() and SetDefHalfDepth(). It defaults to 1, a unit box, as in
52TEveBoxSet.
53
54Each primitive can be assigned:
55
56 1. Color or signal value. Thresholds and signal-to-color mapping
57 can then be set dynamically via the REveRGBAPalette class.
58 2. External TObject* (stored as TRef).
59
60The render data has one entry per set, holding the visible digits in plex
61order; hidden digits, see REveDigitSet::IsDigitVisible(), are left out, so the
62client's shape index k is the k-th visible digit:
63 - `inst`, for the kBT_Instanced* types: one item per digit in an rgba32f
64 texture, f32 x 4 for kBT_Instanced (centre, colour), f32 x 8 for
65 kBT_InstancedScaled (centre, colour; half size, 2) and f32 x 16 for
66 kBT_InstancedScaledRotated (translation, colour; the first three matrix
67 columns), so one, two or four texels per digit. The colour is
68 GetColorFromDigit(), its bits stored as the float.
69 - `pos`, for kBT_Vertices: f32 x 3, the eight vertices of each digit; with
70 `col`, u8 x 4 per digit, its colour, unless the set has a single colour.
71
72See also base-class REveDigitSet for more information.
73Tutorial: tutorials/visualisation/eve/boxset_test.C
74*/
75
76namespace {
77
78/// Texels of the `inst` entry per digit of an instanced box type; the item
79/// size is four floats per texel.
80int TexelsPerDigit(REveBoxSet::EBoxType_e bt)
81{
82 switch (bt) {
83 case REveBoxSet::kBT_InstancedScaled: return 2;
84 case REveBoxSet::kBT_InstancedScaledRotated: return 4;
85 default: return 1;
86 }
87}
88
89} // namespace
90
91////////////////////////////////////////////////////////////////////////////////
92
93REveBoxSet::REveBoxSet(const char* n, const char* t) :
94 REveDigitSet (n, t),
95
96 fBoxType (kBT_Undef),
97
98 fBoxSkip (0),
99
100 fDrawConeCap (kFALSE)
101{
102 // Constructor.
103
104 // Override from REveDigitSet.
106}
107
108////////////////////////////////////////////////////////////////////////////////
109/// Return size of data-structure describing a box of type bt.
110
112{
113 static const REveException eH("REveBoxSet::SizeofAtom ");
114
115 switch (bt) {
116 case kBT_Undef: return 0;
117 case kBT_Vertices: return sizeof(Vertices_t);
118 case kBT_Instanced: return sizeof(Instanced_t);
119 case kBT_InstancedScaled: return sizeof(InstancedScaled_t);
121 default: throw(eH + "unexpected atom type.");
122 }
123 return 0;
124}
125
126////////////////////////////////////////////////////////////////////////////////
127/// Half size of an axis-aligned instance, kBT_Instanced or kBT_InstancedScaled,
128/// as the client draws it. It can be negative where the size is.
129
130void REveBoxSet::InstanceHalfSize(const DigitBase_t &digit, Float_t half[3]) const
131{
133 const InstancedScaled_t &b = (const InstancedScaled_t &)digit;
134 half[0] = b.fW;
135 half[1] = b.fH;
136 half[2] = b.fD;
137 } else {
138 half[0] = fDefHalfWidth;
139 half[1] = fDefHalfHeight;
140 half[2] = fDefHalfDepth;
141 }
142}
143
144////////////////////////////////////////////////////////////////////////////////
145/// Reset the data containers to zero size.
146/// The arguments describe the basic parameters of data storage.
147
148void REveBoxSet::Reset(REveBoxSet::EBoxType_e boxType, Bool_t valIsCol, Int_t chunkSize)
149{
150 fBoxType = boxType;
151 fValueIsColor = valIsCol;
152 fDefaultValue = valIsCol ? 0 : kMinInt;
153 ReleaseIds();
154 fPlex.Reset(SizeofAtom(fBoxType), chunkSize);
155}
156
157////////////////////////////////////////////////////////////////////////////////
158/// Reset the data containers to zero size.
159/// Keep the old data-storage parameters.
160
166
167////////////////////////////////////////////////////////////////////////////////
168/// Create a new box from a set of 8 vertices.
169/// To be used for box-type kBT_Vertices.
170
172{
173 static const REveException eH("REveBoxSet::AddVertices ");
174
175 if (fBoxType != kBT_Vertices)
176 throw(eH + "expect box-type kBT_Vertices.");
177
179 memcpy(b->fVertices, verts, sizeof(b->fVertices));
181}
182
183////////////////////////////////////////////////////////////////////////////////
184/// Create a new axis-aligned box with centre (cx, cy, cz) and half size
185/// (hw, hh, hd).
186/// To be used for box-type kBT_InstancedScaled.
187
189{
190 static const REveException eH("REveBoxSet::AddInstanceScaled ");
191
193 throw(eH + "expect box-type kBT_InstancedScaled.");
194
196 box->fX = cx;
197 box->fY = cy;
198 box->fZ = cz;
199 box->fW = hw;
200 box->fH = hh;
201 box->fD = hd;
202}
203
204////////////////////////////////////////////////////////////////////////////////
205/// Create a new axis-aligned box with lower corner (x, y, z) and size
206/// (w, h, d).
207/// To be used for box-type kBT_InstancedScaled.
208
210{
211 AddInstanceScaled(x + 0.5f * w, y + 0.5f * h, z + 0.5f * d, 0.5f * w, 0.5f * h, 0.5f * d);
212}
213
214////////////////////////////////////////////////////////////////////////////////
215/// Create a new axis-aligned box with centre (cx, cy, cz) and the default
216/// size, see SetDefWidth() and SetDefHalfWidth().
217/// To be used for box-type kBT_Instanced.
218
220{
221 static const REveException eH("REveBoxSet::AddInstance ");
222
223 if (fBoxType != kBT_Instanced)
224 throw(eH + "expect box-type kBT_Instanced.");
225
227 box->fX = cx;
228 box->fY = cy;
229 box->fZ = cz;
230}
231
232////////////////////////////////////////////////////////////////////////////////
233/// Create a new axis-aligned box with lower corner (x, y, z) and the default
234/// size, see SetDefWidth() and SetDefHalfWidth(). The box is stored by its
235/// centre, computed with the current default size, so set that first.
236/// To be used for box-type kBT_Instanced.
237
242
243////////////////////////////////////////////////////////////////////////////////
244/// Create shape with arbitrary transformtaion
245///
247{
248 static const REveException eH("REveBoxSet::AddInstanceMat4 ");
250 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
251
253 memcpy(b->fMat, arr, sizeof(b->fMat));
254}
255
256////////////////////////////////////////////////////////////////////////////////
257/// Create a cone with apex at pos, axis dir and radius r.
258/// To be used for box-type kBT_InstancedScaledRotated.
259
260void REveBoxSet::AddCone(const REveVector& pos, const REveVector& dir, Float_t r)
261{
262 static const REveException eH("REveBoxSet::AddCone ");
263 using namespace TMath;
265 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
267
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.SetScale(r, r, h);
277 t.SetPos(pos.fX, pos.fY, pos.fZ);
278
280 for(Int_t i=0; i<16; ++i)
281 cone->fMat[i] = t[i];
282}
283
284////////////////////////////////////////////////////////////////////////////////
285/// Create a cone with apex at pos, axis dir and radius r.
286/// To be used for box-type kBT_EllipticCone.
287
290{
291 static const REveException eH("REveBoxSet::AddEllipticCone ");
292 using namespace TMath;
294 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
296 REveTrans t;
297 float h = dir.Mag();
298 float phi = ATan2(dir.fY, dir.fX);
299 float theta = ATan (dir.fZ / Sqrt(dir.fX*dir.fX + dir.fY*dir.fY));
300
301 theta = Pi()/2 -theta;
302 t.RotateLF(1, 2, phi);
303 t.RotateLF(3, 1, theta);
304 t.RotateLF(1, 2, angle * TMath::DegToRad());
305 t.SetScale(r, r2, h);
306 t.SetPos(pos.fX, pos.fY, pos.fZ);
307
309 for(Int_t i=0; i<16; ++i)
310 cone->fMat[i] = t[i];
311}
312
313////////////////////////////////////////////////////////////////////////////////
314/// Create a hexagonal prism with center of one hexagon at pos, radius of
315/// hexagon vertices r, rotation angle angle (in degrees), and length along z
316/// of depth. To be used for box-type kBT_Hex.
317
319{
320 static const REveException eH("REveBoxSet::AddHex ");
321
323 throw(eH + "expect box-type kBT_InstancedScaledRotated.");
324
326
328 REveTrans t; // AMT do we need to reuse ???
329 t.SetPos(pos.fX, pos.fY, pos.fZ);
330 t.SetScale(r,r,depth);
331 t.RotateLF(1, 2, angle * TMath::DegToRad());
332 for(Int_t i=0; i<16; ++i)
333 hex->fMat[i] = t[i];
334}
335////////////////////////////////////////////////////////////////////////////////
336/// Fill the bounding box (virtual from REveElement).
337/// If member 'REveFrameBox* fFrame' is set, frame's corners are used as bbox.
338
340{
341 static const REveException eH("REveBoxSet::ComputeBBox ");
342
343 if (fFrame != nullptr)
344 {
345 BBoxInit();
346 Int_t n = fFrame->GetFrameSize() / 3;
347 Float_t *bbps = fFrame->GetFramePoints();
348 for (int i=0; i<n; ++i, bbps+=3)
349 BBoxCheckPoint(bbps);
350 return;
351 }
352
353 if(fPlex.Size() == 0)
354 {
355 BBoxZero();
356 return;
357 }
358
359 BBoxInit();
360
361 // An instance is drawn at pos + M * v, with v in [-1, 1]^3 and M its half
362 // sizes or its matrix. Each instance adds its own axis-aligned box.
364 switch (fBoxType) {
365
366 case kBT_Vertices: {
367 while (bi.next()) {
368 Vertices_t &b = *(Vertices_t *)bi();
369 for (Int_t i = 0; i < 8; ++i)
370 BBoxCheckPoint(b.fVertices[i]);
371 }
372 break;
373 }
374
376 case kBT_Instanced: {
377 Float_t half[3];
378 while (bi.next()) {
379 Instanced_t &b = *(Instanced_t *)bi();
380 InstanceHalfSize(b, half);
381 BBoxCheckBox(REveVector(b.fX, b.fY, b.fZ), REveVector(half[0], half[1], half[2]));
382 }
383 break;
384 }
385
387 while (bi.next()) {
389 float *a = b.fMat;
390 // Column-major: column j of M is a[4j], a[4j+1], a[4j+2]. M [-1, 1]^3
391 // reaches |a[k]| + |a[4+k]| + |a[8+k]| along axis k.
393 for (Int_t k = 0; k < 3; ++k)
394 h[k] = std::abs(a[k]) + std::abs(a[4 + k]) + std::abs(a[8 + k]);
395 BBoxCheckBox(REveVector(a[12], a[13], a[14]), h);
396 }
397 break;
398 }
399
400 default: {
401 throw eH + "unsupported box-type.";
402 }
403
404 } // end switch box-type
405}
406
407////////////////////////////////////////////////////////////////////////////////
408/// Fill core part of JSON representation. The number of digits drawn and the
409/// texture size are the `inst` entry's count and tex, see BuildRenderData().
410
411Int_t REveBoxSet::WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
412{
413 j["boxType"] = int(fBoxType);
414 j["shapeType"] = int(fInstanceShape);
415 if (fInstanceShape == kIS_Cone) {
416 j["coneCap"] = fDrawConeCap;
417 }
418
419 j["instanced"] = Instanced();
420 if (Instanced()) {
421 std::string instanceFlag;
422 switch (fBoxType)
423 {
424 case kBT_Instanced: instanceFlag = "FixedDimension"; break;
425 case kBT_InstancedScaled: instanceFlag = "ScalePerDigit"; break;
426 case kBT_InstancedScaledRotated: instanceFlag = "Mat4Trans"; break;
427 default: R__LOG_ERROR(REveLog()) << "REveBoxSet::WriteCoreJson Unhandled instancing type.";
428 }
429
430 j["instanceFlag"] = instanceFlag;
431 // The client scales the shape template, which is within [-1, 1]^3, by
432 // these: the default half size for kBT_Instanced, 1 for the types that
433 // carry their own size or matrix.
434 const bool fixed = (fBoxType == kBT_Instanced);
435 j["defWidth"] = fixed ? fDefHalfWidth : 1.f;
436 j["defHeight"] = fixed ? fDefHalfHeight : 1.f;
437 j["defDepth"] = fixed ? fDefHalfDepth : 1.f;
438 }
439
440 return REveDigitSet::WriteCoreJson(j, rnr_offset);
441}
442
443////////////////////////////////////////////////////////////////////////////////
444/// Write the render data entries, see the class description: `inst` for the
445/// instanced types, `pos` and, for a set without a single colour, `col` for
446/// kBT_Vertices. Only visible digits are written.
447
449{
450 if (fPlex.Size() == 0)
451 return;
452
453 using RD = REveRenderData;
454 fRenderData = std::make_unique<RD>("makeBoxSet");
455
456 int n_visible = 0;
457 {
459 while (bi.next())
460 if (IsDigitVisible((DigitBase_t *)bi()))
461 ++n_visible;
462 }
463
464 const bool vertices = (fBoxType == kBT_Vertices);
465 RD::Entry &shape =
466 vertices ? fRenderData->NewEntry("pos", RD::EType::kF32, 3).Role(RD::ERole::kVertex).Reserve(8 * n_visible)
467 : fRenderData->NewEntry("inst", RD::EType::kF32, 4 * TexelsPerDigit(fBoxType)).Reserve(n_visible);
468 RD::Entry *col = nullptr;
469 if (vertices && !fSingleColor)
470 col = &fRenderData->NewEntry("col", RD::EType::kU8, 4).Role(RD::ERole::kInstance).Reserve(n_visible);
471
473 while (bi.next()) {
474 DigitBase_t *b = (DigitBase_t *)bi();
475 if (!IsDigitVisible(b))
476 continue;
477 WriteShapeData(*b, shape);
478 if (col) {
479 // The bytes of fValue are the colour when the value is a colour.
480 UChar_t c[4] = {0, 0, 0, 0};
481 if (fValueIsColor)
482 std::memcpy(c, &b->fValue, 4);
483 else
485 col->PushRGBA(c[0], c[1], c[2], c[3]);
486 }
487 }
488
489 // An item of an instanced type takes one, two or four texels, and the
490 // client reads them from one texture row.
491 if (!vertices)
492 shape.AsTexture(RD::ETexFormat::kRGBA32F, TexelsPerDigit(fBoxType));
493}
494
495////////////////////////////////////////////////////////////////////////////////
496/// Get int value for color. Used for case of instancing.
497///
499{
500 if (fSingleColor == false) {
501 if (fValueIsColor) {
502 UChar_t* c = (UChar_t*) & digi.fValue;
503 return (c[0] << 16) + (c[1] << 8) + c[2];
504 } else {
505 // printf("palette\n");
506 UChar_t c[4] = {0, 0, 0, 0};
508 return (c[0] << 16) + (c[1] << 8) + c[2];
509 }
510 }
511 // printf("main color %d\n", GetMainColor());
512 UChar_t c[4] = {0, 0, 0, 0};
514 // printf("rgb %d %d %d\n", c[0], c[1], c[2]);
515 return (c[0] << 16) + (c[1] << 8) + c[2]; // AMT perhaps this can be ignored
516}
517
519{
520 uint32_t c = GetColorFromDigit(digit);
521 // this line required to avoid strict-aliasing rules warning
522 auto pc = (float *) &c;
523 return *pc;
524}
525
526////////////////////////////////////////////////////////////////////////////////
527/// Append the shape of `digit` to `entry`, its render data entry: `pos` for
528/// kBT_Vertices and `inst` for the instanced types; see the class description
529/// for the layouts.
530
532{
533 switch (fBoxType) {
536 entry.Push(&b.fVertices[0][0], 24);
537 break;
538 }
539
542 entry.Push(b.fX, b.fY, b.fZ, GetColorFromDigitAsFloat(b), b.fW, b.fH, b.fD, 2.f);
543 break;
544 }
546 Instanced_t &b = (Instanced_t &)(digit);
547 entry.Push(b.fX, b.fY, b.fZ, GetColorFromDigitAsFloat(b));
548 break;
549 }
552 float *a = b.fMat;
553 entry.Push(a[12], a[13], a[14], GetColorFromDigitAsFloat(b));
554 // the first three columns
555 entry.Push((const float *)a, 12);
556 break;
557 }
558
559 default: assert(false && "REveBoxSet::WriteShapeData unsupported box type");
560 }
561}
562
563////////////////////////////////////////////////////////////////////////////////
564/// Fill the structure with a random set of boxes.
565
567{
569 TRandom rnd(0);
570 const Float_t origin = 10, size = 2;
571 Int_t color;
572 for(Int_t i=0; i<nboxes; ++i)
573 {
574 AddInstanceScaled(origin * rnd.Uniform(-1, 1),
575 origin * rnd.Uniform(-1, 1),
576 origin * rnd.Uniform(-1, 1),
577 size * rnd.Uniform(0.1, 1),
578 size * rnd.Uniform(0.1, 1),
579 size * rnd.Uniform(0.1, 1));
580
581 REveUtil::ColorFromIdx(rnd.Integer(256), (UChar_t*)&color);
582 DigitValue(color);
583 }
584}
585
586////////////////////////////////////////////////////////////////////////////////
587/// Every box type except kBT_Vertices is drawn by instancing.
588
590{
591 return fBoxType != kBT_Vertices;
592}
593
594
595/*
596////////////////////////////////////////////////////////////////////////////////
597/// Set DigitShape
598
599bool REveBoxSet::SetDigitShape(const std::vector<float>& vrtBuff, const std::vector<int>& idxBuff)
600{
601 fGeoShape.v = v;
602
603}
604*/
#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
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 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 WriteShapeData(REveDigitSet::DigitBase_t &digit, REveRenderData::Entry &entry)
Append the shape of digit to entry, its render data entry: pos for kBT_Vertices and inst for the inst...
void BuildRenderData() override
Write the render data entries, see the class description: inst for the instanced types,...
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)
static Int_t SizeofAtom(EBoxType_e bt)
Return size of data-structure describing a box of type bt.
bool Instanced()
Every box type except kBT_Vertices is drawn by instancing.
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
! Render data entries for the client's maker, see REveRenderData.
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
REveException Exception-type thrown by Eve classes.
Definition REveTypes.hxx:42
const UChar_t * ColorFromValue(Int_t val) const
Entry & Push(T v)
Append one element; T must be the entry's type.
Render data of an element: a client maker name and a list of tagged entries, each a typed array with ...
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
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