Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveGeoPolyShape.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_TEveGeoPolyShape
13#define ROOT_TEveGeoPolyShape
14
15#include "TGeoBBox.h"
16
17#include <vector>
18
19class TBuffer3D;
20class TGLFaceSet;
22
24{
25 friend class TEveGeoPolyShapeGL;
26
27private:
28 TEveGeoPolyShape(const TEveGeoPolyShape&); // Not implemented
29 TEveGeoPolyShape& operator=(const TEveGeoPolyShape&); // Not implemented
30
31protected:
32 std::vector<Double_t> fVertices;
33 std::vector<Int_t> fPolyDesc;
35
36 virtual void FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const;
37
38 struct Edge_t
39 {
42 {
43 if (i <= j) { fI = i; fJ = j; }
44 else { fI = j; fJ = i; }
45 }
46
47 bool operator<(const Edge_t& e) const
48 {
49 if (fI == e.fI)
50 return fJ < e.fJ;
51 else
52 return fI < e.fI;
53 }
54 };
55
56public:
58 virtual ~TEveGeoPolyShape() {}
59
61
62 void SetFromFaceSet(TGLFaceSet* fs);
63
64 virtual const TBuffer3D& GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
65 virtual TBuffer3D* MakeBuffer3D() const;
66
67 ClassDef(TEveGeoPolyShape, 1); // A shape with arbitrary tesselation for visualization of CSG shapes.
68};
69
70#endif
#define e(i)
Definition RSha256.hxx:103
int Int_t
Definition RtypesCore.h:45
bool Bool_t
Definition RtypesCore.h:63
#define ClassDef(name, id)
Definition Rtypes.h:325
Generic 3D primitive description class.
Definition TBuffer3D.h:18
Description of TEveGeoPolyShape.
TEveGeoPolyShape & operator=(const TEveGeoPolyShape &)
static TEveGeoPolyShape * Construct(TGeoCompositeShape *cshp, Int_t n_seg)
Static constructor from a composite shape.
virtual void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const
Fill the passed buffer 3D.
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fill static buffer 3D.
std::vector< Double_t > fVertices
TEveGeoPolyShape(const TEveGeoPolyShape &)
virtual TBuffer3D * MakeBuffer3D() const
Create buffer 3D and fill it with point/segment/poly data.
virtual ~TEveGeoPolyShape()
TEveGeoPolyShape()
Constructor.
friend class TEveGeoPolyShapeGL
void SetFromFaceSet(TGLFaceSet *fs)
Set data-members from a face-set.
std::vector< Int_t > fPolyDesc
Implements a native ROOT-GL representation of an arbitrary set of polygons.
Definition TGLFaceSet.h:23
Box class.
Definition TGeoBBox.h:18
Composite shapes are Boolean combinations of two or more shape components.
bool operator<(const Edge_t &e) const