00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef RETINAOSGUTIL_H_DEFINED
00039 #define RETINAOSGUTIL_H_DEFINED
00040
00041
00042 #ifndef HAVE_OSG
00043 #ifndef SKIP_ALL_OSG
00044 #define SKIP_ALL_OSG
00045 #endif
00046 #endif
00047
00048 #include "GUI/OSGText.H"
00049 #include "GUI/OSGUtil.H"
00050 #include "GUI/OSGViewUtil.H"
00051 #include "PointCloud/VirtualVoxel.H"
00052 #include <string>
00053
00054 #ifndef SKIP_ALL_OSG
00055 #include <osg/Camera>
00056 #include <osg/CameraNode>
00057
00058 #include <osgViewer/CompositeViewer>
00059
00060 #include <osgUtil/Optimizer>
00061 #include <osgUtil/SceneView>
00062 #include <osgDB/ReadFile>
00063
00064 #include "extra/URGENT/LabelGroundTruth/BaseComponent.h"
00065 #include "extra/URGENT/LabelGroundTruth/config.h"
00066 #include "extra/URGENT/LabelGroundTruth/RecolorPts.h"
00067 #include "extra/URGENT/LabelGroundTruth/RenderPts.h"
00068 #include "extra/URGENT/LabelGroundTruth/ronKeyboard.h"
00069 #include "extra/URGENT/LabelGroundTruth/ronTrackball.h"
00070 #include "extra/URGENT/LabelGroundTruth/SnapShot.h"
00071 #include "extra/URGENT/LabelGroundTruth/Terrain.h"
00072
00073
00074
00075 class RetinaOSGUtil : public OSGViewUtil
00076 {
00077 public:
00078 RetinaOSGUtil();
00079 ~RetinaOSGUtil();
00080
00081
00082 void readURGENTData(RenderPts& pts, Config& config,
00083 const std::string file) const;
00084
00085
00086 void printWorldData(RonTrackball &trackball) const;
00087
00088
00089 std::string handelError(OSGenum::Error error_enum, std::string extra) const;
00090
00091
00092 void setUpCameras(OSGViewUtil& util,
00093 GLenum& buffer,
00094 osgViewer::CompositeViewer& viewer,
00095 osg::ref_ptr<osg::GraphicsContext::Traits>& traits,
00096 osg::ref_ptr<osg::GraphicsContext> &gc,
00097 OSGView& baseView, OSGView& locationView,
00098 OSGView& depthView, OSGView& salientView,
00099 const OSGenum::DepthType depthType,
00100 const std::string WINDOW_NAME) const;
00101
00102
00103 void setUpPoints(const bool decimatePoints,
00104 const bool desatGround,
00105 const int decimateBins,
00106 const OSGenum::DepthType depthType,
00107 RecolorPts& recolorPts,
00108 OSGViewUtil& util,
00109 RenderPts& points,
00110 OSGView& baseView, OSGView& locationView,
00111 OSGView& depthView, OSGView& salientView,
00112 OSGRetinaPts& salientPts,
00113 OSGRetinaPts& newSalientPts,
00114 OSGRetinaPts& airLocationPts,
00115 OSGRetinaPts& groundLocationPts,
00116 OSGRetinaPts& airDepthPts,
00117 OSGRetinaPts& groundDepthPts,
00118 OSGRetinaPts& decimatePts,
00119 OSGRetinaPts& decimateLocatePts,
00120 OSGTextSet& textSet) const;
00121
00122
00123 void setHelpMenuText(OSGViewUtil& util,
00124 OSGTextSet& textSet) const;
00125
00126 protected:
00127 using OSGViewUtil::printTime;
00128 using OSGViewUtil::resetTime;
00129 using OSGViewUtil::itsName;
00130 using OSGViewUtil::itsOptimizer;
00131 using OSGViewUtil::itsTimer;
00132 using OSGViewUtil::itsT0;
00133 using OSGViewUtil::itsT1;
00134 using OSGViewUtil::itsT2;
00135 using OSGViewUtil::itsT3;
00136 using OSGViewUtil::itsGiveTimeSlice;
00137 using OSGViewUtil::itsSnapShotImage;
00138 using OSGViewUtil::itsGLImage;
00139 };
00140
00141 #endif //SKIP_ALL_OSG
00142 #endif