#ifndef ROOT_TEveStraightLineSet
#define ROOT_TEveStraightLineSet
#include "TEveUtil.h"
#include <Gtypes.h>
#include "TNamed.h"
#include "TQObject.h"
#include "TAtt3D.h"
#include "TAttMarker.h"
#include "TAttLine.h"
#include "TAttBBox.h"
#include "TEveUtil.h"
#include "TEveElement.h"
#include "TEveProjectionBases.h"
#include "TEveChunkManager.h"
#include "TEveTrans.h"
class TRandom;
class TEveStraightLineSet : public TEveElement,
public TEveProjectable,
public TNamed,
public TQObject,
public TAtt3D,
public TAttLine,
public TAttMarker,
public TAttBBox
{
private:
TEveStraightLineSet(const TEveStraightLineSet&);
TEveStraightLineSet& operator=(const TEveStraightLineSet&);
public:
struct Line_t
{
Int_t fId;
Float_t fV1[3];
Float_t fV2[3];
TRef fRef;
Line_t(Float_t x1, Float_t y1, Float_t z1,
Float_t x2, Float_t y2, Float_t z2) : fId(-1), fRef()
{
fV1[0] = x1, fV1[1] = y1, fV1[2] = z1;
fV2[0] = x2, fV2[1] = y2, fV2[2] = z2;
}
};
struct Marker_t
{
Float_t fV[3];
Int_t fLineId;
TRef fRef;
Marker_t(Float_t x, Float_t y, Float_t z, Int_t line_id) : fLineId(line_id), fRef()
{
fV[0] = x, fV[1] = y, fV[2] = z;
}
};
protected:
TEveChunkManager fLinePlex;
TEveChunkManager fMarkerPlex;
Bool_t fOwnLinesIds;
Bool_t fOwnMarkersIds;
Bool_t fRnrMarkers;
Bool_t fRnrLines;
Bool_t fDepthTest;
Line_t* fLastLine;
public:
TEveStraightLineSet(const char* n="StraightLineSet", const char* t="");
virtual ~TEveStraightLineSet() {}
virtual void SetLineColor(Color_t col) { SetMainColor(col); }
Line_t* AddLine(Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2);
Line_t* AddLine(const TEveVector& p1, const TEveVector& p2);
Marker_t* AddMarker(Float_t x, Float_t y, Float_t z, Int_t line_id=-1);
Marker_t* AddMarker(const TEveVector& p, Int_t line_id=-1);
Marker_t* AddMarker(Int_t line_id, Float_t pos);
void SetLine(int idx, Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2);
void SetLine(int idx, const TEveVector& p1, const TEveVector& p2);
TEveChunkManager& GetLinePlex() { return fLinePlex; }
TEveChunkManager& GetMarkerPlex() { return fMarkerPlex; }
virtual Bool_t GetRnrMarkers() { return fRnrMarkers; }
virtual Bool_t GetRnrLines() { return fRnrLines; }
virtual Bool_t GetDepthTest() { return fDepthTest; }
virtual void SetRnrMarkers(Bool_t x) { fRnrMarkers = x; }
virtual void SetRnrLines(Bool_t x) { fRnrLines = x; }
virtual void SetDepthTest(Bool_t x) { fDepthTest = x; }
virtual void CopyVizParams(const TEveElement* el);
virtual void WriteVizParams(ostream& out, const TString& var);
virtual TClass* ProjectedClass(const TEveProjection* p) const;
virtual void ComputeBBox();
virtual void Paint(Option_t* option="");
ClassDef(TEveStraightLineSet, 1);
};
class TEveStraightLineSetProjected : public TEveStraightLineSet,
public TEveProjected
{
private:
TEveStraightLineSetProjected(const TEveStraightLineSetProjected&);
TEveStraightLineSetProjected& operator=(const TEveStraightLineSetProjected&);
protected:
virtual void SetDepthLocal(Float_t d);
public:
TEveStraightLineSetProjected();
virtual ~TEveStraightLineSetProjected() {}
virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
virtual void UpdateProjection();
virtual TEveElement* GetProjectedAsElement() { return this; }
ClassDef(TEveStraightLineSetProjected, 1);
};
#endif
TEveStraightLineSet.h:100 TEveStraightLineSet.h:101 TEveStraightLineSet.h:102 TEveStraightLineSet.h:103 TEveStraightLineSet.h:104 TEveStraightLineSet.h:105 TEveStraightLineSet.h:106 TEveStraightLineSet.h:107 TEveStraightLineSet.h:108 TEveStraightLineSet.h:109 TEveStraightLineSet.h:110 TEveStraightLineSet.h:111 TEveStraightLineSet.h:112 TEveStraightLineSet.h:113 TEveStraightLineSet.h:114 TEveStraightLineSet.h:115 TEveStraightLineSet.h:116 TEveStraightLineSet.h:117 TEveStraightLineSet.h:118 TEveStraightLineSet.h:119 TEveStraightLineSet.h:120 TEveStraightLineSet.h:121 TEveStraightLineSet.h:122 TEveStraightLineSet.h:123 TEveStraightLineSet.h:124 TEveStraightLineSet.h:125 TEveStraightLineSet.h:126 TEveStraightLineSet.h:127 TEveStraightLineSet.h:128 TEveStraightLineSet.h:129 TEveStraightLineSet.h:130 TEveStraightLineSet.h:131 TEveStraightLineSet.h:132 TEveStraightLineSet.h:133 TEveStraightLineSet.h:134 TEveStraightLineSet.h:135 TEveStraightLineSet.h:136 TEveStraightLineSet.h:137 TEveStraightLineSet.h:138 TEveStraightLineSet.h:139 TEveStraightLineSet.h:140 TEveStraightLineSet.h:141 TEveStraightLineSet.h:142 TEveStraightLineSet.h:143 TEveStraightLineSet.h:144 TEveStraightLineSet.h:145 TEveStraightLineSet.h:146 TEveStraightLineSet.h:147 TEveStraightLineSet.h:148 TEveStraightLineSet.h:149