CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
FWViewGeometryList Class Reference

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

Inheritance diagram for FWViewGeometryList:
FW3DViewGeometry FWRPZViewGeometry

Public Member Functions

 FWViewGeometryList (const fireworks::Context &context, bool projected=true)
 
 FWViewGeometryList (const FWViewGeometryList &)=delete
 
const FWViewGeometryListoperator= (const FWViewGeometryList &)=delete
 
void updateColors ()
 
void updateTransparency (bool projectedType)
 
 ~FWViewGeometryList () override
 

Protected Member Functions

void addToCompound (TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
 

Protected Attributes

TEveCompound * m_colorComp [kFWGeomColorSize]
 
const fireworks::Contextm_context
 
const FWGeometrym_geom
 

Private Attributes

sigc::connection m_colorConnection
 
bool m_projected
 
sigc::connection m_transpConnection
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 34 of file FWViewGeometryList.h.

Constructor & Destructor Documentation

FWViewGeometryList::FWViewGeometryList ( const fireworks::Context context,
bool  projected = true 
)

Definition at line 22 of file FWViewGeometryList.cc.

References fireworks::Context::colorManager(), FWColorManager::geomColor(), FWColorManager::geomColorsHaveChanged_, FWColorManager::geomTransparency(), FWColorManager::geomTransparencyHaveChanged_, fireworks::Context::getGeom(), mps_fire::i, kFWGeomColorSize, m_colorComp, m_colorConnection, m_context, m_geom, m_projected, m_transpConnection, updateColors(), and updateTransparency().

23  : m_context(context), m_geom(nullptr), m_projected(projected) {
24  m_geom = context.getGeom();
25 
26  for (int i = 0; i < kFWGeomColorSize; ++i) {
27  m_colorComp[i] = new TEveCompound(Form("3D view color compund [%d]", i));
30  m_colorComp[i]->CSCApplyMainColorToAllChildren();
31  m_colorComp[i]->CSCApplyMainTransparencyToMatchingChildren();
32  }
34  context.colorManager()->geomColorsHaveChanged_.connect(std::bind(&FWViewGeometryList::updateColors, this));
36  std::bind(&FWViewGeometryList::updateTransparency, this, std::placeholders::_1));
37 }
sigc::signal< void > geomColorsHaveChanged_
Color_t geomTransparency(bool projected) const
TEveCompound * m_colorComp[kFWGeomColorSize]
FWColorManager * colorManager() const
Definition: Context.h:58
FWGeomColorIndex
sigc::signal< void, bool > geomTransparencyHaveChanged_
void updateTransparency(bool projectedType)
const FWGeometry * m_geom
sigc::connection m_transpConnection
sigc::connection m_colorConnection
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
FWGeometry * getGeom() const
Definition: Context.h:72
FWViewGeometryList::~FWViewGeometryList ( )
override

Definition at line 39 of file FWViewGeometryList.cc.

References mps_fire::i, kFWGeomColorSize, m_colorComp, m_colorConnection, and m_transpConnection.

39  {
40  m_transpConnection.disconnect();
41  m_colorConnection.disconnect();
42  for (int i = 0; i < kFWGeomColorSize; ++i) {
43  if (m_colorComp[i])
44  m_colorComp[i]->Destroy();
45  }
46 }
TEveCompound * m_colorComp[kFWGeomColorSize]
sigc::connection m_transpConnection
sigc::connection m_colorConnection
FWViewGeometryList::FWViewGeometryList ( const FWViewGeometryList )
delete

Member Function Documentation

void FWViewGeometryList::addToCompound ( TEveElement *  el,
FWGeomColorIndex  idx,
bool  applyTransp = true 
) const
protected
const FWViewGeometryList& FWViewGeometryList::operator= ( const FWViewGeometryList )
delete
void FWViewGeometryList::updateColors ( )

Definition at line 57 of file FWViewGeometryList.cc.

References fireworks::Context::colorManager(), FWColorManager::geomColor(), FWColorManager::geomTransparency(), mps_fire::i, kFWGeomColorSize, m_colorComp, m_context, and m_projected.

Referenced by FWViewGeometryList().

57  {
58  // printf("%p FWViewGeometryList::updateColors projected %d %s \n", this, m_projected, GetElementName());
59  for (int i = 0; i < kFWGeomColorSize; ++i) {
62  m_colorComp[i]->ElementChanged();
63  }
64 }
Color_t geomTransparency(bool projected) const
TEveCompound * m_colorComp[kFWGeomColorSize]
FWColorManager * colorManager() const
Definition: Context.h:58
FWGeomColorIndex
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
void FWViewGeometryList::updateTransparency ( bool  projectedType)

Definition at line 66 of file FWViewGeometryList.cc.

References fireworks::Context::colorManager(), FWColorManager::geomTransparency(), mps_fire::i, kFWGeomColorSize, m_colorComp, m_context, and m_projected.

Referenced by FWViewGeometryList().

66  {
67  // printf("%p transp [%d]\n", this, iTransp);
68 
69  if (projectedType == m_projected) {
70  for (int i = 0; i < kFWGeomColorSize; ++i) {
71  m_colorComp[i]->SetMainTransparency(m_context.colorManager()->geomTransparency(projectedType));
72  m_colorComp[i]->ElementChanged();
73  }
74  }
75 }
Color_t geomTransparency(bool projected) const
TEveCompound * m_colorComp[kFWGeomColorSize]
FWColorManager * colorManager() const
Definition: Context.h:58
const fireworks::Context & m_context

Member Data Documentation

TEveCompound* FWViewGeometryList::m_colorComp[kFWGeomColorSize]
protected
sigc::connection FWViewGeometryList::m_colorConnection
private

Definition at line 58 of file FWViewGeometryList.h.

Referenced by FWViewGeometryList(), and ~FWViewGeometryList().

const fireworks::Context& FWViewGeometryList::m_context
protected
const FWGeometry* FWViewGeometryList::m_geom
protected
bool FWViewGeometryList::m_projected
private

Definition at line 59 of file FWViewGeometryList.h.

Referenced by FWViewGeometryList(), updateColors(), and updateTransparency().

sigc::connection FWViewGeometryList::m_transpConnection
private

Definition at line 57 of file FWViewGeometryList.h.

Referenced by FWViewGeometryList(), and ~FWViewGeometryList().