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
00019
00020
00021 void OptOScreen::defaultBehaviour( LightRay& lightray, Measurement& meas )
00022 {
00023
00024 }
00025 #ifdef COCOA_VIS
00026
00027
00028 void OptOScreen::fillVRML()
00029 {
00030
00031 ALIVRMLMgr& vrmlmgr = ALIVRMLMgr::getInstance();
00032 ALIColour* col = new ALIColour( 1., 0., 0.5, 0. );
00033 vrmlmgr.AddBox( *this, .6, .6, .1, col);
00034 vrmlmgr.SendReferenceFrame( *this, 0.6);
00035 vrmlmgr.SendName( *this, 0.01 );
00036 }
00037
00038
00039 void OptOScreen::fillIguana()
00040 {
00041 ALIColour* col = new ALIColour( 0., 1., 1., 0. );
00042 std::vector<ALIdouble> spar;
00043 spar.push_back(6.);
00044 spar.push_back(6.);
00045 spar.push_back(1.);
00046 IgCocoaFileMgr::getInstance().addSolid( *this, "BOX", spar, col);
00047 }
00048 #endif
00049
00050
00051
00052 void OptOScreen::constructSolidShape()
00053 {
00054 ALIdouble go;
00055 GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
00056 gomgr->getGlobalOptionValue("VisScale", go );
00057
00058 theSolidShape = new CocoaSolidShapeBox( "Box", go*8.*cm/m, go*8.*cm/m, go*1.*cm/m );
00059 }