xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 3.76MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-08
  • 語言: 其他
  • 標簽: osg,pclply??

資源簡介

利用pcl讀取點云,osg顯示

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

int?main()
{
osg::ref_ptr?viewer?=?new?osgViewer::Viewer()?;
viewer->addEventHandler(new?osgGA::StateSetManipulator(viewer->getCamera()->getOrCreateStateSet()))?;
osg::ref_ptr?root?=?new?osg::Group()?;
//創建頂點數組
osg::ref_ptr?coords?=?new?osg::Vec3Array()?;
osg::ref_ptr?color?=?new?osg::Vec4Array()?;

pcl::PointCloud::Ptr?cloud(new?pcl::PointCloud)?;
if?(pcl::io::loadPLYFile(“3-1-2.ply“??*cloud)?==?-1)
{
std::cout<<“讀取點云失敗!\n“?;
return?-1?;
}
int?nums?=?cloud->size()?;
std::cout<<“點云數據:“< int?k?=?0?;
for?(int?i?=?0?;?i? {
coords->push_back(osg::Vec3(cloud->points[i].x??cloud->points[i].y??cloud->points[i].z))?;
color->push_back(osg::Vec4(1.0f??0.0f??0.0f??0.3f))?;
k++?;
}

//創建幾何體
osg::ref_ptr?geometry?=?new?osg::Geometry()?;
//設置頂點數組
geometry->setVertexArray(coords.get())?;
geometry->setColorArray(color.get())?;
geometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX)?;

osg::Vec3Array?*normals?=?new?osg::Vec3Array?;
normals->push_back(osg::Vec3(0.0f??1.0f??0.0f))?;
geometry->setNormalArray(normals)?;
geometry->setNormalBinding(osg::Geometry::BIND_OVERALL)?;
geometry->addPrimitiveSet(new?osg::DrawArrays(osg::PrimitiveSet::POINTS??0??k))?;?//設置關聯方式

//添加到葉節點
osg::ref_ptr?geode?=?new?osg::Geode()?;
geode->addDrawable(geometry.get())?;
root->addChild(geode.get())?;

//優化場景數據
osgUtil::Optimizer?optimizer?;
optimizer.optimize(root.get())?;
viewer->setSceneData(root.get())?;

viewer->realize()?;
viewer->run()?;

return?1?;
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-06-07?16:45??osg顯示點云\
?????目錄???????????0??2016-06-07?16:44??osg顯示點云\osg顯示點云\
?????文件??????681002??2016-06-04?22:34??osg顯示點云\osg顯示點云\3-1-2.ply
?????文件????????2168??2016-06-07?16:44??osg顯示點云\osg顯示點云\main.cpp
?????文件????????7253??2016-06-07?10:26??osg顯示點云\osg顯示點云\osg顯示點云.vcxproj
?????文件?????????942??2016-06-07?10:26??osg顯示點云\osg顯示點云\osg顯示點云.vcxproj.filters
?????目錄???????????0??2016-06-07?10:46??osg顯示點云\osg顯示點云\x64\
?????目錄???????????0??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\
?????文件??????312944??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\CL.read.1.tlog
?????文件?????????316??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\CL.write.1.tlog
?????文件????????1238??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\cl.command.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link-cvtres.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link-cvtres.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link-rc.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link-rc.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.11120-cvtres.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.11120-cvtres.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.11120-rc.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.11120-rc.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.11120.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.11120.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.6260-cvtres.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.6260-cvtres.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.6260-rc.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.6260-rc.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.6260.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.6260.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.7620-cvtres.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.7620-cvtres.write.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.7620-rc.read.1.tlog
?????文件???????????2??2016-06-07?16:36??osg顯示點云\osg顯示點云\x64\Debug\link.7620-rc.write.1.tlog
............此處省略18個文件信息

評論

共有 條評論

相關資源