Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
21class TEveBox : public TEveShape
22{
23 friend class TEveBoxGL;
24
25private:
26 TEveBox(const TEveBox&); // Not implemented
27 TEveBox& operator=(const TEveBox&); // Not implemented
28
29protected:
31
32public:
33 TEveBox(const char* n="TEveBox", const char* t="");
34 ~TEveBox() override;
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 void ComputeBBox() override;
44
45 // Projectable:
46 TClass* ProjectedClass(const TEveProjection* p) const override;
47
48 ClassDefOverride(TEveBox, 0); // 3D box with arbitrary vertices.
49};
50
51
52//------------------------------------------------------------------------------
53// TEveBoxProjected
54//------------------------------------------------------------------------------
55
57 public TEveProjected
58{
59 friend class TEveBoxProjectedGL;
60
61private:
62 TEveBoxProjected(const TEveBoxProjected&); // Not implemented
63 TEveBoxProjected& operator=(const TEveBoxProjected&); // Not implemented
64
65protected:
69
70 void SetDepthLocal(Float_t d) override;
71
73
74public:
75 TEveBoxProjected(const char* n="TEveBoxProjected", const char* t="");
76 ~TEveBoxProjected() override;
77
78 // For TAttBBox:
79 void ComputeBBox() override;
80
81 // Projected:
82 void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
83 void UpdateProjection() override;
84
85 TEveElement* GetProjectedAsElement() override { return this; }
86
88 static void SetDebugCornerPoints(Bool_t d);
89
90 ClassDefOverride(TEveBoxProjected, 0); // Projection of TEveBox.
91};
92
93#endif
#define d(i)
Definition RSha256.hxx:102
bool Bool_t
Definition RtypesCore.h:63
float Float_t
Definition RtypesCore.h:57
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
winID h TVirtualViewer3D TVirtualGLPainter p
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
OpenGL renderer class for TEveBox.
Definition TEveBoxGL.h:28
OpenGL renderer class for TEveBoxProjected.
Definition TEveBoxGL.h:65
Projection of TEveBox.
Definition TEveBox.h:58
static Bool_t GetDebugCornerPoints()
Get state of fgDebugCornerPoints static.
Definition TEveBox.cxx:215
static void SetDebugCornerPoints(Bool_t d)
Set state of fgDebugCornerPoints static.
Definition TEveBox.cxx:225
void ComputeBBox() override
Compute bounding-box, virtual from TAttBBox.
Definition TEveBox.cxx:128
static Bool_t fgDebugCornerPoints
Definition TEveBox.h:72
Int_t fBreakIdx
Definition TEveBox.h:67
void SetDepthLocal(Float_t d) override
This is virtual method from base-class TEveProjected.
Definition TEveBox.cxx:140
TEveBoxProjected & operator=(const TEveBoxProjected &)
TEveBoxProjected(const TEveBoxProjected &)
void UpdateProjection() override
Re-project the box.
Definition TEveBox.cxx:161
vVector2_t fDebugPoints
Definition TEveBox.h:68
vVector2_t fPoints
Definition TEveBox.h:66
~TEveBoxProjected() override
Destructor.
Definition TEveBox.cxx:121
void SetProjection(TEveProjectionManager *mng, TEveProjectable *model) override
This is virtual method from base-class TEveProjected.
Definition TEveBox.cxx:148
TEveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to TEveElement.
Definition TEveBox.h:85
3D box with arbitrary vertices (cuboid).
Definition TEveBox.h:22
~TEveBox() override
Destructor.
Definition TEveBox.cxx:41
TEveBox(const TEveBox &)
const Float_t * GetVertex(Int_t i) const
Definition TEveBox.h:40
TClass * ProjectedClass(const TEveProjection *p) const override
Virtual from TEveProjectable, return TEveBoxProjected class.
Definition TEveBox.cxx:94
void SetVertices(const Float_t *vs)
Set vertices.
Definition TEveBox.cxx:70
void ComputeBBox() override
Compute bounding-box of the data.
Definition TEveBox.cxx:80
TEveBox & operator=(const TEveBox &)
void SetVertex(Int_t i, Float_t x, Float_t y, Float_t z)
Set vertex 'i'.
Definition TEveBox.cxx:48
Float_t fVertices[8][3]
Definition TEveBox.h:30
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
Abstract base-class for non-linear projectable objects.
Abstract base class for classes that hold results of a non-linear projection transformation.
Manager class for steering of projections and managing projected objects.
Base-class for non-linear projections.
Abstract base-class for 2D/3D shapes.
Definition TEveShape.h:26
std::vector< TEveVector2 > vVector2_t
Definition TEveShape.h:34
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16