Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveBoxSet.hxx
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#ifndef ROOT_REveBoxSet
13#define ROOT_REveBoxSet
14
15#include "ROOT/REveDigitSet.hxx"
16#include "ROOT/REveVector.hxx"
17
18class TGeoMatrix;
19class TRandom;
20
21namespace ROOT {
22namespace Experimental {
24{
25 friend class REveBoxSetGL;
26
27 REveBoxSet(const REveBoxSet&) = delete;
28 REveBoxSet& operator=(const REveBoxSet&) = delete;
29
30public:
32 kBT_Undef, // unknown-ignored
33 kBT_FreeBox, // arbitrary box: specify 8*(x,y,z) box corners
34 kBT_AABox, // axis-aligned box: specify (x,y,z) and (w, h, d)
35 kBT_AABoxFixedDim, // axis-aligned box w/ fixed dimensions: specify (x,y,z)
39 };
40
41 struct BFreeBox_t : public DigitBase_t { Float_t fVertices[8][3]; };
42
43 struct BOrigin_t : public DigitBase_t { Float_t fA, fB, fC; };
44
45 struct BAABox_t : public BOrigin_t { Float_t fW, fH, fD; };
46
47 struct BAABoxFixedDim_t : public BOrigin_t {};
48
50
51 struct BEllipticCone_t : public BCone_t { Float_t fR2, fAngle; };
52
54
55protected:
56 EBoxType_e fBoxType; // Type of rendered box.
57
58 Float_t fDefWidth; // Breadth assigned to first coordinate (A).
59 Float_t fDefHeight; // Breadth assigned to second coordinate (B).
60 Float_t fDefDepth; // Breadth assigned to third coordinate (C).
61
62 Int_t fBoxSkip; // Number of boxes to skip for each drawn box during scene rotation.
63
65
66 static Int_t SizeofAtom(EBoxType_e bt);
67
68public:
69 REveBoxSet(const char* n="REveBoxSet", const char* t="");
70 virtual ~REveBoxSet() {}
71
72 void Reset(EBoxType_e boxType, Bool_t valIsCol, Int_t chunkSize);
73 void Reset();
74
75 void AddBox(const Float_t* verts);
78
79 void AddCone(const REveVector& pos, const REveVector& dir, Float_t r);
80 void AddEllipticCone(const REveVector& pos, const REveVector& dir, Float_t r, Float_t r2, Float_t angle=0);
81
82 void AddHex(const REveVector& pos, Float_t r, Float_t angle, Float_t depth);
83
84 void ComputeBBox() override;
85
86 void Test(Int_t nboxes);
87
88 Float_t GetDefWidth() const { return fDefWidth; }
89 Float_t GetDefHeight() const { return fDefHeight; }
90 Float_t GetDefDepth() const { return fDefDepth; }
92
97
98 Int_t GetBoxSkip() const { return fBoxSkip; }
99 void SetBoxSkip(Int_t bs) { fBoxSkip = bs; }
100
101
102 Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
103 void BuildRenderData() override;
104};
105
106} // namespace Experimental
107} // namespace ROOT
108#endif
ROOT::R::TRInterface & r
Definition Object.C:4
#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
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
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.
REveBoxSet(const REveBoxSet &)=delete
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 Reset(EBoxType_e boxType, Bool_t valIsCol, Int_t chunkSize)
REveBoxSet & operator=(const REveBoxSet &)=delete
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.
Geometrical transformation package.
Definition TGeoMatrix.h:41
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...