#include <Fireworks/Core/interface/FWViewGeometryList.h>
Public Member Functions | |
FWViewGeometryList (const fireworks::Context &context, bool projected=true) | |
void | updateColors () |
void | updateTransparency (bool projectedType) |
virtual | ~FWViewGeometryList () |
Protected Member Functions | |
void | addToCompound (TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const |
Protected Attributes | |
TEveCompound * | m_colorComp [kFWGeomColorSize] |
const fireworks::Context & | m_context |
const FWGeometry * | m_geom |
Private Member Functions | |
FWViewGeometryList (const FWViewGeometryList &) | |
const FWViewGeometryList & | operator= (const FWViewGeometryList &) |
Private Attributes | |
sigc::connection | m_colorConnection |
bool | m_projected |
sigc::connection | m_transpConnection |
Description: [one line class summary]
Usage: <usage>
Definition at line 35 of file FWViewGeometryList.h.
FWViewGeometryList::FWViewGeometryList | ( | const fireworks::Context & | context, |
bool | projected = true |
||
) |
Definition at line 23 of file FWViewGeometryList.cc.
References fireworks::Context::colorManager(), FWColorManager::geomColor(), FWColorManager::geomColorsHaveChanged_, FWColorManager::geomTransparency(), FWColorManager::geomTransparencyHaveChanged_, fireworks::Context::getGeom(), i, kFWGeomColorSize, m_colorComp, m_colorConnection, m_context, m_geom, m_projected, m_transpConnection, updateColors(), and updateTransparency().
: m_context(context), m_geom(0), m_projected(projected) { m_geom = context.getGeom(); for (int i = 0; i < kFWGeomColorSize; ++i) { m_colorComp[i] = new TEveCompound(Form("3D view color compund [%d]", i)); m_colorComp[i]->SetMainColor(m_context.colorManager()->geomColor(FWGeomColorIndex(i))); m_colorComp[i]->SetMainTransparency(m_context.colorManager()->geomTransparency(m_projected)); m_colorComp[i]->CSCApplyMainColorToAllChildren(); m_colorComp[i]->CSCApplyMainTransparencyToMatchingChildren(); } m_colorConnection = context.colorManager()->geomColorsHaveChanged_.connect(boost::bind(&FWViewGeometryList::updateColors, this)); m_transpConnection = context.colorManager()->geomTransparencyHaveChanged_.connect(boost::bind(&FWViewGeometryList::updateTransparency,this, _1)); }
FWViewGeometryList::~FWViewGeometryList | ( | ) | [virtual] |
Definition at line 42 of file FWViewGeometryList.cc.
References i, kFWGeomColorSize, m_colorComp, m_colorConnection, and m_transpConnection.
{ m_transpConnection.disconnect(); m_colorConnection.disconnect(); for (int i = 0; i < kFWGeomColorSize; ++i) { if (m_colorComp[i]) m_colorComp[i]->Destroy(); } }
FWViewGeometryList::FWViewGeometryList | ( | const FWViewGeometryList & | ) | [private] |
void FWViewGeometryList::addToCompound | ( | TEveElement * | el, |
FWGeomColorIndex | idx, | ||
bool | applyTransp = true |
||
) | const [protected] |
Definition at line 53 of file FWViewGeometryList.cc.
References m_colorComp.
Referenced by FWRPZViewGeometry::makeCaloOutlineRhoPhi(), FWRPZViewGeometry::makeCaloOutlineRhoZ(), FWRPZViewGeometry::makeMuonGeometryRhoPhi(), FWRPZViewGeometry::makeMuonGeometryRhoZ(), FW3DViewGeometry::showMuonBarrel(), FW3DViewGeometry::showMuonBarrelFull(), FW3DViewGeometry::showMuonEndcap(), FW3DViewGeometry::showPixelBarrel(), FWRPZViewGeometry::showPixelBarrel(), FWRPZViewGeometry::showPixelEndcap(), FW3DViewGeometry::showPixelEndcap(), FW3DViewGeometry::showTrackerBarrel(), FWRPZViewGeometry::showTrackerBarrel(), FW3DViewGeometry::showTrackerEndcap(), and FWRPZViewGeometry::showTrackerEndcap().
{ el->SetMainColor( m_colorComp[colIdx]->GetMainColor()); if (applyTransp) el->SetMainTransparency( m_colorComp[colIdx]->GetMainTransparency()); el->SetPickable(true); m_colorComp[colIdx]->AddElement(el); }
const FWViewGeometryList& FWViewGeometryList::operator= | ( | const FWViewGeometryList & | ) | [private] |
void FWViewGeometryList::updateColors | ( | ) |
Definition at line 64 of file FWViewGeometryList.cc.
References fireworks::Context::colorManager(), FWColorManager::geomColor(), FWColorManager::geomTransparency(), i, kFWGeomColorSize, m_colorComp, m_context, and m_projected.
Referenced by FWViewGeometryList().
{ // printf("%p FWViewGeometryList::updateColors projected %d %s \n", this, m_projected, GetElementName()); for (int i = 0; i < kFWGeomColorSize; ++i) { m_colorComp[i]->SetMainColor(m_context.colorManager()->geomColor(FWGeomColorIndex(i))); m_colorComp[i]->SetMainTransparency(m_context.colorManager()->geomTransparency(m_projected)); m_colorComp[i]->ElementChanged(); } }
void FWViewGeometryList::updateTransparency | ( | bool | projectedType | ) |
Definition at line 76 of file FWViewGeometryList.cc.
References fireworks::Context::colorManager(), FWColorManager::geomTransparency(), i, kFWGeomColorSize, m_colorComp, m_context, and m_projected.
Referenced by FWViewGeometryList().
{ // printf("%p transp [%d]\n", this, iTransp); if (projectedType == m_projected) { for (int i = 0; i < kFWGeomColorSize; ++i) { m_colorComp[i]->SetMainTransparency(m_context.colorManager()->geomTransparency(projectedType)); m_colorComp[i]->ElementChanged(); } } }
TEveCompound* FWViewGeometryList::m_colorComp[kFWGeomColorSize] [protected] |
Definition at line 48 of file FWViewGeometryList.h.
Referenced by addToCompound(), FWViewGeometryList(), FWRPZViewGeometry::makeMuonGeometryRhoPhi(), updateColors(), updateTransparency(), and ~FWViewGeometryList().
sigc::connection FWViewGeometryList::m_colorConnection [private] |
Definition at line 59 of file FWViewGeometryList.h.
Referenced by FWViewGeometryList(), and ~FWViewGeometryList().
const fireworks::Context& FWViewGeometryList::m_context [protected] |
Definition at line 45 of file FWViewGeometryList.h.
Referenced by FWViewGeometryList(), FWRPZViewGeometry::makeCaloOutlineRhoPhi(), FWRPZViewGeometry::makeCaloOutlineRhoZ(), updateColors(), and updateTransparency().
const FWGeometry* FWViewGeometryList::m_geom [protected] |
Definition at line 46 of file FWViewGeometryList.h.
Referenced by FWRPZViewGeometry::estimateProjectionSizeCSC(), FWRPZViewGeometry::estimateProjectionSizeDT(), FWViewGeometryList(), FWRPZViewGeometry::initStdGeoElements(), FWRPZViewGeometry::makeMuonGeometryRhoPhi(), FWRPZViewGeometry::makeMuonGeometryRhoZ(), FW3DViewGeometry::showMuonBarrel(), FW3DViewGeometry::showMuonBarrelFull(), FW3DViewGeometry::showMuonEndcap(), FW3DViewGeometry::showPixelBarrel(), FWRPZViewGeometry::showPixelBarrel(), FWRPZViewGeometry::showPixelEndcap(), FW3DViewGeometry::showPixelEndcap(), FW3DViewGeometry::showTrackerBarrel(), FWRPZViewGeometry::showTrackerBarrel(), FW3DViewGeometry::showTrackerEndcap(), and FWRPZViewGeometry::showTrackerEndcap().
bool FWViewGeometryList::m_projected [private] |
Definition at line 60 of file FWViewGeometryList.h.
Referenced by FWViewGeometryList(), updateColors(), and updateTransparency().
sigc::connection FWViewGeometryList::m_transpConnection [private] |
Definition at line 58 of file FWViewGeometryList.h.
Referenced by FWViewGeometryList(), and ~FWViewGeometryList().