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 void FillBuffer3D(TBuffer3D& buffer, Int_t reqSections, Bool_t localFrame) const override;
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 ~TEveGeoPolyShape() override {}
59
61
63
64 const TBuffer3D& GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override;
65 TBuffer3D* MakeBuffer3D() const override;
66
67 ClassDefOverride(TEveGeoPolyShape, 1); // A shape with arbitrary tesselation for visualization of CSG shapes.
68};
69
70#endif
#define e(i)
Definition RSha256.hxx:103
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
Generic 3D primitive description class.
Definition TBuffer3D.h:18
Description of TEveGeoPolyShape.
void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const override
Fill the passed buffer 3D.
~TEveGeoPolyShape() override
TEveGeoPolyShape & operator=(const TEveGeoPolyShape &)
ClassDefOverride(TEveGeoPolyShape, 1)
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Fill static buffer 3D.
static TEveGeoPolyShape * Construct(TGeoCompositeShape *cshp, Int_t n_seg)
Static constructor from a composite shape.
TBuffer3D * MakeBuffer3D() const override
Create buffer 3D and fill it with point/segment/poly data.
std::vector< Double_t > fVertices
TEveGeoPolyShape(const 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
Composite shapes are Boolean combinations of two or more shape components.
bool operator<(const Edge_t &e) const