Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
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
18Class used for display of a thick arrow.
19*/
20
21
22////////////////////////////////////////////////////////////////////////////////
23
25 Float_t xOrg, Float_t yOrg, Float_t zOrg):
27 TNamed("TEveArrow", ""),
28 TAtt3D(), TAttBBox(),
29
30 fTubeR(0.02), fConeR(0.04), fConeL(0.08),
31 fOrigin(xOrg, yOrg, zOrg), fVector(xVec, yVec, zVec),
32 fDrawQuality(10)
33{
34 // Constructor.
35 // Org - starting point.
36 // Vec - vector from start to end of the arrow.
37
40}
41
42////////////////////////////////////////////////////////////////////////////////
43/// Compute bounding-box of the arrow.
44
46{
47 TEveVector a, b;
48 fVector.OrthoNormBase(a, b);
50 a *= r; b *= r;
51
53
54 BBoxInit();
59 BBoxCheckPoint(end + a + b);
60 BBoxCheckPoint(end + a - b);
61 BBoxCheckPoint(end - a - b);
62 BBoxCheckPoint(end - a + b);
63}
64
65////////////////////////////////////////////////////////////////////////////////
66/// Paint object.
67/// This is for direct rendering (using TEveArrowGL class).
68
70{
71 PaintStandard(this);
72}
ROOT::R::TRInterface & r
Definition Object.C:4
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
TEveVectorT< Float_t > TEveVector
Definition TEveVector.h:123
TAtt3D()
Definition TAtt3D.h:22
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition TAttBBox.h:69
void BBoxInit(Float_t infinity=1e6)
Allocate and prepare for incremental filling.
Definition TAttBBox.cxx:28
TAttBBox(const TAttBBox &tab)
Definition TAttBBox.h:31
Float_t fConeR
Definition TEveArrow.h:37
TEveVector fOrigin
Definition TEveArrow.h:40
Color_t fColor
Definition TEveArrow.h:34
void ComputeBBox() override
Compute bounding-box of the arrow.
Definition TEveArrow.cxx:45
TEveArrow(const TEveArrow &)
Float_t fTubeR
Definition TEveArrow.h:36
void Paint(Option_t *option="") override
Paint object.
Definition TEveArrow.cxx:69
TEveVector fVector
Definition TEveArrow.h:41
Float_t fConeL
Definition TEveArrow.h:38
Int_t fDrawQuality
Definition TEveArrow.h:43
Bool_t fCanEditMainTransparency
Definition TEveElement.h:95
TEveElement()
Default constructor.
Bool_t fCanEditMainColor
Definition TEveElement.h:94
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
TNamed()
Definition TNamed.h:38
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:249