Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include "Alignment/CocoaModel/interface/OptOScreen.h"
00009 #include <iostream>
00010 #include <iomanip>
00011 #ifdef COCOA_VIS
00012 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h"
00013 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
00014 #endif
00015 #include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h"
00016 #include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.h"
00017
00018 using namespace CLHEP;
00019
00020
00021
00022
00023 void OptOScreen::defaultBehaviour( LightRay& lightray, Measurement& meas )
00024 {
00025
00026 }
00027 #ifdef COCOA_VIS
00028
00029
00030 void OptOScreen::fillVRML()
00031 {
00032
00033 ALIVRMLMgr& vrmlmgr = ALIVRMLMgr::getInstance();
00034 ALIColour* col = new ALIColour( 1., 0., 0.5, 0. );
00035 vrmlmgr.AddBox( *this, .6, .6, .1, col);
00036 vrmlmgr.SendReferenceFrame( *this, 0.6);
00037 vrmlmgr.SendName( *this, 0.01 );
00038 }
00039
00040
00041 void OptOScreen::fillIguana()
00042 {
00043 ALIColour* col = new ALIColour( 0., 1., 1., 0. );
00044 std::vector<ALIdouble> spar;
00045 spar.push_back(6.);
00046 spar.push_back(6.);
00047 spar.push_back(1.);
00048 IgCocoaFileMgr::getInstance().addSolid( *this, "BOX", spar, col);
00049 }
00050 #endif
00051
00052
00053
00054 void OptOScreen::constructSolidShape()
00055 {
00056 ALIdouble go;
00057 GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
00058 gomgr->getGlobalOptionValue("VisScale", go );
00059
00060 theSolidShape = new CocoaSolidShapeBox( "Box", go*8.*cm/m, go*8.*cm/m, go*1.*cm/m );
00061 }