/usr/include/root/TEvePolygonSetProjected.h is in libroot-graf3d-eve-dev 5.34.19+dfsg-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | // @(#)root/eve:$Id$
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TEvePolygonSetProjected
#define ROOT_TEvePolygonSetProjected
#include "TEveVector.h"
#include "TEveShape.h"
class TBuffer3D;
class TEvePolygonSetProjected : public TEveShape,
public TEveProjected
{
friend class TEvePolygonSetProjectedGL;
friend class TEvePolygonSetProjectedEditor;
private:
TEvePolygonSetProjected(const TEvePolygonSetProjected&); // Not implemented
TEvePolygonSetProjected& operator=(const TEvePolygonSetProjected&); // Not implemented
protected:
struct Polygon_t
{
Int_t fNPnts; // number of points
Int_t* fPnts; // point indices
Polygon_t() : fNPnts(0), fPnts(0) {}
virtual ~Polygon_t() { delete [] fPnts; fNPnts=0; fPnts=0; }
Polygon_t& operator=(const Polygon_t& x)
{ fNPnts = x.fNPnts; fPnts = x.fPnts; return *this; }
Int_t FindPoint(Int_t pi)
{
for (Int_t i=0; i<fNPnts; ++i) {
if (fPnts[i] == pi) return i;
}
return -1;
}
};
typedef std::list<Polygon_t> vpPolygon_t;
typedef vpPolygon_t::iterator vpPolygon_i;
typedef vpPolygon_t::const_iterator vpPolygon_ci;
private:
TBuffer3D* fBuff; // buffer of projectable object
Bool_t IsFirstIdxHead(Int_t s0, Int_t s1);
Float_t AddPolygon(std::list<Int_t, std::allocator<Int_t> >& pp, std::list<Polygon_t, std::allocator<Polygon_t> >& p);
Int_t* ProjectAndReducePoints();
Float_t MakePolygonsFromBP(Int_t* idxMap);
Float_t MakePolygonsFromBS(Int_t* idxMap);
protected:
vpPolygon_t fPols; // polygons
vpPolygon_t fPolsBS; // polygons build from TBuffer3D segments
vpPolygon_t fPolsBP; // polygons build from TBuffer3D polygons
Int_t fNPnts; // number of reduced and projected points
TEveVector* fPnts; // reduced and projected points
virtual void SetDepthLocal(Float_t d);
Float_t PolygonSurfaceXY(const Polygon_t& poly) const;
public:
TEvePolygonSetProjected(const char* n="TEvePolygonSetProjected", const char* t="");
virtual ~TEvePolygonSetProjected();
virtual void ComputeBBox();
virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
virtual void UpdateProjection();
virtual TEveElement* GetProjectedAsElement() { return this; }
void ProjectBuffer3D();
virtual void DumpPolys() const;
void DumpBuffer3D();
ClassDef(TEvePolygonSetProjected,0); // Set of projected polygons with outline; typically produced from a TBuffer3D.
};
#endif
|