Logo ROOT   6.21/01
Reference Guide
REveEllipsoid.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Author: Matevz Tadel, Alja Tadel
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, 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 ROOT7_REveEllipsoid
13 #define ROOT7_REveEllipsoid
14 
15 #include <ROOT/REveShape.hxx>
16 #include <ROOT/REveVector.hxx>
19 
20 namespace ROOT {
21 namespace Experimental {
22 
23 //------------------------------------------------------------------------------
24 // REveEllipsoid
25 //------------------------------------------------------------------------------
26 
28 {
29  friend class REveEllipsoidProjected;
30 
31 private:
32  REveEllipsoid(const REveEllipsoid &) = delete;
33  REveEllipsoid &operator=(const REveEllipsoid &) = delete;
34 
35 protected:
39 
40  float fPhiStep;
41  void DrawArch(float phiStart, float phiEnd, float phiStep, REveVector& v0, REveVector& v1, REveVector& v2);
42 
43 public:
44  REveEllipsoid(const std::string &n = "REveJetConeProjected", const std::string& t = "");
45  virtual ~REveEllipsoid() {};
46 
47  virtual void Outline();
49  void SetPhiStep(float ps);
50 
51  Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
52 
53  TClass *ProjectedClass(const REveProjection *p) const override;
54 };
55 
56 //------------------------------------------------------------------------------
57 // REveEllipsoidProjected
58 //------------------------------------------------------------------------------
59 
61 {
62 private:
65 
66  void DrawArchProjected(float phiStart, float phiEnd, float phiStep, REveVector& v0, REveVector& v1, REveVector& v2);
67  void GetSurfaceSize(REveVector& p1, REveVector& p2);
68 
71 
72  std::vector <REveVector> fArchPnts;
73  float GetEllipseSurface (const REveVector& v1, const REveVector& v2);
74 
75 public:
76  REveEllipsoidProjected(const std::string &n = "REveEllipsoidProjected", const std::string& t = "");
77  virtual ~REveEllipsoidProjected();
78 
79  void BuildRenderData() override;
80 
81  Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
82 
83  virtual void OutlineProjected();
84  virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model) override;
85  void UpdateProjection() override;
86  REveElement *GetProjectedAsElement() override { return this; }
87 };
88 
89 } // namespace Experimental
90 } // namespace ROOT
91 
92 #endif
void DrawArch(float phiStart, float phiEnd, float phiStep, REveVector &v0, REveVector &v1, REveVector &v2)
Draw archade as straight line set.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
Returns the available number of logical cores.
Definition: StringConv.hxx:21
REveEllipsoid(const REveEllipsoid &)=delete
float GetEllipseSurface(const REveVector &v1, const REveVector &v2)
Get surface size of projected ellipse.
void SetPhiStep(float ps)
Set size of phi step in archade drawing.
REveEllipsoidProjected & operator=(const REveEllipsoidProjected &)=delete
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveEllipsoidProjected class.
virtual void OutlineProjected()
Find longest projection of axes and draw an arch.
static constexpr double ps
void DrawArchProjected(float phiStart, float phiEnd, float phiStep, REveVector &v0, REveVector &v1, REveVector &v2)
Draw archade around base vectors.
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
This is virtual method from base-class REveProjected.
int Int_t
Definition: RtypesCore.h:41
REveEllipsoidProjected(const REveEllipsoidProjected &)=delete
virtual void Outline()
Draw archade around base vectors.
REveStraightLineSetProjected Projected copy of a REveStraightLineSet.
REveProjection Base for specific classes that implement non-linear projections.
void SetBaseVectors(REveVector &v0, REveVector &v1, REveVector &v3)
Three defining base vectors of ellipse.
REveProjectionManager Manager class for steering of projections and managing projected objects...
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
REveStraightLineSet Set of straight lines with optional markers along the lines.
REveEllipsoid & operator=(const REveEllipsoid &)=delete
void BuildRenderData() override
Crates 3D point array for rendering.
void GetSurfaceSize(REveVector &p1, REveVector &p2)
const Int_t n
Definition: legend1.C:16
void UpdateProjection() override
Callback that actually performs the projection.