CMS 3D CMS Logo

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)
 
 ~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 Member Functions

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

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() [1/2]

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

Definition at line 22 of file FWViewGeometryList.cc.

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 }

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

◆ ~FWViewGeometryList()

FWViewGeometryList::~FWViewGeometryList ( )
override

Definition at line 39 of file FWViewGeometryList.cc.

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 }

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

◆ FWViewGeometryList() [2/2]

FWViewGeometryList::FWViewGeometryList ( const FWViewGeometryList )
privatedelete

Member Function Documentation

◆ addToCompound()

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

◆ operator=()

const FWViewGeometryList& FWViewGeometryList::operator= ( const FWViewGeometryList )
privatedelete

◆ updateColors()

void FWViewGeometryList::updateColors ( )

Definition at line 57 of file FWViewGeometryList.cc.

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 }

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

Referenced by FWViewGeometryList().

◆ updateTransparency()

void FWViewGeometryList::updateTransparency ( bool  projectedType)

Definition at line 66 of file FWViewGeometryList.cc.

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 }

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

Referenced by FWViewGeometryList().

Member Data Documentation

◆ m_colorComp

TEveCompound* FWViewGeometryList::m_colorComp[kFWGeomColorSize]
protected

◆ m_colorConnection

sigc::connection FWViewGeometryList::m_colorConnection
private

Definition at line 57 of file FWViewGeometryList.h.

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

◆ m_context

const fireworks::Context& FWViewGeometryList::m_context
protected

◆ m_geom

const FWGeometry* FWViewGeometryList::m_geom
protected

◆ m_projected

bool FWViewGeometryList::m_projected
private

Definition at line 58 of file FWViewGeometryList.h.

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

◆ m_transpConnection

sigc::connection FWViewGeometryList::m_transpConnection
private

Definition at line 56 of file FWViewGeometryList.h.

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

FWViewGeometryList::m_geom
const FWGeometry * m_geom
Definition: FWViewGeometryList.h:44
mps_fire.i
i
Definition: mps_fire.py:428
fireworks::Context::colorManager
FWColorManager * colorManager() const
Definition: Context.h:58
FWViewGeometryList::m_context
const fireworks::Context & m_context
Definition: FWViewGeometryList.h:43
FWColorManager::geomTransparency
Color_t geomTransparency(bool projected) const
Definition: FWColorManager.h:97
FWColorManager::geomColor
Color_t geomColor(FWGeomColorIndex) const
Definition: FWColorManager.cc:271
FWViewGeometryList::m_colorConnection
sigc::connection m_colorConnection
Definition: FWViewGeometryList.h:57
FWViewGeometryList::m_projected
bool m_projected
Definition: FWViewGeometryList.h:58
fireworks::Context::getGeom
FWGeometry * getGeom() const
Definition: Context.h:72
FWViewGeometryList::m_transpConnection
sigc::connection m_transpConnection
Definition: FWViewGeometryList.h:56
FWViewGeometryList::updateColors
void updateColors()
Definition: FWViewGeometryList.cc:57
FWViewGeometryList::updateTransparency
void updateTransparency(bool projectedType)
Definition: FWViewGeometryList.cc:66
FWColorManager::geomTransparencyHaveChanged_
sigc::signal< void, bool > geomTransparencyHaveChanged_
Definition: FWColorManager.h:103
kFWGeomColorSize
Definition: FWColorManager.h:42
FWColorManager::geomColorsHaveChanged_
sigc::signal< void > geomColorsHaveChanged_
Definition: FWColorManager.h:102
FWGeomColorIndex
FWGeomColorIndex
Definition: FWColorManager.h:32
FWViewGeometryList::m_colorComp
TEveCompound * m_colorComp[kFWGeomColorSize]
Definition: FWViewGeometryList.h:46