VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtOsgPerformanceStatsOverlay.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2012 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvOsg/vrvOsg.h>
00013 
00014 #include <osg/ref_ptr>
00015 
00016 #include <string>
00017 #include <vector>
00018 
00019 namespace osg
00020 {
00021    class FrameStamp;
00022 }
00023 
00024 namespace makVrv
00025 {
00026    class DtOsgRenderer;
00027    class DtWindowTextAgent;
00028    class DtStatsSet;
00029 
00032    class DT_DLL_VRVOSG DtOsgPerformanceStatsOverlay
00033    {
00034    public:
00035 
00037       const static unsigned int overlayLayerId = 33;
00038 
00040       DtOsgPerformanceStatsOverlay(DtDe& de, DtOsgRenderer& renderer, const DtStatsSet& statsSet);
00041 
00043       void addLabel(const std::string& name, double left, double top);
00044       
00046       ~DtOsgPerformanceStatsOverlay();
00047 
00049       virtual void updateCallback();
00050 
00051    protected:
00052 
00054       DtWindowTextAgent* makeLabel();
00055 
00056    private:
00057 
00058       DtDe& myDe;
00059       DtOsgRenderer& myRenderer;
00060       const char* myTickFormatString;
00061 
00062       struct LabelParameters
00063       {
00064          std::string name;
00065          double value;
00066          DtWindowTextAgent*  label;
00067       };
00068 
00069       int myFrame;
00070 
00071       std::vector<LabelParameters> myLabels;
00072       
00073       const DtStatsSet& myStatsSet;
00074    };
00075 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)