#include <FWGeoTopNodeScene.h>
Public Member Functions | |
virtual Int_t | AddObject (const TBuffer3D &buffer, Bool_t *addChildren=0) |
virtual Bool_t | DestroyPhysical (Int_t) |
virtual Int_t | DestroyPhysicals () |
FWGeoTopNodeGLScene (TVirtualPad *pad) | |
void | GeoPopupMenu (Int_t gx, Int_t gy, TGLViewer *) |
bool | OpenCompositeWithPhyID (UInt_t phyID, const TBuffer3D &buffer) |
virtual Bool_t | ResolveSelectRecord (TGLSelectRecord &rec, Int_t curIdx) |
void | SetPad (TVirtualPad *p) |
virtual | ~FWGeoTopNodeGLScene () |
Public Attributes | |
FWGeoTopNode * | m_eveTopNode |
Private Member Functions | |
FWGeoTopNodeGLScene (const FWGeoTopNodeGLScene &) | |
FWGeoTopNodeGLScene & | operator= (const FWGeoTopNodeGLScene &) |
Definition at line 9 of file FWGeoTopNodeScene.h.
FWGeoTopNodeGLScene::FWGeoTopNodeGLScene | ( | const FWGeoTopNodeGLScene & | ) | [private] |
FWGeoTopNodeGLScene::FWGeoTopNodeGLScene | ( | TVirtualPad * | pad | ) |
Definition at line 14 of file FWGeoTopNodeScene.cc.
: TGLScenePad(pad), // fNextCompositeID(0), m_eveTopNode(0) { // Constructor. // fInternalPIDs = false; fTitle="GeoTopNodeScene"; }
virtual FWGeoTopNodeGLScene::~FWGeoTopNodeGLScene | ( | ) | [inline, virtual] |
Definition at line 21 of file FWGeoTopNodeScene.h.
{}
Int_t FWGeoTopNodeGLScene::AddObject | ( | const TBuffer3D & | buffer, |
Bool_t * | addChildren = 0 |
||
) | [virtual] |
Definition at line 51 of file FWGeoTopNodeScene.cc.
References fwLog, and fwlog::kError.
Referenced by OpenCompositeWithPhyID().
{ if (fComposite) { // TGeoSubstraction, TGeoUnion, ... phyID ignored in this case int ns = TGLScenePad::AddObject(1, buffer, addChildren); return ns; } else { fwLog(fwlog::kError)<< "FWGeoTopNodeGLScene::AddObject() should not be called if fNextCompositeID \n"; return TGLScenePad::AddObject(buffer, addChildren); } }
Bool_t FWGeoTopNodeGLScene::DestroyPhysical | ( | Int_t | x | ) | [virtual] |
Definition at line 117 of file FWGeoTopNodeScene.cc.
References fwLog, and fwlog::kInfo.
{ fwLog(fwlog::kInfo) << "FWGeoTopNodeGLScene::DestroyPhysical()\n"; return TGLScene::DestroyPhysical(x); }
Int_t FWGeoTopNodeGLScene::DestroyPhysicals | ( | ) | [virtual] |
Definition at line 101 of file FWGeoTopNodeScene.cc.
References m_eveTopNode.
{ // Need to clear state on full redraw, else FWGeoTopNode ends // with invalid set of selected physical and logical ids. if (gEve->GetSelection()->HasChild( m_eveTopNode)) gEve->GetSelection()->RemoveElement( m_eveTopNode); if (gEve->GetHighlight()->HasChild( m_eveTopNode)) gEve->GetHighlight()->RemoveElement( m_eveTopNode); return TGLScene::DestroyPhysicals(); }
void FWGeoTopNodeGLScene::GeoPopupMenu | ( | Int_t | gx, |
Int_t | gy, | ||
TGLViewer * | v | ||
) |
Definition at line 124 of file FWGeoTopNodeScene.cc.
References m_eveTopNode, and FWGeoTopNode::popupMenu().
Referenced by FWGLEventHandler::PopupContextMenu().
{ m_eveTopNode->popupMenu(gx, gy,v); }
Bool_t FWGeoTopNodeGLScene::OpenCompositeWithPhyID | ( | UInt_t | phyID, |
const TBuffer3D & | buffer | ||
) |
Definition at line 25 of file FWGeoTopNodeScene.cc.
References AddObject(), and WDecay::kNone.
Referenced by FWGeoTopNode::paintShape().
{ // Open new composite container. // TVirtualViewer3D interface overload - see base/src/TVirtualViewer3D.cxx // for description of viewer architecture. if (fComposite) { Error("FWGeoTopNodeGLScene::OpenComposite", "composite already open"); return kFALSE; } UInt_t extraSections = TGLScenePad::AddObject(phyID, buffer, 0); if (extraSections != TBuffer3D::kNone) { Error("FWGeoTopNodeGLScene::OpenComposite", "expected top level composite to not require extra buffer sections"); } // If composite was created it is of interest - we want the rest of the // child components if (fComposite) { return kTRUE; } else { return kFALSE; } }
FWGeoTopNodeGLScene& FWGeoTopNodeGLScene::operator= | ( | const FWGeoTopNodeGLScene & | ) | [private] |
Bool_t FWGeoTopNodeGLScene::ResolveSelectRecord | ( | TGLSelectRecord & | rec, |
Int_t | curIdx | ||
) | [virtual] |
Definition at line 67 of file FWGeoTopNodeScene.cc.
References m_eveTopNode.
{ // Process selection record rec. // 'curIdx' is the item position where the scene should start // its processing. // Return TRUE if an object has been identified or FALSE otherwise. // The scene-info member of the record is already set by the caller. if (curIdx >= rec.GetN()) return kFALSE; TGLPhysicalShape* pshp = FindPhysical(rec.GetItem(curIdx)); /* printf("FWGeoTopNodeGLScene::ResolveSelectRecord pshp=%p, lshp=%p, obj=%p, shpcls=%s\n", (void*)pshp,(void*) pshp->GetLogical(),(void*) pshp->GetLogical()->GetExternal(), ((TGeoVolume*)pshp->GetLogical()->GetExternal())->GetShape()->ClassName()); */ if (pshp) { rec.SetTransparent(pshp->IsTransparent()); rec.SetPhysShape(pshp); #if ROOT_VERSION_CODE >= ROOT_VERSION(5,32,0) rec.SetLogShape(FindLogical(m_eveTopNode)); #endif rec.SetObject(m_eveTopNode); rec.SetSpecific(0); return kTRUE; } return kFALSE; }
void FWGeoTopNodeGLScene::SetPad | ( | TVirtualPad * | p | ) | [inline] |
Definition at line 23 of file FWGeoTopNodeScene.h.
References AlCaHLTBitMon_ParallelJobs::p.
{ fPad = p; }
Definition at line 18 of file FWGeoTopNodeScene.h.
Referenced by DestroyPhysicals(), FWGeometryTableView::FWGeometryTableView(), FWOverlapTableView::FWOverlapTableView(), GeoPopupMenu(), and ResolveSelectRecord().