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 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(), i, kFWGeomColorSize, m_colorComp, m_colorConnection, m_context, m_geom, m_projected, m_transpConnection, updateColors(), and updateTransparency().

22  :
23  m_context(context),
24  m_geom(0),
25  m_projected(projected)
26 {
27  m_geom = context.getGeom();
28 
29  for (int i = 0; i < kFWGeomColorSize; ++i)
30  {
31  m_colorComp[i] = new TEveCompound(Form("3D view color compund [%d]", i));
34  m_colorComp[i]->CSCApplyMainColorToAllChildren();
35  m_colorComp[i]->CSCApplyMainTransparencyToMatchingChildren();
36  }
39 }
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:83
FWColorManager * colorManager() const
Definition: Context.h:65
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 41 of file FWViewGeometryList.cc.

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

42 {
43  m_transpConnection.disconnect();
44  m_colorConnection.disconnect();
45  for (int i = 0; i < kFWGeomColorSize; ++i)
46  {
47  if (m_colorComp[i]) m_colorComp[i]->Destroy();
48  }
49 }
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 63 of file FWViewGeometryList.cc.

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

Referenced by FWViewGeometryList().

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

Definition at line 75 of file FWViewGeometryList.cc.

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

Referenced by FWViewGeometryList().

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