CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Friends
FWGeoTopNode Class Reference

#include <Fireworks/Core/interface/FWGeoTopNode.h>

Inheritance diagram for FWGeoTopNode:
FWEveDetectorGeo FWEveOverlap

Public Types

enum  MenuOptions {
  kSetTopNode, kSetTopNodeCam, kVisSelfOff, kVisChldOn,
  kVisChldOff, kApplyChldCol, kApplyChldColRec, kCamera,
  kPrintMaterial, kPrintPath, kPrintShape, kPrintOverlap,
  kOverlapVisibilityMotherOn, kOverlapVisibilityMotherOff
}
 

Public Member Functions

virtual FWGeometryTableViewBasebrowser ()
 
void clearSelection ()
 
 FWGeoTopNode (const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
 
int getFirstSelectedTableIndex ()
 
virtual void Paint (Option_t *option="")
 
virtual void popupMenu (int x, int y, TGLViewer *)
 
void printSelected ()
 
bool selectPhysicalFromTable (int)
 
virtual FWGeometryTableManagerBasetableManager ()
 
virtual void UnHighlighted ()
 
virtual void UnSelected ()
 
virtual ~FWGeoTopNode ()
 

Public Attributes

std::set< TGLPhysicalShape * > fHted
 
std::set< TGLPhysicalShape * > fSted
 
FWGeoTopNodeGLScenem_scene
 

Static Public Attributes

static TGLVector3 s_pickedCamera3DCenter
 
static TGLViewer * s_pickedViewer = 0
 

Protected Member Functions

void ClearSet (std::set< TGLPhysicalShape * > &sset)
 
virtual void ComputeBBox ()
 
void EraseFromSet (std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
 
void paintShape (Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
 
void ProcessSelection (TGLSelectRecord &rec, std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
 
FWPopupMenusetPopupMenu (int iX, int iY, TGLViewer *v, bool)
 
void SetStateOf (TGLPhysicalShape *id)
 
void setupBuffMtx (TBuffer3D &buff, const TGeoHMatrix &mat)
 

Static Protected Member Functions

static UInt_t phyID (int tableIdx)
 
static int tableIdx (TGLPhysicalShape *ps)
 

Private Member Functions

 ClassDef (FWGeoTopNode, 0)
 
 FWGeoTopNode (const FWGeoTopNode &)
 
const FWGeoTopNodeoperator= (const FWGeoTopNode &)
 
UChar_t wrapTransparency (FWGeometryTableManagerBase::NodeInfo &data, bool leafNode)
 

Friends

class FWGeoTopNodeGL
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 41 of file FWGeoTopNode.h.

Member Enumeration Documentation

Enumerator
kSetTopNode 
kSetTopNodeCam 
kVisSelfOff 
kVisChldOn 
kVisChldOff 
kApplyChldCol 
kApplyChldColRec 
kCamera 
kPrintMaterial 
kPrintPath 
kPrintShape 
kPrintOverlap 
kOverlapVisibilityMotherOn 
kOverlapVisibilityMotherOff 

Definition at line 47 of file FWGeoTopNode.h.

Constructor & Destructor Documentation

FWGeoTopNode::FWGeoTopNode ( const char *  n = "FWGeoTopNode",
const char *  t = "FWGeoTopNode" 
)
inline

Definition at line 64 of file FWGeoTopNode.h.

64 {}
virtual FWGeoTopNode::~FWGeoTopNode ( )
inlinevirtual

Definition at line 65 of file FWGeoTopNode.h.

References TSGForRoadSearch_cfi::option, and Paint().

65 {}
FWGeoTopNode::FWGeoTopNode ( const FWGeoTopNode )
private

Member Function Documentation

virtual FWGeometryTableViewBase* FWGeoTopNode::browser ( )
inlinevirtual

Reimplemented in FWEveDetectorGeo, and FWEveOverlap.

Definition at line 71 of file FWGeoTopNode.h.

Referenced by wrapTransparency().

71 { return 0; }
FWGeoTopNode::ClassDef ( FWGeoTopNode  ,
 
)
private
void FWGeoTopNode::clearSelection ( )
inline

Definition at line 78 of file FWGeoTopNode.h.

References printSelected().

Referenced by FWGeometryTableView::setPath(), and FWGeometryTableViewBase::setPath().

78 {fHted.clear(); fSted.clear();}
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:73
void FWGeoTopNode::ClearSet ( std::set< TGLPhysicalShape * > &  sset)
protected

Definition at line 71 of file FWGeoTopNode.cc.

References SetStateOf().

Referenced by ProcessSelection(), UnHighlighted(), and UnSelected().

72 {
73  while (!sset.empty())
74  {
75  TGLPhysicalShape *id = *sset.begin();
76  sset.erase(id);
77  SetStateOf(id);
78  }
79 }
void SetStateOf(TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:81
void FWGeoTopNode::ComputeBBox ( )
protectedvirtual

Definition at line 221 of file FWGeoTopNode.cc.

References f.

222 {
223  // Fill bounding-box information. Virtual from TAttBBox.
224 
225  BBoxZero(1.0f);
226 }
double f[11][100]
void FWGeoTopNode::EraseFromSet ( std::set< TGLPhysicalShape * > &  sset,
TGLPhysicalShape *  id 
)
protected

Definition at line 64 of file FWGeoTopNode.cc.

References SetStateOf().

Referenced by ProcessSelection().

65 {
66  sset.erase(id);
67  SetStateOf(id);
68 }
void SetStateOf(TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:81
int FWGeoTopNode::getFirstSelectedTableIndex ( )

Definition at line 205 of file FWGeoTopNode.cc.

References fSted, mps_fire::i, FWGeometryTableManagerBase::kSelected, FWGeometryTableManagerBase::refEntries(), and tableManager().

Referenced by FWOverlapTableView::chosenItem(), FWGeometryTableViewBase::chosenItem(), and setPopupMenu().

206 {
207  // Note: if object would be rendered, this would return fSted.begin().
208 
209  if (fSted.size() <= 1)
210  {
211  int cnt = 0;
212  for (FWGeometryTableManagerBase::Entries_i i = tableManager()->refEntries().begin(); i != tableManager()->refEntries().end(); ++i, ++cnt)
213  {
214  if (i->testBit(FWGeometryTableManagerBase::kSelected)) return cnt;
215  }
216  }
217  return -1;
218 }
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
const FWGeoTopNode& FWGeoTopNode::operator= ( const FWGeoTopNode )
private
void FWGeoTopNode::Paint ( Option_t *  option = "")
virtual

Reimplemented in FWEveDetectorGeo, and FWEveOverlap.

Definition at line 328 of file FWGeoTopNode.cc.

References WDecay::kNone.

Referenced by FWEveDetectorGeo::Paint(), FWEveOverlap::Paint(), and ~FWGeoTopNode().

329 {
330  static const TEveException eh("FWGeoTopNode::Paint ");
331 
332  TBuffer3D buff(TBuffer3DTypes::kGeneric);
333 
334  // Section kCore
335  buff.fID = this;
336  buff.fColor = GetMainColor();
337  buff.fTransparency = GetMainTransparency();
338  if (HasMainTrans()) RefMainTrans().SetBuffer3D(buff);
339 
340  buff.SetSectionsValid(TBuffer3D::kCore);
341 
342  Int_t reqSections = gPad->GetViewer3D()->AddObject(1, buff);
343  if (reqSections != TBuffer3D::kNone)
344  {
345  Warning(eh, "IsA='%s'. Viewer3D requires more sections (%d). Only direct-rendering supported.",
346  ClassName(), reqSections);
347  }
348 }
void FWGeoTopNode::paintShape ( Int_t  idx,
const TGeoHMatrix &  nm,
bool  volumeColor,
bool  parentNode 
)
protected

Definition at line 244 of file FWGeoTopNode.cc.

References data, GetTransform(), WDecay::kNone, FWGeometryTableManagerBase::NodeInfo::m_color, FWGeometryTableManagerBase::NodeInfo::m_node, m_scene, FWGeoTopNodeGLScene::OpenCompositeWithPhyID(), phyID(), FWGeometryTableManagerBase::refEntries(), setupBuffMtx(), tableManager(), and wrapTransparency().

Referenced by FWEveDetectorGeo::Paint(), FWEveOverlap::Paint(), FWEveOverlap::paintChildNodesRecurse(), and FWEveDetectorGeo::paintChildNodesRecurse().

245 {
246  static const TEveException eh("FWGeoTopNode::paintShape ");
247 
248  // printf("paint sahpe id %d\n", tableIndex );
249 
251  UChar_t transparency = wrapTransparency(data, isParentNode);
252  // printf("trans %d \n", transparency );
253  if (transparency >= 100) return;
254 
255  if (data.m_node->GetVolume()->IsAssembly()) return;
256  TGeoShape* shape = data.m_node->GetVolume()->GetShape();
257 
258  TGeoCompositeShape* compositeShape = dynamic_cast<TGeoCompositeShape*>(shape);
259  if (compositeShape)
260  {
261  // m_scene->fNextCompositeID = phyID(tableIndex);
262 
263  Double_t halfLengths[3] = { compositeShape->GetDX(), compositeShape->GetDY(), compositeShape->GetDZ() };
264 
265  TBuffer3D buff(TBuffer3DTypes::kComposite);
266  buff.fID = data.m_node->GetVolume();
267  buff.fColor = volumeColor ? data.m_node->GetVolume()->GetLineColor() : data.m_color ;
268  buff.fTransparency = transparency;// data.m_node->GetVolume()->GetTransparency();
269 
270  nm.GetHomogenousMatrix(buff.fLocalMaster);
271  buff.fLocalFrame = kTRUE; // Always enforce local frame (no geo manager).
272  buff.SetAABoundingBox(compositeShape->GetOrigin(), halfLengths);
273  buff.SetSectionsValid(TBuffer3D::kCore|TBuffer3D::kBoundingBox);
274 
275  Bool_t paintComponents = kTRUE;
276  // Start a composite shape, identified by this buffer
277  if (TBuffer3D::GetCSLevel() == 0) {
278  paintComponents = m_scene->OpenCompositeWithPhyID(phyID(tableIndex), buff);
279  }
280 
281  TBuffer3D::IncCSLevel();
282 
283  // Paint the boolean node - will add more buffers to viewer
284  TGeoHMatrix xxx;
285  TGeoMatrix *gst = TGeoShape::GetTransform();
286  TGeoShape::SetTransform(&xxx);
287 
288  if (paintComponents) compositeShape->GetBoolNode()->Paint("");
289  TGeoShape::SetTransform(gst);
290  // Close the composite shape
291  if (TBuffer3D::DecCSLevel() == 0)
292  gPad->GetViewer3D()->CloseComposite();
293 
294 
295  // m_scene->fNextCompositeID = 0;
296  }
297  else
298  {
299  TBuffer3D& buff = (TBuffer3D&) shape->GetBuffer3D (TBuffer3D::kCore, kFALSE);
300  setupBuffMtx(buff, nm);
301  buff.fID = data.m_node->GetVolume();
302  buff.fColor = volumeColor ? data.m_node->GetVolume()->GetLineColor() : data.m_color ;
303  buff.fTransparency = transparency;// data.m_node->GetVolume()->GetTransparency();
304 
305 
306  nm.GetHomogenousMatrix(buff.fLocalMaster);
307  buff.fLocalFrame = kTRUE; // Always enforce local frame (no geo manager).
308 
309  Int_t sections = TBuffer3D::kBoundingBox | TBuffer3D::kShapeSpecific;
310  shape->GetBuffer3D(sections, kTRUE);
311 
312  Int_t reqSec = gPad->GetViewer3D()->AddObject(phyID(tableIndex), buff);
313 
314  if (reqSec != TBuffer3D::kNone) {
315  // This shouldn't happen, but I suspect it does sometimes.
316  if (reqSec & TBuffer3D::kCore)
317  Warning(eh, "Core section required again for shape='%s'. This shouldn't happen.", GetName());
318  shape->GetBuffer3D(reqSec, kTRUE);
319  reqSec = gPad->GetViewer3D()->AddObject(phyID(tableIndex), buff);
320  }
321 
322  if (reqSec != TBuffer3D::kNone)
323  Warning(eh, "Extra section required: reqSec=%d, shape=%s.", reqSec, GetName());
324  }
325 }
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
bool OpenCompositeWithPhyID(UInt_t phyID, const TBuffer3D &buffer)
static const G4AffineTransform & GetTransform(const G4TouchableHistory *touchable, int depth)
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:68
UChar_t wrapTransparency(FWGeometryTableManagerBase::NodeInfo &data, bool leafNode)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void setupBuffMtx(TBuffer3D &buff, const TGeoHMatrix &mat)
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:53
UInt_t FWGeoTopNode::phyID ( int  tableIdx)
staticprotected

Definition at line 53 of file FWGeoTopNode.cc.

Referenced by paintShape(), and selectPhysicalFromTable().

54 {
55 return UInt_t(tableIdx + 2);
56 
57 }
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
virtual void FWGeoTopNode::popupMenu ( int  x,
int  y,
TGLViewer *   
)
inlinevirtual

Reimplemented in FWEveDetectorGeo, and FWEveOverlap.

Definition at line 81 of file FWGeoTopNode.h.

References UnHighlighted(), and UnSelected().

Referenced by FWGeometryTableViewBase::cellClicked(), and FWGeoTopNodeGLScene::GeoPopupMenu().

81 {}
void FWGeoTopNode::printSelected ( )

Definition at line 195 of file FWGeoTopNode.cc.

References fSted, dataset::name, tableIdx(), and tableManager().

Referenced by clearSelection().

196 {
197  for (std::set<TGLPhysicalShape*>::iterator it = fSted.begin(); it != fSted.end(); ++it)
198  {
199  printf("FWGeoTopNode::printSelected %s \n", tableManager()->refEntries().at(tableIdx(*it)).name() );
200  }
201 }
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
void FWGeoTopNode::ProcessSelection ( TGLSelectRecord &  rec,
std::set< TGLPhysicalShape * > &  sset,
TGLPhysicalShape *  id 
)
protected

Definition at line 105 of file FWGeoTopNode.cc.

References ClearSet(), FWTableManagerBase::dataChanged(), EraseFromSet(), WDecay::kNone, m_scene, SetStateOf(), and tableManager().

Referenced by FWGeoTopNodeGL::ProcessSelection().

106 {
107  // printf("FWGeoTopNode::ProcessSelection ===============================\n");
108 
109  m_scene->BeginUpdate();
110 
111  if (sset.empty())
112  {
113  if (id)
114  {
115  sset.insert(id);
116  rec.SetSecSelResult(TGLSelectRecord::kEnteringSelection);
117  }
118  }
119  else
120  {
121  if (id)
122  {
123  if (rec.GetMultiple())
124  {
125  if (sset.find(id) == sset.end())
126  {
127  sset.insert(id);
128  rec.SetSecSelResult(TGLSelectRecord::kModifyingInternalSelection);
129  }
130  else
131  {
132  EraseFromSet(sset, id);
133  if (sset.empty())
134  rec.SetSecSelResult(TGLSelectRecord::kLeavingSelection);
135  else
136  rec.SetSecSelResult(TGLSelectRecord::kModifyingInternalSelection);
137  }
138  }
139  else
140  {
141  if (sset.size() != 1 || sset.find(id) == sset.end())
142  {
143  ClearSet(sset);
144  sset.insert(id);
145  rec.SetSecSelResult(TGLSelectRecord::kModifyingInternalSelection);
146  }
147  }
148  }
149  else
150  {
151  if (!rec.GetMultiple())
152  {
153  ClearSet(sset);
154  rec.SetSecSelResult(TGLSelectRecord::kLeavingSelection);
155  }
156  }
157  }
158 
159  if (id)
160  {
161  SetStateOf(id);
162  }
163 
164  if (rec.GetSecSelResult() != TGLSelectRecord::kNone)
165  {
166  m_scene->EndUpdate(kTRUE, kFALSE, kTRUE);
167  gEve->Redraw3D();
168 
170  }
171  else
172  {
173  m_scene->EndUpdate(kFALSE, kFALSE, kFALSE);
174  }
175 }
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:71
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:68
void EraseFromSet(std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:64
void SetStateOf(TGLPhysicalShape *id)
Definition: FWGeoTopNode.cc:81
bool FWGeoTopNode::selectPhysicalFromTable ( int  tableIndex)

Definition at line 178 of file FWGeoTopNode.cc.

References fSted, fwLog, fwlog::kInfo, FWGeometryTableManagerBase::kVisNodeSelf, m_scene, phyID(), and tableManager().

Referenced by FWGeometryTableViewBase::setColumnSelected().

179 {
180  // printf("FWGeoTopNode::selectPhysicalFromTable
181 
182  TGLPhysicalShape* ps = m_scene->FindPhysical(phyID(tableIndex));
183  if (ps) {
184  fSted.insert(ps);
185  ps->Select(1);
186  // printf("selectPhysicalFromTable found physical \n");
187  return true;
188  }
189  else if ( tableManager()->refEntries().at(tableIndex).testBit(FWGeometryTableManagerBase::kVisNodeSelf))
190  fwLog(fwlog::kInfo) << "Selected entry not drawn in GL viewer. \n" ;
191  return false;
192 }
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:68
#define fwLog(_level_)
Definition: fwLog.h:50
static UInt_t phyID(int tableIdx)
Definition: FWGeoTopNode.cc:53
FWPopupMenu * FWGeoTopNode::setPopupMenu ( int  iX,
int  iY,
TGLViewer *  v,
bool  overlap 
)
protected

Definition at line 368 of file FWGeoTopNode.cc.

References fSted, fwLog, getFirstSelectedTableIndex(), kApplyChldCol, kApplyChldColRec, kCamera, fwlog::kInfo, kPrintMaterial, kPrintOverlap, kPrintPath, kPrintShape, kSetTopNode, kSetTopNodeCam, kVisChldOff, kVisChldOn, kVisSelfOff, s_pickedCamera3DCenter, s_pickedViewer, findQualityFiles::v, x, and y.

Referenced by FWEveOverlap::popupMenu(), and FWEveDetectorGeo::popupMenu().

369 {
370  if (getFirstSelectedTableIndex() < 0)
371  {
372  if (fSted.empty()) fwLog(fwlog::kInfo) << "No menu -- no node/entry selected \n";
373  return 0;
374  }
375 
376  FWPopupMenu* nodePopup = new FWPopupMenu();
377 
378  nodePopup->AddEntry("Set As Top Node", kSetTopNode);
379  nodePopup->AddEntry("Set As Top Node and Reset Camera", kSetTopNodeCam);
380  nodePopup->AddSeparator();
381  if (v) {
382  nodePopup->AddEntry("Rnr Off", kVisSelfOff);
383  }
384  nodePopup->AddEntry("Turn Render On For Children", kVisChldOn);
385  nodePopup->AddEntry("Turn Render Off For Children", kVisChldOff);
386  nodePopup->AddEntry("Apply Color To Children", kApplyChldCol);
387  nodePopup->AddEntry("Apply Color Recursively", kApplyChldColRec);
388  nodePopup->AddSeparator();
389 
390  if (overlap)
391  nodePopup->AddEntry("Print Overlap", kPrintOverlap);
392  nodePopup->AddEntry("Print Path", kPrintPath);
393  nodePopup->AddEntry("Print Shape", kPrintShape);
394  nodePopup->AddEntry("Print Material", kPrintMaterial);
395 
396  nodePopup->AddSeparator();
397  if (v) {
398  Window_t wdummy;
399  Int_t x,y;
400  gVirtualX->TranslateCoordinates(gClient->GetDefaultRoot()->GetId(), v->GetGLWidget()->GetId(), iX, iY, x, y, wdummy);
401  TGLVector3 pnt(x, y, 0.5*v->GetSelRec().GetMinZ());
402  v->CurrentCamera().WindowToViewport(pnt);
403  s_pickedCamera3DCenter = v->CurrentCamera().ViewportToWorld(pnt);
404  // s_pickedCamera3DCenter.Dump();
405  s_pickedViewer = v;
406 
407  nodePopup->AddEntry("Set Camera Center", kCamera);
408  }
409 
410  nodePopup->PlaceMenu(iX, iY,true,true);
411  return nodePopup;
412 }
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
int getFirstSelectedTableIndex()
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
#define fwLog(_level_)
Definition: fwLog.h:50
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:87
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:86
void FWGeoTopNode::SetStateOf ( TGLPhysicalShape *  id)
protected

Definition at line 81 of file FWGeoTopNode.cc.

References data, fHted, fSted, FWGeometryTableManagerBase::kHighlighted, FWGeometryTableManagerBase::kSelected, FWGeometryTableManagerBase::refEntries(), FWGeometryTableManagerBase::NodeInfo::resetBit(), FWGeometryTableManagerBase::NodeInfo::setBit(), tableIdx(), and tableManager().

Referenced by ClearSet(), EraseFromSet(), and ProcessSelection().

82 {
84 
85  if (fSted.find(id) != fSted.end())
86  {
87  id->Select(1);
89  }
90  else if (fHted.find(id) != fHted.end())
91  {
92  id->Select(3);
94  }
95  else
96  {
97  id->Select(0);
100  }
101 
102 }
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:73
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
void FWGeoTopNode::setupBuffMtx ( TBuffer3D &  buff,
const TGeoHMatrix &  mat 
)
protected

Definition at line 229 of file FWGeoTopNode.cc.

References funct::m, alignCSCRings::r, alignCSCRings::s, and lumiQTWidget::t.

Referenced by paintShape().

230 {
231  const Double_t *r = mat.GetRotationMatrix();
232  const Double_t *t = mat.GetTranslation();
233  const Double_t *s = mat.GetScale();
234  Double_t *m = buff.fLocalMaster;
235  m[0] = r[0]*s[0]; m[1] = r[1]*s[1]; m[2] = r[2]*s[2]; m[3] = 0;
236  m[4] = r[3]*s[0]; m[5] = r[4]*s[1]; m[6] = r[5]*s[2]; m[7] = 0;
237  m[8] = r[6]*s[0]; m[9] = r[7]*s[1]; m[10] = r[8]*s[2]; m[11] = 0;
238  m[12] = t[0]; m[13] = t[1]; m[15] = t[2]; m[15] = 1;
239 
240  buff.fLocalFrame = kTRUE;
241 }
int FWGeoTopNode::tableIdx ( TGLPhysicalShape *  ps)
staticprotected

Definition at line 59 of file FWGeoTopNode.cc.

Referenced by FWEveOverlap::GetHighlightTooltip(), FWEveDetectorGeo::GetHighlightTooltip(), printSelected(), and SetStateOf().

60 {
61  return ps->ID() - 2;
62 }
virtual FWGeometryTableManagerBase* FWGeoTopNode::tableManager ( )
inlinevirtual
void FWGeoTopNode::UnHighlighted ( )
virtual

Definition at line 359 of file FWGeoTopNode.cc.

References begin, ClearSet(), fHted, mps_fire::i, FWGeometryTableManagerBase::kHighlighted, FWGeometryTableManagerBase::refEntries(), and tableManager().

Referenced by popupMenu(), and FWGeometryTableViewBase::setColumnSelected().

360 {
361  ClearSet(fHted);
362  for (FWGeometryTableManagerBase::Entries_i i = tableManager()->refEntries().begin(); i != tableManager()->refEntries().end(); ++i)
364 }
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:71
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:73
#define begin
Definition: vmac.h:30
void FWGeoTopNode::UnSelected ( )
virtual

Definition at line 351 of file FWGeoTopNode.cc.

References begin, ClearSet(), fSted, mps_fire::i, FWGeometryTableManagerBase::kSelected, FWGeometryTableManagerBase::refEntries(), and tableManager().

Referenced by popupMenu(), and FWGeometryTableViewBase::setColumnSelected().

352 {
353  ClearSet(fSted);
354  for (FWGeometryTableManagerBase::Entries_i i = tableManager()->refEntries().begin(); i != tableManager()->refEntries().end(); ++i)
356 }
std::set< TGLPhysicalShape * > fSted
Definition: FWGeoTopNode.h:74
virtual FWGeometryTableManagerBase * tableManager()
Definition: FWGeoTopNode.h:70
void ClearSet(std::set< TGLPhysicalShape * > &sset)
Definition: FWGeoTopNode.cc:71
#define begin
Definition: vmac.h:30
UChar_t FWGeoTopNode::wrapTransparency ( FWGeometryTableManagerBase::NodeInfo data,
bool  leafNode 
)
private

Definition at line 415 of file FWGeoTopNode.cc.

References browser(), FWGeometryTableViewBase::getLeafTransparencyFactor(), FWGeometryTableViewBase::getParentTransparencyFactor(), FWGeometryTableManagerBase::NodeInfo::m_transparency, and Max().

Referenced by paintShape().

416 {
417  if (isParentNode)
418  {
419  return TMath::Max((Char_t)browser()->getMinParentTransparency(), data.m_transparency) * browser()->getParentTransparencyFactor();
420  }
421  else
422  {
423  return TMath::Max((Char_t)browser()->getMinLeafTransparency(), data.m_transparency) * browser()->getLeafTransparencyFactor();
424  }
425 }
T Max(T a, T b)
Definition: MathUtil.h:44
virtual FWGeometryTableViewBase * browser()
Definition: FWGeoTopNode.h:71

Friends And Related Function Documentation

friend class FWGeoTopNodeGL
friend

Definition at line 44 of file FWGeoTopNode.h.

Member Data Documentation

std::set<TGLPhysicalShape*> FWGeoTopNode::fHted
std::set<TGLPhysicalShape*> FWGeoTopNode::fSted
FWGeoTopNodeGLScene* FWGeoTopNode::m_scene
TGLVector3 FWGeoTopNode::s_pickedCamera3DCenter
static

Definition at line 86 of file FWGeoTopNode.h.

Referenced by FWGeometryTableViewBase::chosenItem(), and setPopupMenu().

TGLViewer * FWGeoTopNode::s_pickedViewer = 0
static

Definition at line 87 of file FWGeoTopNode.h.

Referenced by FWGeometryTableViewBase::chosenItem(), and setPopupMenu().