#ifndef ROOT_TEveGeoNode
#define ROOT_TEveGeoNode
#include "TEveElement.h"
class TGeoVolume;
class TGeoNode;
class TGeoHMatrix;
class TGeoManager;
class TGeoShape;
class TEveGeoShapeExtract;
class TEveGeoNode : public TEveElement,
public TObject
{
friend class TEveGeoNodeEditor;
TEveGeoNode(const TEveGeoNode&);
TEveGeoNode& operator=(const TEveGeoNode&);
protected:
TGeoNode *fNode;
TEveGeoShapeExtract* DumpShapeTree(TEveGeoNode* geon, TEveGeoShapeExtract* parent=0, Bool_t leafs_only=kFALSE);
static Int_t fgCSGExportNSeg;
static std::list<TGeoShape*> fgTemporaryStore;
public:
TEveGeoNode(TGeoNode* node);
virtual const char* GetName() const;
virtual const char* GetTitle() const;
virtual const char* GetElementName() const;
virtual const char* GetElementTitle() const;
TGeoNode* GetNode() const { return fNode; }
virtual void ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
virtual void ExpandIntoListTrees();
virtual void ExpandIntoListTreesRecursively();
virtual Bool_t CanEditElement() const { return kFALSE; }
virtual void AddStamp(UChar_t bits);
virtual Bool_t CanEditMainColor() const;
virtual void SetMainColor(Color_t color);
virtual Bool_t CanEditMainTransparency() const;
virtual UChar_t GetMainTransparency() const;
virtual void SetMainTransparency(UChar_t t);
void UpdateNode(TGeoNode* node);
void UpdateVolume(TGeoVolume* volume);
void Save(const char* file, const char* name="Extract", Bool_t leafs_only=kFALSE);
void SaveExtract(const char* file, const char* name, Bool_t leafs_only);
void WriteExtract(const char* name, Bool_t leafs_only);
virtual void Draw(Option_t* option="");
static Int_t GetCSGExportNSeg();
static void SetCSGExportNSeg(Int_t nseg);
ClassDef(TEveGeoNode, 1);
};
class TEveGeoTopNode : public TEveGeoNode
{
TEveGeoTopNode(const TEveGeoTopNode&);
TEveGeoTopNode& operator=(const TEveGeoTopNode&);
protected:
TGeoManager* fManager;
Int_t fVisOption;
Int_t fVisLevel;
Int_t fMaxVisNodes;
public:
TEveGeoTopNode(TGeoManager* manager, TGeoNode* node, Int_t visopt=1,
Int_t vislvl=3, Int_t maxvisnds=10000);
virtual ~TEveGeoTopNode() {}
void UseNodeTrans();
Int_t GetVisOption() const { return fVisOption; }
void SetVisOption(Int_t vo) { fVisOption = vo; }
Int_t GetVisLevel() const { return fVisLevel; }
void SetVisLevel(Int_t vl) { fVisLevel = vl; }
Int_t GetMaxVisNodes() const { return fMaxVisNodes; }
void SetMaxVisNodes(Int_t mvn) { fMaxVisNodes = mvn; }
virtual Bool_t CanEditElement() const { return kTRUE; }
virtual Bool_t SingleRnrState() const { return kTRUE; }
virtual void AddStamp(UChar_t bits);
virtual void Draw(Option_t* option="");
virtual void Paint(Option_t* option="");
void VolumeVisChanged(TGeoVolume* volume);
void VolumeColChanged(TGeoVolume* volume);
void NodeVisChanged(TGeoNode* node);
ClassDef(TEveGeoTopNode, 1);
};
#endif