CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Member Functions
TEveEllipsoidGL Class Reference

#include <TEveEllipsoidGL.h>

Inheritance diagram for TEveEllipsoidGL:
TEveEllipsoidProjectedGL

Public Member Functions

 ClassDefOverride (TEveEllipsoidGL, 0)
 
void DirectDraw (TGLRnrCtx &rnrCtx) const override
 
Bool_t IgnoreSizeForOfInterest () const override
 
void SetBBox () override
 
Bool_t SetModel (TObject *obj, const Option_t *opt=nullptr) override
 
 TEveEllipsoidGL ()
 
 ~TEveEllipsoidGL () override
 

Protected Attributes

TEveEllipsoidfE
 

Private Member Functions

TEveEllipsoidGLoperator= (const TEveEllipsoidGL &)
 
 TEveEllipsoidGL (const TEveEllipsoidGL &)
 

Detailed Description

Definition at line 17 of file TEveEllipsoidGL.h.

Constructor & Destructor Documentation

TEveEllipsoidGL::TEveEllipsoidGL ( const TEveEllipsoidGL )
private
TEveEllipsoidGL::TEveEllipsoidGL ( )

Definition at line 30 of file TEveEllipsoidGL.cc.

30  :
31  TGLObject(), fE(nullptr)
32 {
33  // Constructor.
34 
35  // fDLCache = kFALSE; // Disable display list.
36 }
TEveEllipsoid * fE
TEveEllipsoidGL::~TEveEllipsoidGL ( )
inlineoverride

Definition at line 29 of file TEveEllipsoidGL.h.

References DirectDraw(), haddnano::obj, SetBBox(), and SetModel().

29 {}

Member Function Documentation

TEveEllipsoidGL::ClassDefOverride ( TEveEllipsoidGL  ,
 
)
void TEveEllipsoidGL::DirectDraw ( TGLRnrCtx &  rnrCtx) const
override

Definition at line 60 of file TEveEllipsoidGL.cc.

References a, EnergyCorrector::c, fE, mps_fire::i, TEveEllipsoid::RefEMtx(), TEveEllipsoid::RefExtent3D(), TEveEllipsoid::RefPos(), and x.

Referenced by ~TEveEllipsoidGL(), and TEveEllipsoidProjectedGL::~TEveEllipsoidProjectedGL().

61 {
62  // Render with OpenGL.
63 
64  // printf("TEveEllipsoidGL::DirectDraw LOD %s\n", fE->GetName());
65 
66  glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT | GL_LIGHTING_BIT);
67  glEnable(GL_NORMALIZE );
68  if(!quad)
69  quad = gluNewQuadric();
70 
71  glPushMatrix();
72 
73  TMatrixDSym xxx(3);
74  for(int i=0;i<3;i++)
75  for(int j=0;j<3;j++)
76  {
77  xxx(i,j) = fE->RefEMtx()(i+1,j+1);
78  }
79  TMatrixDEigen eig(xxx);
80 
81 
82  // rewrite for multmatrix ....
83  TEveTrans x;
84  for(int i=0;i<3;i++)
85  for(int j=0;j<3;j++)
86  {
87  x(i+1, j+1) = eig.GetEigenVectors()(i,j);
88  }
89 
90  TVector3 a = x.GetBaseVec(1);
91  TVector3 c = a.Cross(x.GetBaseVec(2));
92  x.SetBaseVec(3, c);
93 
94  glTranslatef(fE->RefPos()[0], fE->RefPos()[1], fE->RefPos()[2]);
95  glMultMatrixd(x.Array());
96  glScalef(fE->RefExtent3D()[0] , fE->RefExtent3D()[1], fE->RefExtent3D()[2]);
97  gluSphere(quad,1. , 30, 30);
98 
99  glPopMatrix();
100  glPopAttrib();
101 
102 
103  // gluDeleteQuadric(quad);
104 }
TEveVector & RefPos()
Definition: TEveEllipsoid.h:38
TEveEllipsoid * fE
TEveTrans & RefEMtx()
Definition: TEveEllipsoid.h:40
TEveVector & RefExtent3D()
Definition: TEveEllipsoid.h:39
double a
Definition: hdecay.h:121
Bool_t TEveEllipsoidGL::IgnoreSizeForOfInterest ( ) const
inlineoverride

Definition at line 35 of file TEveEllipsoidGL.h.

References ClassDefOverride().

35 { return kTRUE; }
TEveEllipsoidGL& TEveEllipsoidGL::operator= ( const TEveEllipsoidGL )
private
void TEveEllipsoidGL::SetBBox ( )
override

Definition at line 48 of file TEveEllipsoidGL.cc.

Referenced by ~TEveEllipsoidGL(), and TEveEllipsoidProjectedGL::~TEveEllipsoidProjectedGL().

49 {
50  // Set bounding box.
51  ( (TEveEllipsoid*)fExternalObj)->ComputeBBox();
52  SetAxisAlignedBBox(((TEveEllipsoid*)fExternalObj)->AssertBBox());
53 }
Bool_t TEveEllipsoidGL::SetModel ( TObject *  obj,
const Option_t *  opt = nullptr 
)
override

Definition at line 39 of file TEveEllipsoidGL.cc.

References fE, and haddnano::obj.

Referenced by ~TEveEllipsoidGL(), and TEveEllipsoidProjectedGL::~TEveEllipsoidProjectedGL().

40 {
41  // Set model object.
42 
43  fE = SetModelDynCast<TEveEllipsoid>(obj);
44  return kTRUE;
45 }
TEveEllipsoid * fE

Member Data Documentation

TEveEllipsoid* TEveEllipsoidGL::fE
protected