Logo ROOT   6.16/01
Reference Guide
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 "Rtypes.h"
16#include "TGeoBBox.h"
17
18#include <vector>
19
20class TBuffer3D;
21class TGLFaceSet;
23
25{
26 friend class TEveGeoPolyShapeGL;
27
28private:
29 TEveGeoPolyShape(const TEveGeoPolyShape&); // Not implemented
30 TEveGeoPolyShape& operator=(const TEveGeoPolyShape&); // Not implemented
31
32protected:
33 std::vector<Double_t> fVertices;
34 std::vector<Int_t> fPolyDesc;
36
37 virtual void FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const;
38
39 struct Edge_t
40 {
43 {
44 if (i <= j) { fI = i; fJ = j; }
45 else { fI = j; fJ = i; }
46 }
47
48 bool operator<(const Edge_t& e) const
49 {
50 if (fI == e.fI)
51 return fJ < e.fJ;
52 else
53 return fI < e.fI;
54 }
55 };
56
57public:
59 virtual ~TEveGeoPolyShape() {}
60
62
63 void SetFromFaceSet(TGLFaceSet* fs);
64
65 virtual const TBuffer3D& GetBuffer3D(Int_t reqSections, Bool_t localFrame) const;
66 virtual TBuffer3D* MakeBuffer3D() const;
67
68 ClassDef(TEveGeoPolyShape, 1); // A shape with arbitrary tesselation for visualization of CSG shapes.
69};
70
71#endif
#define e(i)
Definition: RSha256.hxx:103
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:324
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:22
Box class.
Definition: TGeoBBox.h:18
Class handling Boolean composition of shapes.
bool operator<(const Edge_t &e) const
Edge_t(Int_t i, Int_t j)