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
18Class 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
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}
ROOT::R::TRInterface & r
Definition: Object.C:4
#define b(i)
Definition: RSha256.hxx:100
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define ClassImp(name)
Definition: Rtypes.h:364
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
Helper for management of bounding-box information.
Definition: TAttBBox.h:18
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition: TAttBBox.h:58
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition: TAttBBox.cxx:29
Class used for display of a thick arrow.
Definition: TEveArrow.h:25
Float_t fConeR
Definition: TEveArrow.h:37
TEveVector fOrigin
Definition: TEveArrow.h:40
TEveArrow(const TEveArrow &)
virtual void ComputeBBox()
Compute bounding-box of the arrow.
Definition: TEveArrow.cxx:46
Float_t fTubeR
Definition: TEveArrow.h:36
TEveVector fVector
Definition: TEveArrow.h:41
virtual void Paint(Option_t *option="")
Paint object.
Definition: TEveArrow.cxx:70
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
Bool_t fCanEditMainTransparency
Definition: TEveElement.h:95
Bool_t fCanEditMainColor
Definition: TEveElement.h:94
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
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
TT Mag() const
Definition: TEveVector.h:99
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:208
auto * a
Definition: textangle.C:12