Changeset 341
- Timestamp:
- Apr 20, 2007, 9:32:23 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MEMPHYS/HEAD/applications/HitsCollectionAccessor.cxx
r242 r341 8 8 #include <Inventor/nodes/SoDrawStyle.h> 9 9 10 //#include <Inventor/nodes/SoCube.h> //FIXME11 //#include <Inventor/nodes/SoCylinder.h> //JEC 27/1/06 FIXME12 13 10 // HEPVis : 14 11 #include <HEPVis/SbPolyhedron.h> 15 12 #include <HEPVis/misc/SoStyleCache.h> 13 #include <HEPVis/misc/SoTools.h> 16 14 #include <HEPVis/nodes/SoHighlightMaterial.h> 17 #include <HEPVis/nodes/SoPolyhedron.h>18 15 19 16 #ifdef WIN32 … … 34 31 MEMPHYS::HitsCollectionAccessor::HitsCollectionAccessor( 35 32 Slash::Core::ISession& aSession 33 ,G4RunManager* aRunManager 36 34 ,const std::string& aHC 37 35 ) 38 :G4Lab::HitsCollectionAccessor(aSession,a HC)36 :G4Lab::HitsCollectionAccessor(aSession,aRunManager,aHC) 39 37 ////////////////////////////////////////////////////////////////////////////// 40 38 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// … … 69 67 separator->setName("sceneGraph"); 70 68 71 {G4Colour color; 69 {SoStyleCache* styleCache = fSoGC.getStyleCache(); 70 G4Colour color; 72 71 if(hitColor(*obj,color)) { 73 72 SbColor sbColor((float)color.GetRed(), … … 75 74 (float)color.GetBlue()); 76 75 float transp = 1.0F - (float)color.GetAlpha(); 77 SoStyleCache* styleCache = fSoGC.getStyleCache(); 76 //SbColor sbColor(1,0,0); 77 //float transp = 0; 78 78 79 separator->addChild( 79 80 styleCache->getHighlightMaterial … … 83 84 } 84 85 separator->addChild(fSoGC.getDrawStyle()); 85 separator->addChild(fSoGC.getLightModel());} 86 //separator->addChild(fSoGC.getLightModel()); 87 // Enforce base color (then suppress light effects) : 88 separator->addChild(styleCache->getLightModelBaseColor()); 89 } 86 90 87 91 {SoTransform* transform = new SoTransform; … … 103 107 104 108 //FIXME : PM base size : 105 //double WCPMTRadius = 0.10*m; // 20-cm PMTs (8-inch)109 //double WCPMTRadius = 0.10*m; // 20-cm PMTs (8-inch) 106 110 //JEC 27/1/06 double WCPMTRadius = 0.10*m; // 20-cm PMTs (8-inch) 107 double WCPMTRadius = 0.15*m; // PMTs (12-inch)111 float WCPMTRadius = 0.15F*m; // PMTs (12-inch) 108 112 109 /* 110 SoCylinder* soPMT = new SoCylinder; 111 soPMT->radius.setValue(WCPMTRadius); 112 soPMT->height.setValue(WCPMTRadius); 113 //JEC what's SoCylinder parts? 114 separator->addChild(soPMT); 115 */ 113 SbVec3f normal(0,0,1); 116 114 117 SbPolyhedronTube sbTube(0,WCPMTRadius,WCPMTRadius/2); 118 SoPolyhedron* soPMT = new SoPolyhedron(sbTube); 119 soPMT->setName(name); 120 //soPMT->radius.setValue(WCPMTRadius); 121 //soPMT->height.setValue(WCPMTRadius); 122 //JEC what's SoCylinder parts? 123 soPMT->setName(name); 124 separator->addChild(soPMT); 115 // half size : 116 float h = WCPMTRadius; 125 117 118 SbVec3f line[5]; 119 line[0].setValue(+h,-h,0); 120 line[1].setValue(+h,+h,0); 121 line[2].setValue(-h,+h,0); 122 line[3].setValue(-h,-h,0); 123 line[4].setValue(+h,-h,0); 124 SoTools::addPolygonToNode(separator,4,line,normal,""); 126 125 127 // SoCube* soCube = new SoCube;128 // soCube->width.setValue(WCPMTRadius);129 // soCube->height.setValue(WCPMTRadius);130 // soCube->depth.setValue(WCPMTRadius);131 // soCube->setName(name);132 133 // separator->addChild(soCube);134 135 126 fSoRegion->doIt(SbAddNode(separator,"dynamicScene")); 136 127 }
Note: See TracChangeset
for help on using the changeset viewer.