CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Friends
TEveEllipsoidProjected Class Reference

#include <TEveEllipsoid.h>

Inheritance diagram for TEveEllipsoidProjected:

Public Member Functions

 ClassDefOverride (TEveEllipsoidProjected, 0)
 
void ComputeBBox () override
 
TEveElement * GetProjectedAsElement () override
 
void SetProjection (TEveProjectionManager *mng, TEveProjectable *model) override
 
 TEveEllipsoidProjected (const char *n="TEveEllipsoidProjected", const char *t="")
 
void UpdateProjection () override
 
 ~TEveEllipsoidProjected () override
 

Protected Member Functions

void SetDepthLocal (Float_t d) override
 

Private Member Functions

TEveEllipsoidProjectedoperator= (const TEveEllipsoidProjected &)
 
 TEveEllipsoidProjected (const TEveEllipsoidProjected &)
 

Friends

class TEveEllipsoidProjectedGL
 

Detailed Description

Definition at line 49 of file TEveEllipsoid.h.

Constructor & Destructor Documentation

◆ TEveEllipsoidProjected() [1/2]

TEveEllipsoidProjected::TEveEllipsoidProjected ( const TEveEllipsoidProjected )
private

◆ TEveEllipsoidProjected() [2/2]

TEveEllipsoidProjected::TEveEllipsoidProjected ( const char *  n = "TEveEllipsoidProjected",
const char *  t = "" 
)

Definition at line 45 of file TEveEllipsoid.cc.

45  : TEveShape(n, t) {
46  // Constructor.
47 }

◆ ~TEveEllipsoidProjected()

TEveEllipsoidProjected::~TEveEllipsoidProjected ( )
override

Definition at line 50 of file TEveEllipsoid.cc.

50  {
51  // Destructor.
52 }

Member Function Documentation

◆ ClassDefOverride()

TEveEllipsoidProjected::ClassDefOverride ( TEveEllipsoidProjected  ,
 
)

◆ ComputeBBox()

void TEveEllipsoidProjected::ComputeBBox ( )
override

Definition at line 55 of file TEveEllipsoid.cc.

References a, b, METSkim_cff::Max, AlCaHLTBitMon_ParallelJobs::p, amptDefault_cfi::proj, TEveEllipsoid::RefExtent3D(), TEveEllipsoid::RefPos(), and findQualityFiles::v.

55  {
56  // Compute bounding-box, virtual from TAttBBox.
57 
58  BBoxInit();
59 
60  TEveEllipsoid* e3d = dynamic_cast<TEveEllipsoid*>(fProjectable);
61 
62  //printf("project bbox %p\n", (void*)e3d->GetBBox());
63  if (e3d) {
64  TEveProjection* proj = GetManager()->GetProjection();
65  Float_t a = TMath::Max(TMath::Max(TMath::Abs(e3d->RefExtent3D()[0]), TMath::Abs(e3d->RefExtent3D()[1])),
66  TMath::Abs(e3d->RefExtent3D()[2]));
67  float* p = e3d->RefPos().Arr();
68  float b[] = {-a + p[0], a + p[0], -a + p[1], a + p[1], -a + p[2], a + p[2]};
69  TEveVector v;
70  v.Set(b[0], b[2], b[4]);
71  proj->ProjectVector(v, fDepth);
72  BBoxCheckPoint(v);
73  v.Set(b[1], b[2], b[4]);
74  proj->ProjectVector(v, fDepth);
75  BBoxCheckPoint(v);
76  v.Set(b[0], b[3], b[4]);
77  proj->ProjectVector(v, fDepth);
78  BBoxCheckPoint(v);
79  v.Set(b[1], b[3], b[4]);
80  proj->ProjectVector(v, fDepth);
81  BBoxCheckPoint(v);
82  v.Set(b[0], b[2], b[5]);
83  proj->ProjectVector(v, fDepth);
84  BBoxCheckPoint(v);
85  v.Set(b[1], b[2], b[5]);
86  proj->ProjectVector(v, fDepth);
87  BBoxCheckPoint(v);
88  v.Set(b[0], b[3], b[5]);
89  proj->ProjectVector(v, fDepth);
90  BBoxCheckPoint(v);
91  v.Set(b[1], b[3], b[5]);
92  proj->ProjectVector(v, fDepth);
93  BBoxCheckPoint(v);
94 
95  // for Z dimesion
96  fBBox[4] -= a;
97  fBBox[5] += a;
98  }
99  // printf("(%f, %f) (%f, %f) (%f, %f)\n",fBBox[0],fBBox[1],fBBox[2],fBBox[3],fBBox[4],fBBox[5] );
100 }
TEveVector & RefPos()
Definition: TEveEllipsoid.h:36
TEveVector & RefExtent3D()
Definition: TEveEllipsoid.h:37
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ GetProjectedAsElement()

TEveElement* TEveEllipsoidProjected::GetProjectedAsElement ( )
inlineoverride

Definition at line 70 of file TEveEllipsoid.h.

70 { return this; }

◆ operator=()

TEveEllipsoidProjected& TEveEllipsoidProjected::operator= ( const TEveEllipsoidProjected )
private

◆ SetDepthLocal()

void TEveEllipsoidProjected::SetDepthLocal ( Float_t  d)
overrideprotected

Definition at line 103 of file TEveEllipsoid.cc.

References ztail::d.

103  {
104  // This is virtual method from base-class TEveProjected.
105 
106  SetDepthCommon(d, this, fBBox);
107 }
d
Definition: ztail.py:151

◆ SetProjection()

void TEveEllipsoidProjected::SetProjection ( TEveProjectionManager *  mng,
TEveProjectable *  model 
)
override

Definition at line 110 of file TEveEllipsoid.cc.

References isotrackApplyRegressor::model.

110  {
111  // This is virtual method from base-class TEveProjected.
112 
113  TEveProjected::SetProjection(mng, model);
114  CopyVizParams(dynamic_cast<TEveElement*>(model));
115 }

◆ UpdateProjection()

void TEveEllipsoidProjected::UpdateProjection ( )
override

Definition at line 118 of file TEveEllipsoid.cc.

118  {
119  // Override from abstract function.
120 }

Friends And Related Function Documentation

◆ TEveEllipsoidProjectedGL

friend class TEveEllipsoidProjectedGL
friend

Definition at line 50 of file TEveEllipsoid.h.