ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TEveBox.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel, 2010
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 #ifndef ROOT_TEveBox
13 #define ROOT_TEveBox
14 
15 #include "TEveShape.h"
16 
17 //------------------------------------------------------------------------------
18 // TEveBox
19 //------------------------------------------------------------------------------
20 
21 class TEveBox : public TEveShape
22 {
23  friend class TEveBoxGL;
24 
25 private:
26  TEveBox(const TEveBox&); // Not implemented
27  TEveBox& operator=(const TEveBox&); // Not implemented
28 
29 protected:
31 
32 public:
33  TEveBox(const char* n="TEveBox", const char* t="");
34  virtual ~TEveBox();
35 
37  void SetVertex(Int_t i, const Float_t* v);
38  void SetVertices(const Float_t* vs);
39 
40  const Float_t* GetVertex(Int_t i) const { return fVertices[i]; }
41 
42  // For TAttBBox:
43  virtual void ComputeBBox();
44 
45  // Projectable:
46  virtual TClass* ProjectedClass(const TEveProjection* p) const;
47 
48  ClassDef(TEveBox, 0); // 3D box with arbitrary vertices.
49 };
50 
51 
52 //------------------------------------------------------------------------------
53 // TEveBoxProjected
54 //------------------------------------------------------------------------------
55 
56 class TEveBoxProjected : public TEveShape,
57  public TEveProjected
58 {
59  friend class TEveBoxProjectedGL;
60 
61 private:
62  TEveBoxProjected(const TEveBoxProjected&); // Not implemented
63  TEveBoxProjected& operator=(const TEveBoxProjected&); // Not implemented
64 
65 protected:
69 
70  virtual void SetDepthLocal(Float_t d);
71 
73 
74 public:
75  TEveBoxProjected(const char* n="TEveBoxProjected", const char* t="");
76  virtual ~TEveBoxProjected();
77 
78  // For TAttBBox:
79  virtual void ComputeBBox();
80 
81  // Projected:
82  virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
83  virtual void UpdateProjection();
84 
85  virtual TEveElement* GetProjectedAsElement() { return this; }
86 
88  static void SetDebugCornerPoints(Bool_t d);
89 
90  ClassDef(TEveBoxProjected, 0); // Projection of TEveBox.
91 };
92 
93 #endif
static Bool_t fgDebugCornerPoints
Definition: TEveBox.h:72
virtual void ComputeBBox()
Compute bounding-box, virtual from TAttBBox.
Definition: TEveBox.cxx:128
Abstract base class for classes that hold results of a non-linear projection transformation.
Abstract base-class for 2D/3D shapes.
Definition: TEveShape.h:22
void SetVertex(Int_t i, Float_t x, Float_t y, Float_t z)
Set vertex 'i'.
Definition: TEveBox.cxx:48
virtual ~TEveBoxProjected()
Destructor.
Definition: TEveBox.cxx:121
vVector2_t fPoints
Definition: TEveBox.h:66
std::vector< TEveVector2 > vVector2_t
Definition: TEveShape.h:33
float Float_t
Definition: RtypesCore.h:53
virtual ~TEveBox()
Destructor.
Definition: TEveBox.cxx:41
ClassDef(TEveBoxProjected, 0)
3D box with arbitrary vertices (cuboid).
Definition: TEveBox.h:21
Float_t fVertices[8][3]
Definition: TEveBox.h:30
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void SetDepthLocal(Float_t d)
This is virtual method from base-class TEveProjected.
Definition: TEveBox.cxx:140
Projection of TEveBox.
Definition: TEveBox.h:56
OpenGL renderer class for TEveBoxProjected.
Definition: TEveBoxGL.h:64
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
This is virtual method from base-class TEveProjected.
Definition: TEveBox.cxx:148
Double_t x[n]
Definition: legend1.C:17
int d
Definition: tornado.py:11
Base-class for non-linear projections.
Float_t z[5]
Definition: Ifit.C:16
TEveBox(const TEveBox &)
Manager class for steering of projections and managing projected objects.
OpenGL renderer class for TEveBox.
Definition: TEveBoxGL.h:27
vVector2_t fDebugPoints
Definition: TEveBox.h:68
Abstract base-class for non-linear projectable objects.
ClassDef(TEveBox, 0)
TThread * t[5]
Definition: threadsh1.C:13
SVector< double, 2 > v
Definition: Dict.h:5
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveBox.h:85
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
const Float_t * GetVertex(Int_t i) const
Definition: TEveBox.h:40
TEveBox & operator=(const TEveBox &)
static Bool_t GetDebugCornerPoints()
Get state of fgDebugCornerPoints static.
Definition: TEveBox.cxx:215
void SetVertices(const Float_t *vs)
Set vertices.
Definition: TEveBox.cxx:70
Double_t y[n]
Definition: legend1.C:17
TEveBoxProjected & operator=(const TEveBoxProjected &)
Int_t fBreakIdx
Definition: TEveBox.h:67
static void SetDebugCornerPoints(Bool_t d)
Set state of fgDebugCornerPoints static.
Definition: TEveBox.cxx:225
virtual void ComputeBBox()
Compute bounding-box of the data.
Definition: TEveBox.cxx:80
virtual void UpdateProjection()
Re-project the box.
Definition: TEveBox.cxx:161
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
const Int_t n
Definition: legend1.C:16
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, return TEveBoxProjected class.
Definition: TEveBox.cxx:94
TEveBoxProjected(const TEveBoxProjected &)