91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-04
  • 語言: 其他
  • 標(biāo)簽: osgvc曲線??

資源簡(jiǎn)介

本例子提供頭文件和源文件,里面是osg畫實(shí)時(shí)曲線的代碼

資源截圖

代碼片段和文件信息

#include?“StdAfx.h“
#include?“OSGPlusLineChart.h“
#include?“osg/Geode“
#include?“osg/Referenced“
#include?“osgDB/ReadFile“
#include?“osg/BlendFunc“
#include?“osg/AlphaFunc“
#include?“osg/MatrixTransform“
#include?“osg/ShapeDrawable“
#include?“Tools/CustomTools/CustomTools.h“
#include?“Tools/Util/UtilString.h“
#include?“EqmDrawLineGraphic.h“
#include?“../ServerDataAccess/UPPCServerDataAccess.h“
#include?“time.h“

//常量定義
static?const?int?STATIC_title_X_TO_RECTANGLE_LEFT?=?30;
static?const?int?STATIC_GRIDLINE_GAP?=?10;
static?const?int?STATIC_SCALE_TEXT_NUM?=?5;
static?const?int?STATIC_TEXT_SCALE_TOP_TO_SCALE_LINE?=?5;
static?const?int?STATIC_TEXT_SCALE_LEFT_TO_SCALE_LINE?=?40;
static?const?int?STATIC_TIME_SCALE_LEFT_TO_SCALE_LINE?=?20;
static?const?double?STATIC_EPS?=?1e-9;
static?const?double?STATIC_PIXEL_PER_2SECOND?=?(double)(STATIC_GRIDLINE_GAP*10)/(double)360.0f;
static?const?double?STATIC_layer?=?0.3f;
//外部引用
extern?SYSTEMTIME?Time_tToSystemTime(time_t?t);
extern?time_t?SystemTimeToTime_t(?const?SYSTEMTIME&?st?);

COSGPlusLineChart::COSGPlusLineChart(double?fPosX?double?fPosYdouble?fWidth?double?fHeight?wstring?strXName?wstring?strYName?wstring?strtitle?CEqmDrawLineGraphic*?pLineGraphic)
:COSGPlusUnit(fPosX?fPosY?fWidth?fHeight?STATIC_layer)
m_strXAxisName(strXName)
m_strYAxisName(strYName)
m_strChartName(strtitle)
m_pLineGraphic(pLineGraphic)
m_nUpdateInterval(0)
m_nTimeAccumulate(0)
m_dMaxValue(0.0f)
{
m_pUPPCServerDataAccess?=?NULL;
m_fPosX?=?m_fPosX?-?fWidth/2+20;
m_fPosY?=?m_fPosY?-?fHeight/2;
m_fWidth?-=?90;
m_nUpdateInterval?=?m_pLineGraphic->GetUpdateInterval();
Createtitle();
CreateAxis();
CreateGrid();
CreateYScale();
CreateXScale();
CreateLines();
CraeteLegend();
}


COSGPlusLineChart::~COSGPlusLineChart(void)
{
}


void?COSGPlusLineChart::CreateAxis()
{
osg::ref_ptr?geodeAxis =?new?osg::Geode;
addChild(geodeAxis);

osg::ref_ptr?lineGeometry?=?new?osg::Geometry;
geodeAxis->addDrawable(lineGeometry);

osg::ref_ptr?lineVertice?=?new?osg::Vec3Array;
lineGeometry->setVertexArray(lineVertice);
lineVertice->push_back(osg::Vec3(m_fPosXm_fPosYSTATIC_layer));
lineVertice->push_back(osg::Vec3(m_fPosX+m_fWidthm_fPosYSTATIC_layer));
lineVertice->push_back(osg::Vec3(m_fPosX+m_fWidthm_fPosY+m_fHeight-STATIC_title_X_TO_RECTANGLE_LEFTSTATIC_layer));
lineVertice->push_back(osg::Vec3(m_fPosXm_fPosY+m_fHeight-STATIC_title_X_TO_RECTANGLE_LEFTSTATIC_layer));

osg::ref_ptr?tempAxisBound?=?new?osg::DrawElementsUInt(osg::PrimitiveSet::LINE_LOOP?0);
for?(size_t?i=0;isize();++i)
{
tempAxisBound->push_back(i);
}
lineGeometry->addPrimitiveSet(tempAxisBound);
osg::ref_ptr?HUDnormals?=?new?osg::Vec3Array;
HUDnormals->push_back(osg::Vec3(0.0f0.0f1.0f));
osg::Vec4Array*?colarray?=?new?osg::Vec4Array;
colarray->push_bac

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????21234??2013-12-12?13:54??OSGPlusLineChart.cpp

?????文件???????3093??2013-12-11?10:27??OSGPlusLineChart.h

-----------?---------??----------?-----??----

????????????????24327????????????????????2


評(píng)論

共有 條評(píng)論

相關(guān)資源