Logo ROOT  
Reference Guide
TEveArrow.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 #include "TEveArrow.h"
13 #include "TEveTrans.h"
14 
15 
16 /** \class TEveArrow
17 \ingroup TEve
18 Class used for display of a thick arrow.
19 */
20 
22 
23 ////////////////////////////////////////////////////////////////////////////////
24 
26  Float_t xOrg, Float_t yOrg, Float_t zOrg):
27  TEveElement(fColor),
28  TNamed("TEveArrow", ""),
29  TAtt3D(), TAttBBox(),
30 
31  fTubeR(0.02), fConeR(0.04), fConeL(0.08),
32  fOrigin(xOrg, yOrg, zOrg), fVector(xVec, yVec, zVec),
33  fDrawQuality(10)
34 {
35  // Constructor.
36  // Org - starting point.
37  // Vec - vector from start to end of the arrow.
38 
41 }
42 
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Compute bounding-box of the arrow.
45 
47 {
48  TEveVector a, b;
51  a *= r; b *= r;
52 
53  TEveVector end(fOrigin + fVector);
54 
55  BBoxInit();
60  BBoxCheckPoint(end + a + b);
61  BBoxCheckPoint(end + a - b);
62  BBoxCheckPoint(end - a - b);
63  BBoxCheckPoint(end - a + b);
64 }
65 
66 ////////////////////////////////////////////////////////////////////////////////
67 /// Paint object.
68 /// This is for direct rendering (using TEveArrowGL class).
69 
71 {
72  PaintStandard(this);
73 }
TEveVectorT::Mag
TT Mag() const
Definition: TEveVector.h:99
TEveElement::PaintStandard
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Definition: TEveElement.cxx:1034
TEveElement
Definition: TEveElement.h:35
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TMath::Max
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
r
ROOT::R::TRInterface & r
Definition: Object.C:4
Float_t
float Float_t
Definition: RtypesCore.h:57
TEveArrow
Definition: TEveArrow.h:21
TEveArrow::fConeR
Float_t fConeR
Definition: TEveArrow.h:43
TEveElement::fCanEditMainTransparency
Bool_t fCanEditMainTransparency
Definition: TEveElement.h:95
TEveElement::fCanEditMainColor
Bool_t fCanEditMainColor
Definition: TEveElement.h:94
TAtt3D
Definition: TAtt3D.h:19
b
#define b(i)
Definition: RSha256.hxx:118
TAttBBox
Definition: TAttBBox.h:17
TEveArrow::fOrigin
TEveVector fOrigin
Definition: TEveArrow.h:46
TAttBBox::BBoxCheckPoint
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition: TAttBBox.h:58
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TEveArrow::Paint
virtual void Paint(Option_t *option="")
Paint object.
Definition: TEveArrow.cxx:70
a
auto * a
Definition: textangle.C:12
TNamed
Definition: TNamed.h:29
TAttBBox::BBoxInit
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition: TAttBBox.cxx:29
TEveVectorT< Float_t >
TEveArrow::fVector
TEveVector fVector
Definition: TEveArrow.h:47
TEveTrans.h
TEveVectorT::OrthoNormBase
void OrthoNormBase(TEveVectorT &a, TEveVectorT &b) const
Set vectors a and b to be normal to this and among themselves, both of length 1.
Definition: TEveVector.cxx:86
TEveArrow::ComputeBBox
virtual void ComputeBBox()
Compute bounding-box of the arrow.
Definition: TEveArrow.cxx:46
TEveArrow::fTubeR
Float_t fTubeR
Definition: TEveArrow.h:42
TEveArrow::TEveArrow
TEveArrow(const TEveArrow &)
TEveArrow.h