20using namespace::ROOT::Experimental;
49REveBoxSet::REveBoxSet(
const char*
n,
const char* t) :
82 default:
throw(eH +
"unexpected atom type.");
119 throw(eH +
"expect free box-type.");
122 memcpy(
b->fVertices, verts,
sizeof(
b->fVertices));
136 throw(eH +
"expect axis-aligned box-type.");
152 throw(eH +
"expect axis-aligned fixed-dimension box-type.");
167 throw(eH +
"expect cone box-type.");
182 static const REveException eH(
"REveBoxSet::AddEllipticCone ");
185 throw(eH +
"expect elliptic-cone box-type.");
202 static const REveException eH(
"REveBoxSet::AddEllipticCone ");
205 throw(eH +
"expect hex box-type.");
227 for (
int i=0; i<
n; ++i, bbps+=3)
248 for (
Int_t i = 0; i < 8; ++i)
276 Float_t mag2=0, mag2Max=0, rMax=0;
280 mag2 =
b.fDir.Mag2();
281 if (mag2>mag2Max) mag2Max=mag2;
282 if (
b.fR>rMax) rMax=
b.fR;
292 Float_t mag2=0, mag2Max=0, rMax=0;
296 mag2 =
b.fDir.Mag2();
297 if (mag2>mag2Max) mag2Max=mag2;
298 if (
b.fR > rMax) rMax =
b.fR;
299 if (
b.fR2 > rMax) rMax =
b.fR2;
325 throw(eH +
"unsupported box-type.");
358 for (
int c =0;
c < 8;
c++) {
359 for (
int j =0; j < 3; j++)
379 assert(
false &&
"REveBoxSet::BuildRenderData only kBT_FreeBox type supported");
409 value += 256*256*256*
c[3];
419 for (
int i = 0; i <
fPlex.
N(); ++i)
433 const Float_t origin = 10, size = 2;
435 for(
Int_t i=0; i<nboxes; ++i)
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 bounding-box information of the base-class TAttBBox (virtual method).
void AddBox(const Float_t *verts)
Create a new box from a set of 8 vertices.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
void BuildRenderData() override
Crates 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 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,...
static Int_t SizeofAtom(EBoxType_e bt)
Return size of data-structure describing a box of type bt.
void Reset(Int_t atom_size, Int_t chunk_size)
Empty the container and reset it with given atom and chunk sizes.
std::vector< int > fDigitIds
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
DigitBase_t * NewDigit()
Function providing highlight tooltips when always-sec-select is active.
Int_t GetId(Int_t n) const
Set external object reference for digit n.
REveRGBAPalette * fPalette
void ReleaseIds()
Protected method.
void DigitValue(Int_t value)
Set signal value for the last digit added.
std::unique_ptr< REveRenderData > fRenderData
Externally assigned and controlled user data.
REveException Exception-type thrown by Eve classes.
Int_t GetFrameSize() const
Float_t * GetFramePoints() const
const UChar_t * ColorFromValue(Int_t val) const
static void CheckAndFixBoxOrientationFv(Float_t box[8][3])
Make sure box orientation is consistent with standard arrangement.
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
Fill col with RGBA values corresponding to index ci.
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
This is the base class for the ROOT Random number generators.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual UInt_t Integer(UInt_t imax)
Returns a random integer uniformly distributed on the interval [ 0, imax-1 ].
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Short_t Max(Short_t a, Short_t b)
Double_t Sqrt(Double_t x)
Bool_t next()
Go to next atom.