Logo ROOT   6.14/05
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;
49  fVector.OrthoNormBase(a, b);
51  a *= r; b *= r;
52 
53  TEveVector end(fOrigin + fVector);
54 
55  BBoxInit();
56  BBoxCheckPoint(fOrigin + a + b);
57  BBoxCheckPoint(fOrigin + a - b);
58  BBoxCheckPoint(fOrigin - a - b);
59  BBoxCheckPoint(fOrigin - a + b);
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 }
TEveArrow(const TEveArrow &)
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
Bool_t fCanEditMainColor
Definition: TEveElement.h:92
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
Class used for display of a thick arrow.
Definition: TEveArrow.h:21
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
virtual void ComputeBBox()
Compute bounding-box of the arrow.
Definition: TEveArrow.cxx:46
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition: TAttBBox.h:58
Bool_t fCanEditMainTransparency
Definition: TEveElement.h:93
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void Paint(Option_t *option="")
Paint object.
Definition: TEveArrow.cxx:70
ROOT::R::TRInterface & r
Definition: Object.C:4
auto * a
Definition: textangle.C:12
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
#define ClassImp(name)
Definition: Rtypes.h:359
TEveVector fVector
Definition: TEveArrow.h:41
Float_t fTubeR
Definition: TEveArrow.h:36
TEveVector fOrigin
Definition: TEveArrow.h:40
Float_t fConeR
Definition: TEveArrow.h:37
Helper for management of bounding-box information.
Definition: TAttBBox.h:17
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:200
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
TT Mag() const
Definition: TEveVector.h:95
const Bool_t kTRUE
Definition: RtypesCore.h:87
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition: TAttBBox.cxx:29