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 52 of file TEveEllipsoid.h.

Constructor & Destructor Documentation

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

Definition at line 49 of file TEveEllipsoid.cc.

49  :
50  TEveShape(n, t)
51 {
52  // Constructor.
53 }
TEveEllipsoidProjected::~TEveEllipsoidProjected ( )
override

Definition at line 56 of file TEveEllipsoid.cc.

57 {
58  // Destructor.
59 }

Member Function Documentation

TEveEllipsoidProjected::ClassDefOverride ( TEveEllipsoidProjected  ,
 
)
void TEveEllipsoidProjected::ComputeBBox ( )
override

Definition at line 62 of file TEveEllipsoid.cc.

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

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

Definition at line 74 of file TEveEllipsoid.h.

References TEveEllipsoid::ClassDefOverride().

74 { return this; }
TEveEllipsoidProjected& TEveEllipsoidProjected::operator= ( const TEveEllipsoidProjected )
private
void TEveEllipsoidProjected::SetDepthLocal ( Float_t  d)
overrideprotected

Definition at line 96 of file TEveEllipsoid.cc.

97 {
98  // This is virtual method from base-class TEveProjected.
99 
100  SetDepthCommon(d, this, fBBox);
101 }
void TEveEllipsoidProjected::SetProjection ( TEveProjectionManager *  mng,
TEveProjectable *  model 
)
override

Definition at line 104 of file TEveEllipsoid.cc.

105 {
106  // This is virtual method from base-class TEveProjected.
107 
108  TEveProjected::SetProjection(mng, model);
109  CopyVizParams(dynamic_cast<TEveElement*>(model));
110 }
void TEveEllipsoidProjected::UpdateProjection ( )
override

Definition at line 113 of file TEveEllipsoid.cc.

114 {
115  // Override from abstract function.
116 }

Friends And Related Function Documentation

friend class TEveEllipsoidProjectedGL
friend

Definition at line 55 of file TEveEllipsoid.h.