亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? geode.cpp

?? 最新osg包
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/*  Code for writing AC3D format files, constructs one object per Geode * since geodes only have 1 material, and AC3D allows multiple materials you * may not get an exact vopy of an ac3d file used as input. * * originally by Roger James. * upgraded to different types of Geometry primitive by Geoff Michel. * Old GeoSet parsing code is commented out - will be removed eventually. */#include <assert.h>#include <list>#include <osg/Material>#include <osg/Texture2D>#include <osg/Drawable>#include <osg/Geometry>#include <limits>#include <iomanip>#include "Exception.h"#include "Geode.h"using namespace ac3d;using namespace std;void Geode::OutputVertex(int Index, const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices, ostream& fout){    int LocalTexIndex;    int LocalVertexIndex;    if (NULL == pVertexIndices)        LocalVertexIndex = Index;    else        LocalVertexIndex = pVertexIndices->index(Index);    if (NULL != pTexCoords)    {        // Got some tex coords        // Check for an index        if (NULL != pTexIndices)            // Access tex coord array indirectly            LocalTexIndex = pTexIndices->index(Index);        else            LocalTexIndex  = Index;        fout << LocalVertexIndex << " " << pTexCoords[LocalTexIndex][0] << " " << pTexCoords[LocalTexIndex][1] << std::endl;    }    else        fout << LocalVertexIndex << " 0 0" << std::endl;}void Geode::OutputLines(const int iCurrentMaterial, const unsigned int surfaceFlags,                            const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd; vindex+=2)    {        OutputSurfHead(iCurrentMaterial,surfaceFlags,2, fout);        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);        OutputVertex(vindex+1, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputLineStrip(const int iCurrentMaterial, const unsigned int surfaceFlags,                            const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    OutputSurfHead(iCurrentMaterial,surfaceFlags,indexEnd-drawArray->getFirst(), fout);    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd; ++vindex)    {        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputLineLoop(const int iCurrentMaterial, const unsigned int surfaceFlags,                            const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    OutputSurfHead(iCurrentMaterial,surfaceFlags,indexEnd-drawArray->getFirst(), fout);    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd; ++vindex)    {        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputTriangle(const int iCurrentMaterial, const unsigned int surfaceFlags,                            const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, ostream& fout){    unsigned int primCount = 0;    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd; ++vindex,++primCount)    {                if ((primCount%3) == 0)        {            OutputSurfHead(iCurrentMaterial,surfaceFlags,3, fout);        }        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputTriangleStrip(const int iCurrentMaterial, const unsigned int surfaceFlags,                             const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, std::ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    unsigned int evenodd=0;    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd-2; ++vindex, evenodd++)    {                OutputSurfHead(iCurrentMaterial,surfaceFlags,3, fout);        if (evenodd%2==0) {            OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);            OutputVertex(vindex+1, pVertexIndices, pTexCoords, pTexIndices, fout);        } else {            OutputVertex(vindex+1, pVertexIndices, pTexCoords, pTexIndices, fout);            OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);        }        OutputVertex(vindex+2, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputTriangleFan(const int iCurrentMaterial, const unsigned int surfaceFlags,                            const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, std::ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    for(unsigned int vindex=drawArray->getFirst()+1; vindex<indexEnd-1; ++vindex)    {        OutputSurfHead(iCurrentMaterial,surfaceFlags,3, fout);        OutputVertex(drawArray->getFirst(), pVertexIndices, pTexCoords, pTexIndices, fout);        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);        OutputVertex(vindex+1, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputQuads(const int iCurrentMaterial, const unsigned int surfaceFlags,                             const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, std::ostream& fout){    unsigned int primCount = 0;    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd; ++vindex,++primCount)    {                if ((primCount%4) == 0)        {            OutputSurfHead(iCurrentMaterial,surfaceFlags,4, fout);        }        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputQuadStrip(const int iCurrentMaterial, const unsigned int surfaceFlags,                             const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, std::ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd-2; vindex+=2)    {        OutputSurfHead(iCurrentMaterial,surfaceFlags,4, fout);        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);        OutputVertex(vindex+1, pVertexIndices, pTexCoords, pTexIndices, fout);        OutputVertex(vindex+3, pVertexIndices, pTexCoords, pTexIndices, fout);        OutputVertex(vindex+2, pVertexIndices, pTexCoords, pTexIndices, fout);    }}void Geode::OutputPolygon(const int iCurrentMaterial, const unsigned int surfaceFlags,                             const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrays* drawArray, std::ostream& fout){    unsigned int indexEnd = drawArray->getFirst() + drawArray->getCount();    OutputSurfHead(iCurrentMaterial,surfaceFlags,drawArray->getCount(), fout);    for(unsigned int vindex=drawArray->getFirst(); vindex<indexEnd; vindex++)    {        OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);    }}//=======  draw array length casesvoid Geode::OutputLineDARR(const int iCurrentMaterial, const unsigned int surfaceFlags,        const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrayLengths* drawArrayLengths, ostream& fout){    unsigned int vindex = drawArrayLengths->getFirst();    for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr <drawArrayLengths->end(); ++primItr)    {        unsigned int localPrimLength;        localPrimLength = 2;                for(GLsizei primCount = 0; primCount < *primItr; ++primCount)        {            if ((primCount%localPrimLength)==0)            {                OutputSurfHead(iCurrentMaterial,surfaceFlags,localPrimLength, fout);            }            OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);            ++vindex;        }            }}void Geode::OutputTriangleDARR(const int iCurrentMaterial, const unsigned int surfaceFlags,        const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrayLengths* drawArrayLengths, ostream& fout){    unsigned int vindex = drawArrayLengths->getFirst();    for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr <drawArrayLengths->end(); ++primItr)    {        unsigned int localPrimLength;        localPrimLength = 3;                for(GLsizei primCount = 0; primCount < *primItr; ++primCount)        {            if ((primCount%localPrimLength)==0)            {                OutputSurfHead(iCurrentMaterial,surfaceFlags,localPrimLength, fout);            }            OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);            ++vindex;        }            }}void Geode::OutputQuadsDARR(const int iCurrentMaterial, const unsigned int surfaceFlags,        const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrayLengths* drawArrayLengths, ostream& fout){    unsigned int vindex = drawArrayLengths->getFirst();    for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr <drawArrayLengths->end()-4; primItr+=4)    {        unsigned int localPrimLength;        localPrimLength = 4;                for(GLsizei primCount = 0; primCount < *primItr; ++primCount)        {            OutputSurfHead(iCurrentMaterial,surfaceFlags,localPrimLength, fout);            OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);            OutputVertex(vindex+1, pVertexIndices, pTexCoords, pTexIndices, fout);            OutputVertex(vindex+2, pVertexIndices, pTexCoords, pTexIndices, fout);            OutputVertex(vindex+3, pVertexIndices, pTexCoords, pTexIndices, fout);            vindex+=4;        }            }}void Geode::OutputQuadStripDARR(const int iCurrentMaterial, const unsigned int surfaceFlags,        const osg::IndexArray *pVertexIndices, const osg::Vec2 *pTexCoords, const osg::IndexArray *pTexIndices,const osg::DrawArrayLengths* drawArrayLengths, ostream& fout){    unsigned int vindex = drawArrayLengths->getFirst();    for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr <drawArrayLengths->end()-2; primItr+=2)    {        unsigned int localPrimLength;        localPrimLength = *primItr;                for(GLsizei primCount = 0; primCount < *primItr; ++primCount)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频一区二区中文字幕| 国产精品久久久久久久久图文区| 99re66热这里只有精品3直播| 日韩av电影免费观看高清完整版| 亚洲乱码日产精品bd| 国产精品人妖ts系列视频| 精品国产乱码久久久久久蜜臀 | 欧美高清一级片在线| 欧美性欧美巨大黑白大战| 一本色道久久加勒比精品| 91小视频免费观看| 色婷婷国产精品综合在线观看| 99久久精品免费| 色综合久久中文字幕综合网| 91久久精品一区二区| 欧美婷婷六月丁香综合色| 91福利社在线观看| 7777女厕盗摄久久久| 日韩一级大片在线| 久久久精品免费免费| 亚洲国产成人午夜在线一区| 亚洲摸摸操操av| 亚洲成人综合视频| 精品综合免费视频观看| 国产精品亚洲人在线观看| av欧美精品.com| 欧美日韩你懂得| 久久久久久久综合日本| 国产精品女主播av| 午夜精品福利一区二区三区av| 蜜桃久久久久久| eeuss影院一区二区三区| 欧洲精品一区二区| 欧美精品一区二区三区蜜桃视频| 久久男人中文字幕资源站| 中文字幕在线不卡| 日韩在线一区二区| 成人激情动漫在线观看| 欧美日韩久久久久久| 国产亚洲精久久久久久| 亚洲综合精品自拍| 国产一区高清在线| 精品婷婷伊人一区三区三| 国产网站一区二区| 天堂影院一区二区| av影院午夜一区| 精品国产一区二区三区忘忧草 | 奇米四色…亚洲| 99国产精品久久久久久久久久| 8x福利精品第一导航| 国产精品无人区| 视频一区二区国产| 91在线porny国产在线看| 日韩一区二区高清| 亚洲一区二区高清| 国产成人精品影视| 精品国产乱码久久久久久图片 | 不卡的看片网站| 日韩网站在线看片你懂的| 一区二区三区中文在线| 国产成人鲁色资源国产91色综| 欧美日本在线播放| 一区二区欧美在线观看| 成人国产在线观看| 国产亚洲一区字幕| 国产精品综合一区二区三区| 欧美一级免费大片| 亚洲aaa精品| 欧美日韩免费一区二区三区 | 久久福利资源站| 7777女厕盗摄久久久| 一二三区精品视频| 色噜噜久久综合| 亚洲精选在线视频| 色综合久久88色综合天天| 国产精品久线观看视频| 成人高清视频在线| 国产婷婷色一区二区三区四区| 精品一区二区综合| 精品裸体舞一区二区三区| 免费国产亚洲视频| 日韩女同互慰一区二区| 蜜桃91丨九色丨蝌蚪91桃色| 日韩欧美在线网站| 狠狠色丁香久久婷婷综合丁香| 欧美一区二区免费视频| 日韩精品成人一区二区三区| 欧美精品在线视频| 玖玖九九国产精品| 亚洲精品一区在线观看| 国产精品99久久久久久有的能看| 精品福利一区二区三区免费视频| 免费在线一区观看| 久久亚洲一区二区三区四区| 国产精品一区二区三区乱码| 国产精品色眯眯| 日本电影欧美片| 五月天精品一区二区三区| 91精品国模一区二区三区| 理论片日本一区| 国产精品视频在线看| 91极品美女在线| 日本欧美在线观看| 国产亚洲欧美中文| 色综合天天狠狠| 久久精品国产99| 亚洲欧洲国产日韩| 欧美日韩国产高清一区二区三区| 激情综合五月婷婷| 国产精品久久久久一区| 91九色02白丝porn| 精品一区免费av| 一级日本不卡的影视| 欧美一区二区日韩一区二区| 粉嫩aⅴ一区二区三区四区| 亚洲精品大片www| 精品久久久久99| 色欧美片视频在线观看| 久久精品72免费观看| 日韩伦理电影网| 欧美成人精品3d动漫h| 97久久超碰国产精品| 免费在线欧美视频| 一区二区三区蜜桃| 久久久久九九视频| 欧美高清你懂得| 91视频www| 精品无人码麻豆乱码1区2区| 亚洲免费观看视频| 国产三级三级三级精品8ⅰ区| 欧美性受xxxx| av在线不卡电影| 国产盗摄一区二区| 男女激情视频一区| 午夜国产不卡在线观看视频| 国产精品久久久久久久第一福利| 精品对白一区国产伦| 欧美网站大全在线观看| 91小视频免费看| 成人v精品蜜桃久久一区| 麻豆久久久久久| 日韩电影免费在线观看网站| 亚洲综合在线电影| 国产精品久久久久9999吃药| 精品国产乱码久久| 欧美电视剧在线观看完整版| 欧美日韩大陆在线| 欧美日韩一区成人| 欧美巨大另类极品videosbest| 色成年激情久久综合| 色综合久久久网| 99久久精品国产精品久久| 国产suv精品一区二区三区| 国产一区二区在线免费观看| 日韩成人免费看| 麻豆专区一区二区三区四区五区| 亚洲一区二区精品3399| 亚洲r级在线视频| 午夜精品福利久久久| 天堂一区二区在线| 偷拍一区二区三区| 蜜臀精品一区二区三区在线观看| 日本视频一区二区三区| 精品无人码麻豆乱码1区2区 | 亚洲一区二区三区免费视频| 亚洲一区二区在线观看视频| 亚洲mv在线观看| 蜜桃av噜噜一区| 国产成人午夜视频| av综合在线播放| av不卡在线观看| 欧美日韩一二三区| 欧美www视频| 国产精品天干天干在线综合| 国产精品国产自产拍高清av王其| 亚洲欧洲韩国日本视频| 性感美女极品91精品| 精品一区二区久久| 福利视频网站一区二区三区| 日本高清不卡视频| 日韩精品一区二区三区四区 | 欧美日韩综合不卡| 日韩一区二区在线免费观看| 中文字幕va一区二区三区| 亚洲欧美日本韩国| 日本成人在线网站| 波多野结衣中文一区| 欧美自拍丝袜亚洲| 精品剧情在线观看| 亚洲男帅同性gay1069| 美女视频一区在线观看| 99久久er热在这里只有精品66| 在线视频一区二区三区| 精品国产乱子伦一区| 亚洲综合在线免费观看| 激情偷乱视频一区二区三区| 欧美亚洲综合久久| 中文字幕精品在线不卡| 蜜乳av一区二区| 欧美在线综合视频|