Logo ROOT  
Reference Guide
TEveGeoShape.h
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#ifndef ROOT_TEveGeoShape
13#define ROOT_TEveGeoShape
14
15#include "TEveShape.h"
16
17class TGeoShape;
18class TGeoHMatrix;
21class TBuffer3D;
22
23class TEveGeoShape : public TEveShape
24{
25private:
26 TEveGeoShape(const TEveGeoShape&); // Not implemented
27 TEveGeoShape& operator=(const TEveGeoShape&); // Not implemented
28
29protected:
32 TGeoCompositeShape *fCompositeShape; //! Temporary holder (if passed shape is composite shape).
33
35
38
40
41public:
42 TEveGeoShape(const char* name="TEveGeoShape", const char* title=0);
43 virtual ~TEveGeoShape();
44
45 virtual TObject* GetObject(const TEveException&) const
46 { const TObject* obj = this; return const_cast<TObject*>(obj); }
47
48 Int_t GetNSegments() const { return fNSegments; }
49 TGeoShape* GetShape() const { return fShape; }
50 void SetNSegments(Int_t s);
51 void SetShape(TGeoShape* s);
52
53 virtual void ComputeBBox();
54 virtual void Paint(Option_t* option="");
55
56 void Save(const char* file, const char* name="Extract");
57 void SaveExtract(const char* file, const char* name);
58 void WriteExtract(const char* name);
59
61
62 // GeoProjectable
63 virtual TBuffer3D* MakeBuffer3D();
64 virtual TClass* ProjectedClass(const TEveProjection* p) const;
65
66 static TGeoManager* GetGeoMangeur();
68
69 ClassDef(TEveGeoShape, 0); // Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TGeoShape's (without an active TGeoManager) and simplified geometries (needed for NLT projections).
70};
71
72//------------------------------------------------------------------------------
73
75 public TEveProjected
76{
77private:
78 TEveGeoShapeProjected(const TEveGeoShapeProjected&); // Not implemented
80
81protected:
83
84 virtual void SetDepthLocal(Float_t d);
85
86public:
88 virtual ~TEveGeoShapeProjected();
89
90 virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable* model);
91 virtual void UpdateProjection();
92 virtual TEveElement* GetProjectedAsElement() { return this; }
93
94 virtual void ComputeBBox();
95
97};
98
99#endif
int Int_t
Definition: CPyCppyy.h:43
#define d(i)
Definition: RSha256.hxx:102
float Float_t
Definition: RtypesCore.h:57
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:325
Generic 3D primitive description class.
Definition: TBuffer3D.h:18
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
A 3D projected TEveGeoShape.
Definition: TEveGeoShape.h:76
TEveGeoShapeProjected()
Constructor.
virtual void ComputeBBox()
Override of virtual method from TAttBBox.
virtual void UpdateProjection()
This is virtual method from base-class TEveProjected.
TEveGeoShapeProjected & operator=(const TEveGeoShapeProjected &)
virtual void SetProjection(TEveProjectionManager *proj, TEveProjectable *model)
This is virtual method from base-class TEveProjected.
virtual void SetDepthLocal(Float_t d)
This should never be called as this class is only used for 3D projections.
virtual ~TEveGeoShapeProjected()
Destructor.
TEveGeoShapeProjected(const TEveGeoShapeProjected &)
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveGeoShape.h:92
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
Definition: TEveGeoShape.h:24
TEveGeoShape(const TEveGeoShape &)
virtual TBuffer3D * MakeBuffer3D()
Create a TBuffer3D suitable for presentation of the shape.
void SetShape(TGeoShape *s)
Set TGeoShape shown by this object.
TEveGeoShapeExtract * DumpShapeTree(TEveGeoShape *geon, TEveGeoShapeExtract *parent=0)
Export this shape and its descendants into a geoshape-extract.
void SetNSegments(Int_t s)
Set number of segments.
void Save(const char *file, const char *name="Extract")
Save the shape tree as TEveGeoShapeExtract.
static TGeoManager * GetGeoMangeur()
Return static geo-manager that is used internally to make shapes lead a happy life.
Int_t fNSegments
Definition: TEveGeoShape.h:30
virtual void ComputeBBox()
Compute bounding-box.
virtual TObject * GetObject(const TEveException &) const
Get a TObject associated with this render-element.
Definition: TEveGeoShape.h:45
virtual void Paint(Option_t *option="")
Paint object.
TGeoShape * GetShape() const
Definition: TEveGeoShape.h:49
TEveGeoShape & operator=(const TEveGeoShape &)
TGeoCompositeShape * fCompositeShape
Definition: TEveGeoShape.h:32
virtual TClass * ProjectedClass(const TEveProjection *p) const
Return class for projected objects:
void SaveExtract(const char *file, const char *name)
Save the shape tree as TEveGeoShapeExtract.
static TGeoHMatrix * GetGeoHMatrixIdentity()
Return static identity matrix in homogeneous representation.
Int_t GetNSegments() const
Definition: TEveGeoShape.h:48
static TEveGeoShape * SubImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent)
Recursive version for importing a shape extract tree.
static TGeoManager * fgGeoMangeur
Temporary holder (if passed shape is composite shape).
Definition: TEveGeoShape.h:34
TGeoShape * fShape
Definition: TEveGeoShape.h:31
TGeoShape * MakePolyShape()
Create derived TEveGeoShape form a TGeoCompositeShape.
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=0)
Import a shape extract 'gse' under element 'parent'.
virtual ~TEveGeoShape()
Destructor.
void WriteExtract(const char *name)
Write the shape tree as TEveGeoShapeExtract to current directory.
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
Class handling Boolean composition of shapes.
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition: TGeoMatrix.h:421
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
Base abstract class for all shapes.
Definition: TGeoShape.h:26
Mother of all ROOT objects.
Definition: TObject.h:37
static const std::string name("name")
static constexpr double s
Definition: file.py:1