CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | 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)
 
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::Contextm_context
 
const FWGeometrym_geom
 

Private Member Functions

 FWViewGeometryList (const FWViewGeometryList &)
 
const FWViewGeometryListoperator= (const FWViewGeometryList &)
 

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 35 of file FWViewGeometryList.h.

Constructor & Destructor Documentation

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().

23  :
24  m_context(context),
25  m_geom(0),
26  m_projected(projected)
27 {
28  m_geom = context.getGeom();
29 
30  for (int i = 0; i < kFWGeomColorSize; ++i)
31  {
32  m_colorComp[i] = new TEveCompound(Form("3D view color compund [%d]", i));
35  m_colorComp[i]->CSCApplyMainColorToAllChildren();
36  m_colorComp[i]->CSCApplyMainTransparencyToMatchingChildren();
37  }
40 }
sigc::signal< void > geomColorsHaveChanged_
int i
Definition: DBlmapReader.cc:9
Color_t geomTransparency(bool projected) const
TEveCompound * m_colorComp[kFWGeomColorSize]
const FWGeometry * getGeom() const
Definition: Context.h:84
FWColorManager * colorManager() const
Definition: Context.h:66
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
FWViewGeometryList::~FWViewGeometryList ( )
virtual

Definition at line 42 of file FWViewGeometryList.cc.

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

43 {
44  m_transpConnection.disconnect();
45  m_colorConnection.disconnect();
46  for (int i = 0; i < kFWGeomColorSize; ++i)
47  {
48  if (m_colorComp[i]) m_colorComp[i]->Destroy();
49  }
50 }
int i
Definition: DBlmapReader.cc:9
TEveCompound * m_colorComp[kFWGeomColorSize]
sigc::connection m_transpConnection
sigc::connection m_colorConnection
FWViewGeometryList::FWViewGeometryList ( const FWViewGeometryList )
private

Member Function Documentation

void FWViewGeometryList::addToCompound ( TEveElement *  el,
FWGeomColorIndex  idx,
bool  applyTransp = true 
) const
protected
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().

65 {
66  // printf("%p FWViewGeometryList::updateColors projected %d %s \n", this, m_projected, GetElementName());
67  for (int i = 0; i < kFWGeomColorSize; ++i)
68  {
71  m_colorComp[i]->ElementChanged();
72  }
73 }
int i
Definition: DBlmapReader.cc:9
Color_t geomTransparency(bool projected) const
TEveCompound * m_colorComp[kFWGeomColorSize]
FWColorManager * colorManager() const
Definition: Context.h:66
FWGeomColorIndex
Color_t geomColor(FWGeomColorIndex) const
const fireworks::Context & m_context
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().

77 {
78  // printf("%p transp [%d]\n", this, iTransp);
79 
80  if (projectedType == m_projected)
81  {
82  for (int i = 0; i < kFWGeomColorSize; ++i)
83  {
84  m_colorComp[i]->SetMainTransparency(m_context.colorManager()->geomTransparency(projectedType));
85  m_colorComp[i]->ElementChanged();
86  }
87  }
88 }
int i
Definition: DBlmapReader.cc:9
Color_t geomTransparency(bool projected) const
TEveCompound * m_colorComp[kFWGeomColorSize]
FWColorManager * colorManager() const
Definition: Context.h:66
const fireworks::Context & m_context

Member Data Documentation

TEveCompound* FWViewGeometryList::m_colorComp[kFWGeomColorSize]
protected
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
const FWGeometry* FWViewGeometryList::m_geom
protected
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().