#include <Iguana/GLBrowsers/interface/IgTwigConfigElement.h>
Public Member Functions | |
void | addDrawStyle (const std::string &name, SoDrawStyle *style, const std::string &type="") |
void | addMaterial (const std::string &name, SoMaterial *material, const std::string &type="") |
void | addVisibility (const std::string &name, bool visibility, const std::string &type="") |
SoDrawStyle * | drawStyle (const std::string &name, const std::string &type="") const |
const std::string & | getDrawStyleType () const |
const std::string & | getMaterialType () const |
const std::string & | getVisibilityType () const |
IgTwigConfigElement (IgState *state) | |
SoMaterial * | material (const std::string &name, const std::string &type="") const |
void | replaceDrawStyle (SoNode *node, const std::string &name, const std::string &type="") const |
void | replaceMaterial (SoNode *node, const std::string &name, const std::string &type="") const |
void | setDrawStyleType (const std::string &type="Default") |
void | setMaterialType (const std::string &type="Default") |
void | setVisibilityType (const std::string &type="Default") |
bool | visibility (const std::string &name, const std::string &type="") const |
~IgTwigConfigElement () | |
Private Types | |
typedef std::vector < DrawStyleInfo > | DrawStyle |
typedef std::pair< std::string, SoDrawStyle * > | DrawStyleInfo |
typedef std::map< std::string, DrawStyle > | DrawStyleMap |
typedef std::vector< MaterialInfo > | Material |
typedef std::pair< std::string, SoMaterial * > | MaterialInfo |
typedef std::map< std::string, Material > | MaterialMap |
typedef std::vector < VisibilityInfo > | Visibility |
typedef std::pair< std::string, bool > | VisibilityInfo |
typedef std::map< std::string, Visibility > | VisibilityMap |
Private Member Functions | |
void | addDrawStyleAlias (const std::string &alias, const std::string &to, const std::string &type="") |
void | addMaterialAlias (const std::string &alias, const std::string &to, const std::string &type="") |
SoDrawStyle * | findDrawStyle (const std::string &name, const std::string &type="") const |
SoMaterial * | findMaterial (const std::string &name, const std::string &type="") const |
bool | findVisibility (const std::string &name, const std::string &type="") const |
IG_DECLARE_STATE_ELEMENT (IgTwigConfigElement) | |
void | init () |
void | initDrawStyle () |
void | initMaterial () |
void | initVisibility () |
void | replaceDrawStyle_ (SoNode *oldNode, const SoDrawStyle *newNode) const |
void | replaceMaterial_ (SoNode *oldNode, const SoMaterial *newNode) const |
Private Attributes | |
DrawStyleMap | m_drawStyle |
std::string | m_drawStyleType |
MaterialMap | m_material |
std::string | m_materialType |
IgState * | m_state |
VisibilityMap | m_visibility |
std::string | m_visibilityType |
Definition at line 24 of file IgTwigConfigElement.h.
typedef std::vector<DrawStyleInfo> IgTwigConfigElement::DrawStyle [private] |
Definition at line 85 of file IgTwigConfigElement.h.
typedef std::pair<std::string, SoDrawStyle*> IgTwigConfigElement::DrawStyleInfo [private] |
Definition at line 82 of file IgTwigConfigElement.h.
typedef std::map<std::string,DrawStyle> IgTwigConfigElement::DrawStyleMap [private] |
Definition at line 88 of file IgTwigConfigElement.h.
typedef std::vector<MaterialInfo> IgTwigConfigElement::Material [private] |
Definition at line 84 of file IgTwigConfigElement.h.
typedef std::pair<std::string, SoMaterial*> IgTwigConfigElement::MaterialInfo [private] |
Definition at line 81 of file IgTwigConfigElement.h.
typedef std::map<std::string,Material> IgTwigConfigElement::MaterialMap [private] |
Definition at line 87 of file IgTwigConfigElement.h.
typedef std::vector<VisibilityInfo> IgTwigConfigElement::Visibility [private] |
Definition at line 86 of file IgTwigConfigElement.h.
typedef std::pair<std::string, bool> IgTwigConfigElement::VisibilityInfo [private] |
Definition at line 83 of file IgTwigConfigElement.h.
typedef std::map<std::string,Visibility> IgTwigConfigElement::VisibilityMap [private] |
Definition at line 89 of file IgTwigConfigElement.h.
IgTwigConfigElement::IgTwigConfigElement | ( | IgState * | state | ) |
Definition at line 61 of file IgTwigConfigElement.cc.
References ASSERT, init(), m_state, and IgState::put().
00062 : m_state (state), 00063 m_materialType ("Default"), 00064 m_drawStyleType("Default"), 00065 m_visibilityType ("Default") 00066 { 00067 ASSERT (m_state); 00068 m_state->put (s_key, this); 00069 init (); 00070 }
IgTwigConfigElement::~IgTwigConfigElement | ( | ) |
Definition at line 72 of file IgTwigConfigElement.cc.
References IgState::detach(), i, m_drawStyle, m_material, and m_state.
00073 { 00074 m_state->detach (s_key); 00075 for(MaterialMap::const_iterator itr=m_material.begin(); 00076 itr!=m_material.end (); itr++) 00077 { 00078 for(Material::const_iterator i=itr->second.begin(); 00079 i!=itr->second.end (); i++) 00080 i->second->unref(); 00081 } 00082 00083 for(DrawStyleMap::const_iterator itr=m_drawStyle.begin(); 00084 itr!=m_drawStyle.end (); itr++) 00085 { 00086 for(DrawStyle::const_iterator i=itr->second.begin(); 00087 i!=itr->second.end (); i++) 00088 i->second->unref(); 00089 } 00090 }
void IgTwigConfigElement::addDrawStyle | ( | const std::string & | name, | |
SoDrawStyle * | style, | |||
const std::string & | type = "" | |||
) |
Definition at line 143 of file IgTwigConfigElement.cc.
References FIX_DEFAULT_TYPE, m_drawStyle, m_drawStyleType, prof2calltree::prefix, and s.
Referenced by initDrawStyle().
00144 { 00145 FIX_DEFAULT_TYPE(m_drawStyleType); 00146 SoDrawStyle* s = dynamic_cast<SoDrawStyle*>(style->copy ()); 00147 s->ref(); 00148 m_drawStyle[prefix].push_back(DrawStyleInfo(name,s)); 00149 style->setToDefaults(); 00150 }
void IgTwigConfigElement::addDrawStyleAlias | ( | const std::string & | alias, | |
const std::string & | to, | |||
const std::string & | type = "" | |||
) | [private] |
Definition at line 955 of file IgTwigConfigElement.cc.
References ADD_SO_TWIG_CONFIG_ALIAS, and m_drawStyle.
00957 { ADD_SO_TWIG_CONFIG_ALIAS(m_drawStyle,DrawStyle); }
void IgTwigConfigElement::addMaterial | ( | const std::string & | name, | |
SoMaterial * | material, | |||
const std::string & | type = "" | |||
) |
Definition at line 133 of file IgTwigConfigElement.cc.
References FIX_DEFAULT_TYPE, m, m_material, m_materialType, and prof2calltree::prefix.
Referenced by initMaterial().
00134 { 00135 FIX_DEFAULT_TYPE(m_materialType); 00136 SoMaterial* m = dynamic_cast<SoMaterial*>(material->copy ()); 00137 m->ref(); 00138 m_material[prefix].push_back(MaterialInfo(name,m)); 00139 material->setToDefaults(); 00140 }
void IgTwigConfigElement::addMaterialAlias | ( | const std::string & | alias, | |
const std::string & | to, | |||
const std::string & | type = "" | |||
) | [private] |
Definition at line 950 of file IgTwigConfigElement.cc.
References ADD_SO_TWIG_CONFIG_ALIAS, and m_material.
Referenced by initMaterial().
00952 { ADD_SO_TWIG_CONFIG_ALIAS(m_material,Material); }
void IgTwigConfigElement::addVisibility | ( | const std::string & | name, | |
bool | visibility, | |||
const std::string & | type = "" | |||
) |
Definition at line 153 of file IgTwigConfigElement.cc.
References FIX_DEFAULT_TYPE, m_visibility, m_visibilityType, and prof2calltree::prefix.
Referenced by initVisibility().
00154 { 00155 FIX_DEFAULT_TYPE(m_visibilityType); 00156 m_visibility[prefix].push_back(VisibilityInfo(name,visibility)); 00157 }
SoDrawStyle * IgTwigConfigElement::drawStyle | ( | const std::string & | name, | |
const std::string & | type = "" | |||
) | const |
Definition at line 120 of file IgTwigConfigElement.cc.
References findDrawStyle(), and VarParsing::obj.
Referenced by initDrawStyle(), and replaceDrawStyle().
00121 { 00122 SoDrawStyle *obj = findDrawStyle (name,type); 00123 if (obj) 00124 obj = dynamic_cast<SoDrawStyle*>(obj->copy()); 00125 return obj; 00126 }
SoDrawStyle * IgTwigConfigElement::findDrawStyle | ( | const std::string & | name, | |
const std::string & | type = "" | |||
) | const [private] |
Definition at line 967 of file IgTwigConfigElement.cc.
References FIND_TWIG_CONFIG_OBJECT, and m_drawStyle.
Referenced by drawStyle().
00968 { 00969 FIND_TWIG_CONFIG_OBJECT(m_drawStyle,DrawStyle); 00970 return 0; 00971 }
SoMaterial * IgTwigConfigElement::findMaterial | ( | const std::string & | name, | |
const std::string & | type = "" | |||
) | const [private] |
Definition at line 960 of file IgTwigConfigElement.cc.
References FIND_TWIG_CONFIG_OBJECT, and m_material.
Referenced by material().
00961 { 00962 FIND_TWIG_CONFIG_OBJECT(m_material,Material); 00963 return 0; 00964 }
bool IgTwigConfigElement::findVisibility | ( | const std::string & | name, | |
const std::string & | type = "" | |||
) | const [private] |
Definition at line 974 of file IgTwigConfigElement.cc.
References FIND_TWIG_CONFIG_OBJECT, and m_visibility.
Referenced by visibility().
00975 { 00976 FIND_TWIG_CONFIG_OBJECT(m_visibility,Visibility); 00977 return false; 00978 }
const std::string & IgTwigConfigElement::getDrawStyleType | ( | ) | const |
Definition at line 104 of file IgTwigConfigElement.cc.
References m_drawStyleType.
00105 { return m_drawStyleType; }
const std::string & IgTwigConfigElement::getMaterialType | ( | ) | const |
Definition at line 101 of file IgTwigConfigElement.cc.
References m_materialType.
00102 { return m_materialType; }
const std::string & IgTwigConfigElement::getVisibilityType | ( | ) | const |
Definition at line 107 of file IgTwigConfigElement.cc.
References m_visibilityType.
00108 { return m_visibilityType; }
IgTwigConfigElement::IG_DECLARE_STATE_ELEMENT | ( | IgTwigConfigElement | ) | [private] |
Definition at line 160 of file IgTwigConfigElement.cc.
References initDrawStyle(), initMaterial(), and initVisibility().
Referenced by IgTwigConfigElement().
00161 { 00162 initMaterial (); 00163 initDrawStyle (); 00164 initVisibility (); 00165 }
void IgTwigConfigElement::initDrawStyle | ( | ) | [private] |
Definition at line 810 of file IgTwigConfigElement.cc.
References addDrawStyle(), and drawStyle().
Referenced by init().
00811 { 00812 SoDrawStyle *drawStyle = new SoDrawStyle; 00813 drawStyle->ref(); 00814 drawStyle->style.setValue (SoDrawStyleElement::LINES); 00815 00816 std::string type("Default"); 00817 addDrawStyle("*",drawStyle,type); 00818 00819 drawStyle->lineWidth.setValue(5); 00820 type = "Thick3"; 00821 addDrawStyle("*",drawStyle,type); 00822 00823 drawStyle->lineWidth.setValue(5); 00824 type = "Thick5"; 00825 addDrawStyle("*",drawStyle,type); 00826 00827 drawStyle->unref(); 00828 }
void IgTwigConfigElement::initMaterial | ( | ) | [private] |
Definition at line 168 of file IgTwigConfigElement.cc.
References addMaterial(), addMaterialAlias(), IgSbColorMap::hsv2rgb(), i, material(), IgSbColorMap::rgb2hsv(), and IgSbColorMap::unpack().
Referenced by init().
00169 { 00170 float rgbcomponents [4];float tmprgbcomponents [4]; 00171 SoMaterial *material = new SoMaterial; 00172 material->ref(); 00173 std::string type("Default"); 00174 00175 //DefaultMaterial 00176 addMaterial("Default",material,type); 00177 00178 //Start: Defaults from VisReco/CisDetector/ivs/*.iv files 00179 material->shininess.setValue(0.); 00180 material->transparency.setValue(0.); 00181 material->ambientColor.setValue (0.095, 0.095, 0.095); 00182 material->diffuseColor.setValue (0.372, 0.371, 0.373); 00183 material->specularColor.setValue(0.556, 0.554, 0.556); 00184 material->emissiveColor.setValue(0.500, 0.500, 0.500); 00185 addMaterial("*",material,"Gray"); 00186 00187 material->ambientColor.setValue(0.93905598, 0.00302124, 0.027419999); 00188 material->diffuseColor.setValue(0.704292, 0.0022659299, 0.020564999); 00189 material->specularColor.setValue(0.49999201, 0.49999201, 0.49999201); 00190 material->shininess.setValue(0.1); 00191 addMaterial("VisDetIvTwig/absorber-barrel-3d.gzip.iv",material,type); 00192 00193 material->ambientColor.setValue(1, 0.33333334, 0); 00194 material->diffuseColor.setValue(1, 0.33333334, 0); 00195 material->specularColor.setValue(1, 0.33333334, 0); 00196 material->emissiveColor.setValue(1, 0.33333334, 0); 00197 material->shininess.setValue(0); 00198 addMaterial("VisDetIvTwig/absorber-barrel-rphi.gzip.iv",material,type); 00199 00200 material->ambientColor.setValue(1, 0, 0); 00201 material->diffuseColor.setValue(1, 0, 0); 00202 material->specularColor.setValue(0.79000002, 0.83999997, 0.83999997); 00203 material->shininess.setValue(1); 00204 addMaterial("VisDetIvTwig/absorber-endcap-3d.gzip.iv",material,type); 00205 00206 material->ambientColor.setValue(1, 0, 0); 00207 material->diffuseColor.setValue(1, 0, 0); 00208 material->specularColor.setValue(1, 0, 0); 00209 material->emissiveColor.setValue(1, 0, 0); 00210 material->shininess.setValue(0); 00211 addMaterial("VisDetIvTwig/absorber-endcap-rz.gzip.iv",material,type); 00212 00213 material->ambientColor.setValue(0.094999999, 0.094999999, 0.094999999); 00214 material->diffuseColor.setValue(0.37200001, 0.37099999, 0.373); 00215 material->specularColor.setValue(0.55599999, 0.55400002, 0.55599999); 00216 material->emissiveColor.setValue(0.5, 0.5, 0.5); 00217 material->shininess.setValue(0.12800001); 00218 addMaterial("VisDetIvTwig/beampipe.gzip.iv",material,type); 00219 addMaterialAlias("VisDetIvTwig/ecal-preshower-3d.gzip.iv","VisDetIvTwig/beampipe.gzip.iv",type); 00220 00221 material->ambientColor.setValue(0.38, 1, 1); 00222 material->diffuseColor.setValue(0, 0.44, 0.75); 00223 material->shininess.setValue(0.1); 00224 material->transparency.setValue(0.49000001); 00225 addMaterial("VisDetIvTwig/csc-3d.gzip.iv",material,type); 00226 00227 material->ambientColor.setValue(0.63921571, 0.66666669, 0.68627453); 00228 material->diffuseColor.setValue(0.63921571, 0.66666669, 0.68627453); 00229 material->specularColor.setValue(0.63921571, 0.66666669, 0.68627453); 00230 material->emissiveColor.setValue(0.63921571, 0.66666669, 0.68627453); 00231 material->shininess.setValue(0); 00232 addMaterial("VisDetIvTwig/driftTubes-rphi.gzip.iv",material,type); 00233 addMaterialAlias("VisDetIvTwig/driftTubes-rz.gzip.iv","VisDetIvTwig/driftTubes-rphi.gzip.iv",type); 00234 addMaterialAlias("VisDetIvTwig/csc-rz.gzip.iv","VisDetIvTwig/driftTubes-rphi.gzip.iv",type); 00235 00236 material->ambientColor.setValue(0, 0, 0); 00237 material->diffuseColor.setValue(0, 0, 0); 00238 material->specularColor.setValue(0.63921571, 0.66666669, 0.68627453); 00239 material->emissiveColor.setValue(0.63921571, 0.66666669, 0.68627453); 00240 material->shininess.setValue(0.121); 00241 addMaterial("VisDetIvTwig/driftTubes-3d.gzip.iv",material,type); 00242 00243 00244 material->ambientColor.setValue(0.42352942, 0.43921569, 0.45490196); 00245 material->diffuseColor.setValue(0.42352942, 0.43921569, 0.45490196); 00246 material->specularColor.setValue(0.42352942, 0.43921569, 0.45490196); 00247 material->emissiveColor.setValue(0.42352942, 0.43921569, 0.45490196); 00248 material->shininess.setValue(0); 00249 addMaterial("VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",material,type); 00250 addMaterialAlias("VisDetIvTwig/driftTubes-superlayers-rphi.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00251 addMaterialAlias("VisDetIvTwig/driftTubes-superlayers-rz.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00252 addMaterialAlias("VisDetIvTwig/hcal-barrel-layers-rphi.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00253 addMaterialAlias("VisDetIvTwig/hcal-barrel-layers-rz.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00254 addMaterialAlias("VisDetIvTwig/hcal-barrel-rphi.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00255 addMaterialAlias("VisDetIvTwig/hcal-barrel-rz.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00256 addMaterialAlias("VisDetIvTwig/hcal-barrel-towers-rphi.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00257 addMaterialAlias("VisDetIvTwig/hcal-forward-rz.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00258 addMaterialAlias("VisDetIvTwig/tracker-barrel-rphi.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00259 addMaterialAlias("VisDetIvTwig/tracker-rz.gzip.iv","VisDetIvTwig/driftTubes-superlayer-details-rphi.gzip.iv",type); 00260 00261 material->ambientColor.setValue(0.704, 0.72100002, 0.72100002); 00262 material->diffuseColor.setValue(0.48199999, 0.48100001, 0.55199999); 00263 material->specularColor.setValue(0.83399999, 0.56599998, 0.54000002); 00264 material->emissiveColor.setValue(0.5, 0.5, 1); 00265 material->shininess.setValue(0.236); 00266 addMaterial("VisDetIvTwig/ecal-barrel-3d.gzip.iv",material,type); 00267 addMaterialAlias("VisDetIvTwig/ecal-forward-3d.gzip.iv","VisDetIvTwig/ecal-barrel-3d.gzip.iv",type); 00268 addMaterialAlias("VisDetIvTwig/hcal-outer-3d.gzip.iv","VisDetIvTwig/ecal-barrel-3d.gzip.iv",type); 00269 00270 00271 material->ambientColor.setValue(0, 0.66666669, 1); 00272 material->diffuseColor.setValue(0, 0.66666669, 1); 00273 material->specularColor.setValue(0, 0.66666669, 1); 00274 material->emissiveColor.setValue(0, 0.66666669, 1); 00275 material->shininess.setValue(0); 00276 addMaterial("VisDetIvTwig/ecal-barrel-rphi.gzip.iv",material,type); 00277 addMaterialAlias("VisDetIvTwig/ecal-rz.gzip.iv","VisDetIvTwig/ecal-barrel-rphi.gzip.iv",type); 00278 00279 00280 material->ambientColor.setValue(0.226, 0.13699999, 0.056000002); 00281 material->diffuseColor.setValue(0.90399998, 0.54900002, 0.22400001); 00282 material->specularColor.setValue(0.094999999, 0.094999999, 0.094999999); 00283 material->emissiveColor.setValue(0.40000001, 0.40000001, 0.2); 00284 material->shininess.setValue(0.078000002); 00285 addMaterial("VisDetIvTwig/hcal-barrel-3d.gzip.iv",material,type); 00286 addMaterialAlias("VisDetIvTwig/hcal-endcap-3d.gzip.iv","VisDetIvTwig/hcal-barrel-3d.gzip.iv",type); 00287 00288 material->ambientColor.setValue(0.0070000002, 0.0020000001, 0); 00289 material->diffuseColor.setValue(0.414, 0.074000001, 0); 00290 material->specularColor.setValue(1, 0.76700002, 0); 00291 material->emissiveColor.setValue(0.5, 0.5, 0.5); 00292 material->shininess.setValue(0.048); 00293 addMaterial("VisDetIvTwig/hcal-forward-3d.gzip.iv",material,type); 00294 00295 material->ambientColor.setValue(0, 0.018646499, 0); 00296 material->diffuseColor.setValue(0.58999997, 0.56, 0.56); 00297 material->specularColor.setValue(0.66000003, 0.66000003, 0.66000003); 00298 material->shininess.setValue(0.43000001); 00299 addMaterial("VisDetIvTwig/magnet-3d.gzip.iv",material,type); 00300 00301 material->ambientColor.setValue(0.66000003, 0.66000003, 0.66000003); 00302 material->diffuseColor.setValue(0.58999997, 0.56, 0.56); 00303 material->specularColor.setValue(0.66000003, 0.66000003, 0.66000003); 00304 material->emissiveColor.setValue(0.66000003, 0.66000003, 0.66000003); 00305 material->shininess.setValue(0); 00306 material->transparency.setValue(0); 00307 addMaterial("VisDetIvTwig/magnet-rphi.gzip.iv",material,type); 00308 addMaterialAlias("VisDetIvTwig/magnet-rz.gzip.iv","VisDetIvTwig/magnet-rphi.gzip.iv",type); 00309 00310 material->ambientColor.setValue(0.0039215689, 0.35294119, 1); 00311 material->diffuseColor.setValue(0.0039215689, 0.35294119, 1); 00312 material->specularColor.setValue(0.0039215689, 0.35294119, 1); 00313 material->emissiveColor.setValue(0.0039215689, 0.35294119, 1); 00314 material->shininess.setValue(-0.00073242188); 00315 addMaterial("VisDetIvTwig/rpc-barrel-3d.gzip.iv",material,type); 00316 addMaterialAlias("VisDetIvTwig/rpc-endcap-3d.gzip.iv","VisDetIvTwig/rpc-barrel-3d.gzip.iv",type); 00317 addMaterialAlias("VisDetIvTwig/rpc-endcap-rz.gzip.iv","VisDetIvTwig/rpc-barrel-3d.gzip.iv",type); 00318 00319 material->ambientColor.setValue(0, 0.40000001, 1); 00320 material->diffuseColor.setValue(0, 0.40000001, 1); 00321 material->specularColor.setValue(0, 0.40000001, 1); 00322 material->emissiveColor.setValue(0, 0.40000001, 1); 00323 addMaterial("VisDetIvTwig/rpc-barrel-rphi.gzip.iv",material,type); 00324 addMaterialAlias("VisDetIvTwig/rpc-barrel-rz.gzip.iv","VisDetIvTwig/rpc-barrel-rphi.gzip.iv",type); 00325 00326 //Start: VisEventIdTwig 00327 IgSbColorMap::unpack (0x8b898900, rgbcomponents); 00328 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00329 addMaterial("VisEventIdTwig/*",material,type); 00330 00331 //VisEventSetupService/Det 00332 material->ambientColor.setValue (0.88445997, 0.840042, 0.53582799); 00333 material->diffuseColor.setValue (0.66334498, 0.630032, 0.401871); 00334 material->specularColor.setValue (0.49999201, 0.49999201, 0.49999201); 00335 material->shininess.setValue (0.1); 00336 addMaterial("VisEventSetupService/Det/FullDet",material,type); 00337 00338 material->ambientColor.setValue (0.66334498, 0.66334498, 0.66334498); 00339 material->diffuseColor.setValue (0.66334498, 0.66334498, 0.66334498); 00340 material->specularColor.setValue (0.66334498, 0.66334498, 0.66334498); 00341 material->emissiveColor.setValue (0.66334498, 0.66334498, 0.66334498); 00342 addMaterial("VisEventSetupService/Det/Default",material,type); 00343 00344 //VisEventSetupService/HitDets 00345 material->ambientColor.setValue (1, 0.752941, 0.796078); 00346 material->diffuseColor.setValue (1, 0.752941, 0.796078); 00347 material->specularColor.setValue (1, 0.752941, 0.796078); 00348 material->emissiveColor.setValue (1, 0.752941, 0.796078); 00349 material->shininess.setValue (0); 00350 addMaterial("VisEventSetupService/HitDets/FullDet",material,type); 00351 00352 material->ambientColor.setValue (0.5490196, 0.0090196, 0.0090196); 00353 material->diffuseColor.setValue (0.5490196, 0.0090196, 0.0090196); 00354 material->specularColor.setValue (0.5490196, 0.0090196, 0.0090196); 00355 material->emissiveColor.setValue (0.5490196, 0.0090196, 0.0090196); 00356 material->shininess.setValue (0); 00357 addMaterial("VisEventSetupService/HitDets/Default",material,type); 00358 00359 //VisEventSetupService/* 00360 IgSbColorMap::unpack (0x59595900, rgbcomponents); 00361 material->ambientColor.setValue (SbColor (rgbcomponents)); 00362 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00363 material->specularColor.setValue (SbColor (rgbcomponents)); 00364 material->emissiveColor.setValue (SbColor (rgbcomponents)); 00365 material->shininess.setValue (0); 00366 addMaterial("VisEventSetupService/*",material,type); 00367 00369 //VisPixelDigiTwig 00370 material->diffuseColor.setValue (0.0, 0.0, 1.0); 00371 material->emissiveColor.setValue(0.0, 0.0, 1.0); 00372 addMaterial("VisPixelDigiTwig/3D",material,type); 00373 00374 material->diffuseColor.setValue (0.0, 1.0, 1.0); 00375 material->emissiveColor.setValue(0.0, 1.0, 1.0); 00376 addMaterial("VisPixelDigiTwig/3D/Cube",material,type); 00377 addMaterialAlias("VisPixelDigiTwig/RPhi","VisPixelDigiTwig/3D",type); 00378 00379 material->diffuseColor.setValue (0.3, 0.8, 0.0); 00380 addMaterial("VisPixelDigiTwig/RZ",material,type); 00381 00382 //VisDetTwig 00383 material->diffuseColor.setValue (0.0, 0.0, 0.0); 00384 addMaterial("VisDetTwig/*",material,type); 00385 00386 //VisTkIdealHelixTracksTwig 00387 material->diffuseColor.setValue (1.0, 0.0, 0.0); 00388 addMaterial("VisTkIdealHelixTracksTwig/*",material,type); 00389 00390 //VisTkRecTracksTwig 00391 IgSbColorMap::unpack (0x99ccff, rgbcomponents); 00392 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00393 addMaterial("VisTkRecTracksTwig/*",material,type); 00394 00395 //VisTrackerClusterTwig 00396 IgSbColorMap::unpack (0xccff0000, rgbcomponents); 00397 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00398 addMaterial("VisTrackerClusterTwig/RPhi/2",material,type); 00399 00400 IgSbColorMap::unpack (0x6600ff00, rgbcomponents); 00401 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00402 addMaterial("VisTrackerClusterTwig/*",material,type); 00403 00404 //VisTrackerRechit2DTwig 00405 material->diffuseColor.setValue (1.0, 1.0, 1.0); 00406 addMaterial("VisTrackerRechit2DTwig/*/2",material,type); 00407 00408 IgSbColorMap::unpack (0xde316300, rgbcomponents); 00409 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00410 addMaterial("VisTrackerRechit2DTwig/*",material,type); 00411 00412 //VisTrackerDigiTwig 00413 IgSbColorMap::unpack (0x03c03c00, rgbcomponents); 00414 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00415 addMaterial("VisTrackerDigiTwig/*",material,type); 00416 00417 //VisTrackingRecHitTwig 00418 IgSbColorMap::unpack (0xee2c2c, rgbcomponents); 00419 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00420 addMaterial("VisTrackingRecHitTwig/*",material,type); 00421 00422 //VisTrackerPiClusterTwig 00423 material->diffuseColor.setValue (0.0, 0.0, 1.0); 00424 material->emissiveColor.setValue(0.0, 0.0, 1.0); 00425 addMaterial("VisTrackerPiClusterTwig/*",material,type); 00426 00427 //VisTrackerPiDigiTwig 00428 material->diffuseColor.setValue (0.3, 0.8, 0.0); 00429 addMaterial("VisTrackerPiDigiTwig/RZ",material,type); 00430 00431 material->diffuseColor.setValue (0.0, 1.0, 0.0); 00432 material->emissiveColor.setValue(0.0, 1.0, 0.0); 00433 addMaterial("VisTrackerPiDigiTwig/*",material,type); 00434 00435 //VisTrackerPiRechitTwig 00436 material->diffuseColor.setValue (1.0, 0.0, 0.0); 00437 material->emissiveColor.setValue(1.0, 0.0, 0.0); 00438 addMaterial("VisTrackerPiRechitTwig/*",material,type); 00439 00440 //VisTrajectorySeedTwig 00441 material->diffuseColor.setValue (0.6, 1.0, 0.0); 00442 addMaterial("VisTrajectorySeedTwig/*",material,type); 00443 00444 //VisTrackerRechit2DMatchedTwig 00445 addMaterialAlias("VisTrackerRechit2DMatchedTwig/*","VisTrackerPiRechitTwig/*",type); 00446 00447 //General purpose ColorMap for: VisCaloJetTwig, VisBasicClusterCollectionTwig, VisGenJetCollectionTwig 00448 //VisJetTagTwig, VisSuperClusterCollectionTwig 00449 unsigned colour [10] = { 0xff000000, 0xffff0000, 0x00ff0000, // red yellow green 00450 0xff00ff00, 0x00ffff00, 0xd0dfff00, // magenta cyan 00451 0xff000fff, 0x00ffff00, 0xe00fff00, 00452 0xff00ee00}; 00453 for(int i=0;i<10;i++) 00454 { 00455 IgSbColorMap::unpack (colour[i], rgbcomponents); 00456 material->diffuseColor.setValue (rgbcomponents); 00457 addMaterial(std::string("ColorMap")+QString::number(i).latin1(),material,type); 00458 } 00459 00460 //VisBasicClusterCollectionTwig 00461 material->ambientColor.setValue (0.000, 0.000, 0.000); 00462 material->diffuseColor.setValue (1.000, 0.000, 0.000); 00463 material->emissiveColor.setValue (1.000, 0.000, 0.000); 00464 material->shininess.setValue(0.0); 00465 addMaterial("VisBasicClusterCollectionTwig/3D",material,type); 00466 00467 material->diffuseColor.setValue (0.2, 1.0, 0.4); 00468 addMaterial("VisBasicClusterCollectionTwig/RPhi/-ve",material,type); 00469 00470 material->diffuseColor.setValue (1.0, 0.0, 0.6); 00471 addMaterial("VisBasicClusterCollectionTwig/*",material,type); 00472 00473 //VisGenJetTwig 00474 IgSbColorMap::unpack (0x66330000, rgbcomponents); 00475 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00476 addMaterial("VisGenJetTwig/*",material,type); 00477 00478 //VisGsfTrackTwig 00479 IgSbColorMap::unpack (0x03C03C00, rgbcomponents); 00480 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00481 addMaterial("VisGsfTrackTwig/*/Direction",material,type); 00482 00483 IgSbColorMap::unpack (0xCD00CC00, rgbcomponents); 00484 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00485 addMaterial("VisGsfTrackTwig/*",material,type); 00486 00487 //VisSuperClusterCollectionTwig 00488 addMaterialAlias("VisSuperClusterCollectionTwig/3D", "VisBasicClusterCollectionTwig/3D",type); 00489 addMaterialAlias("VisSuperClusterCollectionTwig/RPhi/-ve","VisBasicClusterCollectionTwig/RPhi/-ve",type); 00490 addMaterialAlias("VisSuperClusterCollectionTwig/*", "VisBasicClusterCollectionTwig/*",type); 00491 00492 //VisBasicClusterTwig 00493 IgSbColorMap::unpack (0xff009c00, rgbcomponents); 00494 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00495 addMaterial("VisBasicClusterTwig/3D",material,type); 00496 addMaterialAlias("VisBasicClusterTwig/RPhi/-ve", "VisBasicClusterCollectionTwig/RPhi/-ve",type); 00497 addMaterialAlias("VisBasicClusterTwig/*", "VisBasicClusterCollectionTwig/*",type); 00498 00499 //VisSuperClusterTwig 00500 addMaterialAlias("VisSuperClusterTwig/3D", "VisBasicClusterTwig/3D",type); 00501 addMaterialAlias("VisSuperClusterTwig/RPhi/-ve", "VisBasicClusterTwig/RPhi/-ve",type); 00502 addMaterialAlias("VisSuperClusterTwig/*", "VisBasicClusterTwig/*",type); 00503 00504 //VisEcalRecHitTwig 00505 addMaterialAlias("VisEcalRecHitTwig/3D", "VisBasicClusterTwig/3D",type); 00506 addMaterialAlias("VisEcalRecHitTwig/RPhi/-ve", "VisBasicClusterTwig/RPhi/-ve",type); 00507 addMaterialAlias("VisEcalRecHitTwig/*", "VisBasicClusterTwig/*",type); 00508 00509 //VisEcalUncalibratedRecHitTwig 00510 addMaterialAlias("VisEcalUncalibratedRecHitTwig/RPhi/-ve", "VisEcalRecHitTwig/RPhi/-ve",type); 00511 addMaterialAlias("VisEcalUncalibratedRecHitTwig/*", "VisEcalRecHitTwig/*",type); 00512 00513 //VisHBHERecHitTwig 00514 IgSbColorMap::unpack (0x99ff0000, rgbcomponents); // snow4 00515 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00516 addMaterial("VisHBHERecHitTwig/3D",material,type); 00517 00518 material->diffuseColor.setValue (0.0, 0.4, 1.0); 00519 addMaterial("VisHBHERecHitTwig/RPhi/+ve",material,type); 00520 00521 material->diffuseColor.setValue (1.0, 0.0, 0.0); 00522 addMaterial("VisHBHERecHitTwig/RPhi/-ve",material,type); 00523 00524 addMaterialAlias("VisHBHERecHitTwig/RZ","VisHBHERecHitTwig/3D",type); 00525 addMaterialAlias("VisHBHERecHitTwig/RZ/Max","VisHBHERecHitTwig/RPhi/+ve",type); 00526 00527 //VisHFRecHitTwig 00528 addMaterialAlias("VisHFRecHitTwig/RZ/Max", "VisHBHERecHitTwig/RZ/Max",type); 00529 addMaterialAlias("VisHFRecHitTwig/*", "VisHBHERecHitTwig/3D",type); 00530 00531 //VisHORecHitTwig 00532 addMaterialAlias("VisHORecHitTwig/RZ/Max", "VisHBHERecHitTwig/RZ/Max",type); 00533 material->diffuseColor.setValue (0.0, 0.1, 1.0); 00534 addMaterial("VisHORecHitTwig/RPhi/+ve",material,type); 00535 00536 material->diffuseColor.setValue (1.0, 0.0, 0.0); 00537 addMaterial("VisHORecHitTwig/RPhi/-ve",material,type); 00538 addMaterialAlias("VisHORecHitTwig/*","VisHBHERecHitTwig/3D",type); 00539 00540 //VisCSCSeg2HETwig 00541 material->ambientColor.setValue (0.135, 0.2225, 0.1575); 00542 addMaterial("VisCSCSeg2HETwig/*",material,type); 00543 00544 //VisMETTwig 00545 material->diffuseColor.setValue (1, 0, 0); 00546 addMaterial("VisMETTwig/*",material,type); 00547 00548 //VisGenMETTwig 00549 addMaterialAlias("VisGenMETTwig/*","VisMETTwig/*",type); 00550 00551 //VisCaloMETTwig 00552 addMaterialAlias("VisCaloMETTwig/*","VisMETTwig/*",type); 00553 00554 //VisCSCALCTDigiTwig 00555 material->diffuseColor.setValue (0.0, 1.0, 0.0); 00556 material->emissiveColor.setValue (0.0, 1.0, 0.0); 00557 material->shininess.setValue (1.); 00558 addMaterial("VisCSCALCTDigiTwig/3D/Strip",material,type); 00559 00560 material->diffuseColor.setValue (0.3, 0.8, 0.0); 00561 addMaterial("VisCSCALCTDigiTwig/Lego/+ve",material,type); 00562 addMaterialAlias("VisCSCALCTDigiTwig/RPhi","VisCSCALCTDigiTwig/Lego/+ve",type); 00563 addMaterialAlias("VisCSCALCTDigiTwig/RZ", "VisCSCALCTDigiTwig/Lego/+ve",type); 00564 00565 material->diffuseColor.setValue (1.0, 1.0, 1.0); 00566 material->emissiveColor.setValue (1.0, 1.0, 1.0); 00567 addMaterial("VisCSCALCTDigiTwig/*",material,type); 00568 00569 //VisCSCCLCTDigiTwig 00570 addMaterialAlias("VisCSCCLCTDigiTwig/3D", "VisCSCALCTDigiTwig/*",type); 00571 addMaterialAlias("VisCSCCLCTDigiTwig/3D/Strip","VisCSCALCTDigiTwig/3D/Strip",type); 00572 addMaterialAlias("VisCSCCLCTDigiTwig/3D/Layer","VisCSCCLCTDigiTwig/3D",type); 00573 addMaterialAlias("VisCSCCLCTDigiTwig/Lego/+ve", "VisCSCALCTDigiTwig/Lego/+ve",type); 00574 addMaterialAlias("VisCSCCLCTDigiTwig/Lego/-ve", "VisCSCCLCTDigiTwig/3D",type); 00575 addMaterialAlias("VisCSCCLCTDigiTwig/RPhi", "VisCSCCLCTDigiTwig/Lego/+ve",type); 00576 addMaterialAlias("VisCSCCLCTDigiTwig/RZ", "VisCSCCLCTDigiTwig/RPhi",type); 00577 00578 //VisCSCCorrelatedLCTDigiTwig 00579 addMaterialAlias("VisCSCCorrelatedLCTDigiTwig/3D", "VisCSCALCTDigiTwig/*",type); 00580 addMaterialAlias("VisCSCCorrelatedLCTDigiTwig/3D/Strip","VisCSCALCTDigiTwig/3D/Strip",type); 00581 addMaterialAlias("VisCSCCorrelatedLCTDigiTwig/3D/Layer","VisCSCCorrelatedLCTDigiTwig/3D",type); 00582 addMaterialAlias("VisCSCCorrelatedLCTDigiTwig/RZ", "VisCSCALCTDigiTwig/RZ",type); 00583 00584 //VisCSCComparatorDigiTwig 00585 addMaterialAlias("VisCSCComparatorDigiTwig/3D","VisCSCALCTDigiTwig/*",type); 00586 00587 material->diffuseColor.setValue (0.1, 1.0, 0.4); 00588 material->emissiveColor.setValue (0.1, 1.0, 0.4); 00589 material->shininess.setValue (1.); 00590 addMaterial("VisCSCComparatorDigiTwig/3D/Strip",material,type); 00591 addMaterialAlias("VisCSCComparatorDigiTwig/3D/Layer","VisCSCComparatorDigiTwig/3D",type); 00592 addMaterialAlias("VisCSCComparatorDigiTwig/Lego/+ve", "VisCSCALCTDigiTwig/Lego/+ve",type); 00593 addMaterialAlias("VisCSCComparatorDigiTwig/Lego/-ve", "VisCSCComparatorDigiTwig/3D",type); 00594 addMaterialAlias("VisCSCComparatorDigiTwig/*", "VisCSCComparatorDigiTwig/Lego/+ve",type); 00595 00596 //VisCSCRPCDigiTwig 00597 addMaterialAlias("VisCSCRPCDigiTwig/3D", "VisCSCALCTDigiTwig/*",type); 00598 addMaterialAlias("VisCSCRPCDigiTwig/3D/Strip","VisCSCALCTDigiTwig/3D/Strip",type); 00599 addMaterialAlias("VisCSCRPCDigiTwig/3D/Layer","VisCSCRPCDigiTwig/3D",type); 00600 addMaterialAlias("VisCSCRPCDigiTwig/*", "VisCSCALCTDigiTwig/RPhi",type); 00601 00602 //VisCSCStripDigiTwig 00603 addMaterialAlias("VisCSCStripDigiTwig/3D","VisCSCALCTDigiTwig/*",type); 00604 00605 material->diffuseColor.setValue (0.7, 1.0, 0.0); 00606 material->emissiveColor.setValue (0.7, 1.0, 0.0); 00607 material->shininess.setValue (1.); 00608 addMaterial("VisCSCStripDigiTwig/3D/Strip",material,type); 00609 addMaterialAlias("VisCSCStripDigiTwig/3D/Layer","VisCSCStripDigiTwig/3D",type); 00610 addMaterialAlias("VisCSCStripDigiTwig/Lego/+ve", "VisCSCALCTDigiTwig/Lego/+ve",type); 00611 addMaterialAlias("VisCSCStripDigiTwig/Lego/-ve", "VisCSCStripDigiTwig/3D",type); 00612 addMaterialAlias("VisCSCStripDigiTwig/RPhi", "VisCSCStripDigiTwig/3D",type); 00613 addMaterialAlias("VisCSCStripDigiTwig/RPhi/Strip","VisCSCStripDigiTwig/3D/Strip",type); 00614 addMaterialAlias("VisCSCStripDigiTwig/RZ", "VisCSCALCTDigiTwig/RPhi",type); 00615 00616 material->diffuseColor.setValue (0.0, 0.0, 0.0); 00617 addMaterial("VisCSCStripDigiTwig/Spare",material,type); 00618 00619 material->diffuseColor.setValue (0.0, 1.0, 0.0); 00620 addMaterial("VisCSCStripDigiTwig/Spare/Matched/Strip",material,type); 00621 material->diffuseColor.setValue (0.0, 0.0, 0.0); 00622 addMaterial("VisCSCStripDigiTwig/Spare/Matched/Frame",material,type); 00623 material->diffuseColor.setValue (0.7, 1.0, 0.2); 00624 addMaterial("VisCSCStripDigiTwig/Spare/UnMatched/Strip",material,type); 00625 material->diffuseColor.setValue (0.6, 0.6, 0.6); 00626 addMaterial("VisCSCStripDigiTwig/Spare/UnMatched/Frame",material,type); 00627 00628 //VisRPCDigiTwig 00629 material->diffuseColor.setValue (1.0, 1.0, 2.0); 00630 material->emissiveColor.setValue (1.0, 1.0, 2.0); 00631 addMaterial("VisRPCDigiTwig/3D",material,type); 00632 00633 material->diffuseColor.setValue (1, 0.0, 0.0); 00634 material->emissiveColor.setValue (1, 0.0, 0.0); 00635 material->shininess.setValue (1.); 00636 addMaterial("VisRPCDigiTwig/3D/Strip",material,type); 00637 00638 material->diffuseColor.setValue (2.0, 1.0, 1.0); 00639 material->emissiveColor.setValue (2.0, 1.0, 1.0); 00640 addMaterial("VisRPCDigiTwig/3D/Layer/Trapezoidal",material,type); 00641 00642 material->diffuseColor.setValue (1.0, 0.0, 0.0); 00643 material->emissiveColor.setValue (1.0, 0.0, 0.0); 00644 addMaterial("VisRPCDigiTwig/3D/Layer/Rectangular",material,type); 00645 addMaterialAlias("VisRPCDigiTwig/RZ","VisCSCALCTDigiTwig/RZ",type); 00646 00647 00648 //VisCSCWireDigiTwig 00649 material->diffuseColor.setValue (1.0, 1.0, 1.0); 00650 material->emissiveColor.setValue (1.0, 1.0, 1.0); 00651 addMaterial("VisCSCWireDigiTwig/3D",material,type); 00652 00653 material->diffuseColor.setValue (0.3, 0.8, 0.0); 00654 addMaterial("VisCSCWireDigiTwig/RZ",material,type); 00655 00656 material->diffuseColor.setValue (0.5, 0.0, 1.0); 00657 material->emissiveColor.setValue (0.5, 0.0, 1.0); 00658 addMaterial("VisCSCWireDigiTwig/*/Wire",material,type); 00659 00660 material->diffuseColor.setValue (0.0, 0.0, 0.0); 00661 addMaterial("VisCSCWireDigiTwig/Spare",material,type); 00662 00663 material->diffuseColor.setValue (0.3, 0.0, 0.3); 00664 addMaterial("VisCSCWireDigiTwig/Spare/Matched/Wire",material,type); 00665 material->diffuseColor.setValue (0.0, 0.0, 0.0); 00666 addMaterial("VisCSCWireDigiTwig/Spare/Matched/Frame",material,type); 00667 material->diffuseColor.setValue (0.6, 0.0, 6.0); 00668 addMaterial("VisCSCWireDigiTwig/Spare/UnMatched/Wire",material,type); 00669 material->diffuseColor.setValue (0.6, 0.6, 0.6); 00670 addMaterial("VisCSCWireDigiTwig/Spare/UnMatched/Frame",material,type); 00671 addMaterialAlias("VisCSCWireDigiTwig/*","VisCSCWireDigiTwig/3D",type); 00672 00673 //VisDT2DSegmentTwig 00674 material->diffuseColor.setValue (0., 1., 0.); 00675 addMaterial("VisDT2DSegmentTwig/Common",material,type); 00676 00677 //VisDT4DSegmentTwig 00678 addMaterialAlias("VisDT4DSegmentTwig/Common","VisDT2DSegmentTwig/Common",type); 00679 IgSbColorMap::unpack (0xff000000, rgbcomponents); 00680 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00681 addMaterial("VisDT4DSegmentTwig/*",material,type); 00682 00683 //VisMuonTwig 00684 addMaterialAlias("VisMuonTwig/*","VisEventIdTwig/*",type); 00685 00686 //VisTrackTwig 00687 addMaterialAlias("VisTrackTwig/*","VisEventIdTwig/*",type); 00688 00689 //VisCSCSegmentTwig 00690 material->ambientColor.setValue (0.135, 0.2225, 0.1575); 00691 material->diffuseColor.setValue (1.00, 0.28, 0.49); 00692 material->specularColor.setValue (0.316228, 0.316228, 0.316228); 00693 material->emissiveColor.setValue(0.0, 0.0, 0.0); 00694 material->shininess.setValue(0.1); 00695 addMaterial("VisCSCSegmentTwig/*",material,type); 00696 00697 //VisDTDigiTwig/1 00698 IgSbColorMap::unpack (0x9900cc00, rgbcomponents); 00699 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00700 addMaterial("VisDTDigiTwig/1/3D",material,type); 00701 00702 IgSbColorMap::rgb2hsv (rgbcomponents, tmprgbcomponents); 00703 tmprgbcomponents [2] *= 0.5; 00704 IgSbColorMap::hsv2rgb (tmprgbcomponents, tmprgbcomponents); 00705 material->ambientColor.setValue (SbColor (tmprgbcomponents)); 00706 material->diffuseColor.setValue (SbColor (tmprgbcomponents)); 00707 material->specularColor.setValue (SbColor (tmprgbcomponents)); 00708 material->emissiveColor.setValue (SbColor (tmprgbcomponents)); 00709 addMaterial("VisDTDigiTwig/1/*/Wire",material,type); 00710 00711 material->ambientColor.setValue (SbColor (rgbcomponents)); 00712 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00713 material->specularColor.setValue (SbColor (rgbcomponents)); 00714 material->emissiveColor.setValue (SbColor (rgbcomponents)); 00715 addMaterial("VisDTDigiTwig/1/*/Frame",material,type); 00716 00717 addMaterialAlias("VisDTDigiTwig/Text","Default",type); 00718 00719 //VisDTDigiTwig/* 00720 IgSbColorMap::unpack (0x66ff0000, rgbcomponents); 00721 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00722 addMaterial("VisDTDigiTwig/*/3D",material,type); 00723 00724 IgSbColorMap::rgb2hsv (rgbcomponents, tmprgbcomponents); 00725 tmprgbcomponents [2] *= 0.5; 00726 IgSbColorMap::hsv2rgb (tmprgbcomponents, tmprgbcomponents); 00727 material->ambientColor.setValue (SbColor (tmprgbcomponents)); 00728 material->diffuseColor.setValue (SbColor (tmprgbcomponents)); 00729 material->specularColor.setValue (SbColor (tmprgbcomponents)); 00730 material->emissiveColor.setValue (SbColor (tmprgbcomponents)); 00731 addMaterial("VisDTDigiTwig/*/Wire",material,type); 00732 00733 material->ambientColor.setValue (SbColor (rgbcomponents)); 00734 material->diffuseColor.setValue (SbColor (rgbcomponents)); 00735 material->specularColor.setValue (SbColor (rgbcomponents)); 00736 material->emissiveColor.setValue (SbColor (rgbcomponents)); 00737 addMaterial("VisDTDigiTwig/*/Frame",material,type); 00738 00739 //VisCSCRecHit2DTwig 00740 material->ambientColor.setValue (0.135, 0.2225, 0.1575); 00741 material->diffuseColor.setValue (0.54, 0.89, 0.63); 00742 material->specularColor.setValue (0.316228, 0.316228, 0.316228); 00743 material->emissiveColor.setValue(0.0, 0.0, 0.0); 00744 material->shininess.setValue(0.1); 00745 addMaterial("VisCSCRecHit2DTwig/*",material,type); 00746 00747 //VisRPCRecHitTwig 00748 addMaterialAlias("VisRPCRecHitTwig/*","VisCSCRecHit2DTwig/*",type); 00749 00750 //VisCaptions 00751 material->diffuseColor.setValue (0.0, 0.0, 0.0); 00752 addMaterial("VisCaptions",material,type); 00753 material->diffuseColor.setValue (0.0, 0.0, 1.0); 00754 addMaterial("VisCaptions/Info",material,type); 00755 material->diffuseColor.setValue (1.0, 0.0, 0.0); 00756 addMaterial("VisCaptions/Text",material,type); 00757 00759 //VisTkSimTrackTwig 00760 material->diffuseColor.setValue (1.0, 1.0, 0.0); 00761 addMaterial("VisTkSimTrackTwig/*",material,type); 00762 00763 //VisTkSimHitTwig 00764 material->diffuseColor.setValue (1.0, 0.0, 1.0); 00765 material->emissiveColor.setValue(1.0, 0.0, 1.0); 00766 addMaterial("VisTkSimHitTwig/3D",material,type); 00767 00768 material->diffuseColor.setValue (1.0, 0.0, 1.0); 00769 addMaterial("VisTkSimHitTwig/RPhi",material,type); 00770 00771 material->diffuseColor.setValue (0.3, 0.8, 0.0); 00772 addMaterial("VisTkSimHitTwig/RZ",material,type); 00773 00774 //VisSimVertexTwig 00775 material->diffuseColor.setValue (1.0, 0.0, 1.0); 00776 material->emissiveColor.setValue(1.0, 0.0, 1.0); 00777 addMaterial("VisSimVertexTwig/*",material,type); 00778 00779 //VisSimTrackTwig 00780 material->ambientColor.setValue (0.000, 0.000, 0.000); 00781 material->diffuseColor.setValue (1.000, 1.000, 0.000); 00782 material->emissiveColor.setValue (1.000, 1.000, 0.000); 00783 material->specularColor.setValue (0.000, 0.000, 0.000); 00784 material->shininess.setValue (0.0); 00785 material->transparency.setValue (0.0); 00786 addMaterial("VisSimTrackTwig/*",material,type); 00787 00788 //VisPSimHitTwig 00789 material->diffuseColor.setValue (0.0, 0.0, 1.0); 00790 material->emissiveColor.setValue(0.0, 0.0, 1.0); 00791 addMaterial("VisPSimHitTwig/*",material,type); 00792 00793 //VisPCaloHitTwig 00794 material->diffuseColor.setValue (0.0, 0.0, 1.0); 00795 addMaterial("VisPCaloHitTwig/3D",material,type); 00796 00797 material->diffuseColor.setValue (0.6, 0.2, 0.8); 00798 addMaterial("VisPCaloHitTwig/Hcal/*",material,type); 00799 00800 material->diffuseColor.setValue (1.0 , 0.0, 0.6); 00801 addMaterial("VisPCaloHitTwig/Ecal/*",material,type); 00802 00803 material->diffuseColor.setValue (0.2, 1.0, 0.4); 00804 addMaterial("VisPCaloHitTwig/RZ",material,type); 00805 00806 material->unref(); 00807 }
void IgTwigConfigElement::initVisibility | ( | ) | [private] |
Definition at line 831 of file IgTwigConfigElement.cc.
References addVisibility().
Referenced by init().
00832 { 00833 addVisibility("*",false,"None"); 00834 addVisibility("*",true,"All"); 00835 00836 std::string type("Default"); 00837 addVisibility("VisDetIvTwig/*",false,type); 00838 00839 /*std::string prefix("/Objects/CMS Event and Detector/"); 00840 addVisibility(prefix+"Muon/Barrel/Drift Tubes",false,type); 00841 addVisibility(prefix+"Muon/Barrel/Drift Tubes/Drift Tubes Superlayers",false,type); 00842 addVisibility(prefix+"Muon/Barrel/Drift Tubes/Drift Tubes Superlayers/Drift Tubes Superlayers (details)",false,type); 00843 addVisibility(prefix+"Muon/Barrel/RPCs",false,type); 00844 addVisibility(prefix+"Muon/Barrel/Absorber",false,type); 00845 addVisibility(prefix+"Muon/Endcap/CSCs",false,type); 00846 addVisibility(prefix+"Muon/Endcap/RPCs",false,type); 00847 addVisibility(prefix+"Muon/Endcap/Absorber",false,type); 00848 addVisibility(prefix+"ECAL/Barrel",false,type); 00849 addVisibility(prefix+"ECAL/Forward",false,type); 00850 addVisibility(prefix+"ECAL/Preshower",false,type); 00851 addVisibility(prefix+"HCAL/Barrel",false,type); 00852 addVisibility(prefix+"HCAL/Barrel/Barrel Layers",false,type); 00853 addVisibility(prefix+"HCAL/Barrel/Towers",false,type); 00854 addVisibility(prefix+"HCAL/Endcap",false,type); 00855 addVisibility(prefix+"HCAL/Forward",false,type); 00856 addVisibility(prefix+"HCAL/Outer",false,type); 00857 addVisibility(prefix+"Tracker/Tracker",false,type); 00858 addVisibility(prefix+"Beampipe",false,type); 00859 addVisibility(prefix+"Magnet",false,type); 00860 */ 00861 }
SoMaterial * IgTwigConfigElement::material | ( | const std::string & | name, | |
const std::string & | type = "" | |||
) | const |
Definition at line 111 of file IgTwigConfigElement.cc.
References findMaterial(), and VarParsing::obj.
Referenced by initMaterial(), and replaceMaterial().
00112 { 00113 SoMaterial *obj = findMaterial (name,type); 00114 if (obj) 00115 obj = dynamic_cast<SoMaterial*>(obj->copy()); 00116 return obj; 00117 }
void IgTwigConfigElement::replaceDrawStyle | ( | SoNode * | node, | |
const std::string & | name, | |||
const std::string & | type = "" | |||
) | const |
Definition at line 878 of file IgTwigConfigElement.cc.
References drawStyle(), and replaceDrawStyle_().
00880 { 00881 SoDrawStyle* newNode = drawStyle(name,type); 00882 if (newNode) 00883 { 00884 newNode->ref(); 00885 replaceDrawStyle_(node,newNode); 00886 newNode->unref(); 00887 } 00888 }
void IgTwigConfigElement::replaceDrawStyle_ | ( | SoNode * | oldNode, | |
const SoDrawStyle * | newNode | |||
) | const [private] |
Definition at line 915 of file IgTwigConfigElement.cc.
Referenced by replaceDrawStyle().
00916 { 00917 if (oldNode->isOfType(SoDrawStyle::getClassTypeId ())) 00918 { 00919 SoDrawStyle* oldDrawStyle = dynamic_cast<SoDrawStyle*>(oldNode); 00920 int oldstyle = oldDrawStyle->style.getValue (); 00921 if (oldstyle == newNode->style.getValue ()) 00922 { 00923 switch (oldstyle) 00924 { 00925 case SoDrawStyle::LINES: 00926 oldDrawStyle->lineWidth = newNode->lineWidth; 00927 oldDrawStyle->linePattern = newNode->linePattern; 00928 break; 00929 case SoDrawStyle::POINTS: 00930 oldDrawStyle->pointSize = newNode->pointSize; 00931 break; 00932 default: 00933 break; 00934 } 00935 } 00936 return; 00937 } 00938 00939 if (oldNode->isOfType(SoGroup::getClassTypeId ())) 00940 { 00941 SoGroup* group = dynamic_cast<SoGroup*>(oldNode); 00942 int children = group->getNumChildren (); 00943 for(int i = 0; i < children; i++) 00944 replaceDrawStyle_ (group->getChild (i), newNode); 00945 } 00946 }
void IgTwigConfigElement::replaceMaterial | ( | SoNode * | node, | |
const std::string & | name, | |||
const std::string & | type = "" | |||
) | const |
Definition at line 864 of file IgTwigConfigElement.cc.
References material(), and replaceMaterial_().
00866 { 00867 SoMaterial* newNode = material(name,type); 00868 if (newNode) 00869 { 00870 newNode->ref(); 00871 replaceMaterial_(node,newNode); 00872 newNode->unref(); 00873 } 00874 }
void IgTwigConfigElement::replaceMaterial_ | ( | SoNode * | oldNode, | |
const SoMaterial * | newNode | |||
) | const [private] |
Definition at line 891 of file IgTwigConfigElement.cc.
Referenced by replaceMaterial().
00892 { 00893 if (oldNode->isOfType(SoMaterial::getClassTypeId ())) 00894 { 00895 SoMaterial* oldMaterial = dynamic_cast<SoMaterial*>(oldNode); 00896 oldMaterial->shininess = newNode->shininess; 00897 oldMaterial->transparency = newNode->transparency; 00898 oldMaterial->ambientColor = newNode->ambientColor; 00899 oldMaterial->diffuseColor = newNode->diffuseColor; 00900 oldMaterial->specularColor = newNode->specularColor; 00901 oldMaterial->emissiveColor = newNode->emissiveColor; 00902 return; 00903 } 00904 00905 if (oldNode->isOfType(SoGroup::getClassTypeId ())) 00906 { 00907 SoGroup* group = dynamic_cast<SoGroup*>(oldNode); 00908 int children = group->getNumChildren (); 00909 for(int i = 0; i < children; i++) 00910 replaceMaterial_ (group->getChild (i), newNode); 00911 } 00912 }
void IgTwigConfigElement::setDrawStyleType | ( | const std::string & | type = "Default" |
) |
Definition at line 95 of file IgTwigConfigElement.cc.
References m_drawStyleType.
00096 { m_drawStyleType = type; }
void IgTwigConfigElement::setMaterialType | ( | const std::string & | type = "Default" |
) |
Definition at line 92 of file IgTwigConfigElement.cc.
References m_materialType.
00093 { m_materialType = type; }
void IgTwigConfigElement::setVisibilityType | ( | const std::string & | type = "Default" |
) |
Definition at line 98 of file IgTwigConfigElement.cc.
References m_visibilityType.
00099 { m_visibilityType = type; }
bool IgTwigConfigElement::visibility | ( | const std::string & | name, | |
const std::string & | type = "" | |||
) | const |
Definition at line 129 of file IgTwigConfigElement.cc.
References findVisibility().
00130 { return findVisibility (name,type); }
DrawStyleMap IgTwigConfigElement::m_drawStyle [private] |
Definition at line 92 of file IgTwigConfigElement.h.
Referenced by addDrawStyle(), addDrawStyleAlias(), findDrawStyle(), and ~IgTwigConfigElement().
std::string IgTwigConfigElement::m_drawStyleType [private] |
Definition at line 78 of file IgTwigConfigElement.h.
Referenced by addDrawStyle(), getDrawStyleType(), and setDrawStyleType().
MaterialMap IgTwigConfigElement::m_material [private] |
Definition at line 91 of file IgTwigConfigElement.h.
Referenced by addMaterial(), addMaterialAlias(), findMaterial(), and ~IgTwigConfigElement().
std::string IgTwigConfigElement::m_materialType [private] |
Definition at line 77 of file IgTwigConfigElement.h.
Referenced by addMaterial(), getMaterialType(), and setMaterialType().
IgState* IgTwigConfigElement::m_state [private] |
Definition at line 76 of file IgTwigConfigElement.h.
Referenced by IgTwigConfigElement(), and ~IgTwigConfigElement().
Definition at line 93 of file IgTwigConfigElement.h.
Referenced by addVisibility(), and findVisibility().
std::string IgTwigConfigElement::m_visibilityType [private] |
Definition at line 79 of file IgTwigConfigElement.h.
Referenced by addVisibility(), getVisibilityType(), and setVisibilityType().