Logo ROOT  
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
20namespace ROOT {
21namespace Experimental {
22
23//------------------------------------------------------------------------------
24// REveEllipsoid
25//------------------------------------------------------------------------------
26
28{
30
31private:
32 REveEllipsoid(const REveEllipsoid &); // Not implemented
33 REveEllipsoid &operator=(const REveEllipsoid &); // Not implemented
34
35protected:
39
40 float fPhiStep;
41 void DrawArch(float phiStart, float phiEnd, float phiStep, REveVector& v0, REveVector& v1, REveVector& v2);
42
43public:
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{
62private:
65
66 void DrawArchProjected(float phiStart, float phiEnd, float phiStep, REveVector& v0, REveVector& v1, REveVector& v2);
68
71
72 std::vector <REveVector> fArchPnts;
73 float GetEllipseSurface (const REveVector& v1, const REveVector& v2);
74
75public:
76 REveEllipsoidProjected(const std::string &n = "REveEllipsoidProjected", const std::string& t = "");
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
int Int_t
Definition: RtypesCore.h:41
REveEllipsoidProjected(const REveEllipsoidProjected &)
virtual void OutlineProjected()
Find longest projection of axes and draw an arch.
void GetSurfaceSize(REveVector &p1, REveVector &p2)
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
This is virtual method from base-class REveProjected.
float GetEllipseSurface(const REveVector &v1, const REveVector &v2)
Get surface size of projected ellipse.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
void DrawArchProjected(float phiStart, float phiEnd, float phiStep, REveVector &v0, REveVector &v1, REveVector &v2)
Draw archade around base vectors.
REveEllipsoidProjected & operator=(const REveEllipsoidProjected &)
void BuildRenderData() override
Crates 3D point array for rendering.
void UpdateProjection() override
Callback that actually performs the projection.
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
void SetBaseVectors(REveVector &v0, REveVector &v1, REveVector &v3)
Three defining base vectors of ellipse.
REveEllipsoid & operator=(const REveEllipsoid &)
REveEllipsoid(const REveEllipsoid &)
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
void DrawArch(float phiStart, float phiEnd, float phiStep, REveVector &v0, REveVector &v1, REveVector &v2)
Draw archade as straight line set.
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveEllipsoidProjected class.
virtual void Outline()
Draw archade around base vectors.
void SetPhiStep(float ps)
Set size of phi step in archade drawing.
REveProjectionManager Manager class for steering of projections and managing projected objects.
REveProjection Base for specific classes that implement non-linear projections.
REveStraightLineSetProjected Projected copy of a REveStraightLineSet.
REveStraightLineSet Set of straight lines with optional markers along the lines.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
const Int_t n
Definition: legend1.C:16
VSD Structures.
Definition: StringConv.hxx:21
static constexpr double ps