当前位置: 首页 > news >正文

wordpress网站插件下载网站建设首页包括什么软件

wordpress网站插件下载,网站建设首页包括什么软件,可以免费打广告的平台,海淀区网站制作公司开发环境#xff1a; Windows 11 家庭中文版Microsoft Visual Studio Community 2019VTK-9.3.0.rc0vtk-example参考代码目的#xff1a;学习与总结 demo解决问题#xff1a;基于标记点#xff0c;两个点集在配准后的平均距离最小#xff0c;要求输入两个点数必须相等 Windows 11 家庭中文版Microsoft Visual Studio Community 2019VTK-9.3.0.rc0vtk-example参考代码目的学习与总结 demo解决问题基于标记点两个点集在配准后的平均距离最小要求输入两个点数必须相等序号一致的点集做线性变换。 关键类vtkTransform、vtkTransformFilter、vtkLandmarkTransform 知识点 1. vtkMath::Add此处仅用于创建两个点集合target、sourse。参考链接 2. ShallowCopyvtk的浅拷贝共享对象。参考链接 3. transform相关的文章两篇重点且未消化参考链接1、参考链接2 4. vtkLandmarkTransform用于粗批准初步对齐 1). AlignFrames(frame2, frame1, transform);//把frame2向frame1靠拢 landmarkTransform-SetSourceLandmarks(sourcePoints);landmarkTransform-SetTargetLandmarks(targetPoints)landmarkTransform-SetModeToRigidBody();landmarkTransform-Update(); 2) 获取变换矩阵后传出给外面的frame2使用 vtkMatrix4x4* M landmarkTransform-GetMatrix();transform-SetMatrix(M);3)通过显示结果或者输出文件观察线形变换后的位姿 void ApplyTransform(vtkTransform* transform, std::string filename){vtkNewvtkPolyData polydata;CreatePolydata(polydata);vtkNewvtkTransformFilter transformFilter;transformFilter-SetInputData(polydata);transformFilter-SetTransform(transform);transformFilter-Update();vtkNewvtkXMLPolyDataWriter writer;writer-SetFileName(filename.c_str());writer-SetInputConnection(transformFilter-GetOutputPort());writer-Write();}#include vtkLandmarkTransform.h #include vtkMath.h #include vtkNew.h #include vtkPoints.h #include vtkPolyData.h #include vtkTransform.h #include vtkTransformFilter.h #include vtkVertexGlyphFilter.h #include vtkXMLPolyDataWriter.hnamespace { struct Frame {Frame(float o[3], float x[3], float y[3], float z[3]){this-SetOrigin(o);this-SetXDirection(x);this-SetYDirection(y);this-SetZDirection(z);std::cout Origin: this-origin[0] this-origin[1] this-origin[2] std::endl;std::cout xDirection: this-xDirection[0] this-xDirection[1] this-xDirection[2] std::endl;std::cout yDirection: this-yDirection[0] this-yDirection[1] this-yDirection[2] std::endl;std::cout zDirection: this-zDirection[0] this-zDirection[1] this-zDirection[2] std::endl;}void ApplyTransform(vtkTransform* transform, std::string filename){vtkNewvtkPolyData polydata;CreatePolydata(polydata);vtkNewvtkTransformFilter transformFilter;transformFilter-SetInputData(polydata);transformFilter-SetTransform(transform);transformFilter-Update();vtkNewvtkXMLPolyDataWriter writer;writer-SetFileName(filename.c_str());writer-SetInputConnection(transformFilter-GetOutputPort());writer-Write();}void CreatePolydata(vtkPolyData* polydata){/** https://blog.csdn.net/liushao1031177/article/details/120809118static void Add(const float a[3], const float b[3], float c[3]){for (int i 0; i 3; i){c[i] a[i] b[i];}}*/vtkNewvtkPoints points;points-InsertNextPoint(this-origin);float x[3];vtkMath::Add(this-origin, this-xDirection, x);points-InsertNextPoint(x);float y[3];vtkMath::Add(this-origin, this-yDirection, y);points-InsertNextPoint(y);float z[3];vtkMath::Add(this-origin, this-zDirection, z);points-InsertNextPoint(z);polydata-SetPoints(points);vtkNewvtkVertexGlyphFilter vertexGlyphFilter;//单独的点是看不到的需要转换成符号vertexGlyphFilter-AddInputData(polydata);vertexGlyphFilter-Update();//https://zhuanlan.zhihu.com/p/138080564polydata-ShallowCopy(vertexGlyphFilter-GetOutput());}void Write(std::string filename){vtkNewvtkPolyData polydata;CreatePolydata(polydata);vtkNewvtkXMLPolyDataWriter writer;writer-SetFileName(filename.c_str());writer-SetInputData(polydata);writer-Write();}float origin[3];float xDirection[3];float yDirection[3];float zDirection[3];void SetOrigin(float o[3]){this-origin[0] o[0];this-origin[1] o[1];this-origin[2] o[2];}void SetXDirection(float direction[3]){vtkMath::Normalize(direction);this-xDirection[0] direction[0];this-xDirection[1] direction[1];this-xDirection[2] direction[2];}void SetYDirection(float direction[3]){vtkMath::Normalize(direction);this-yDirection[0] direction[0];this-yDirection[1] direction[1];this-yDirection[2] direction[2];}void SetZDirection(float direction[3]){vtkMath::Normalize(direction);this-zDirection[0] direction[0];this-zDirection[1] direction[1];this-zDirection[2] direction[2];} };void AlignFrames(Frame sourceFrame, Frame destinationFrame,vtkTransform* transform); } // namespaceint main(int, char*[]) {float frame1origin[3] {0, 0, 0};float frame1XDirection[3] {1, 0, 0};float frame1YDirection[3] {0, 1, 0};std::cout frame1YDirection[0] frame1YDirection[1] frame1YDirection[2] std::endl;float frame1ZDirection[3] {0, 0, 1};Frame frame1(frame1origin, frame1XDirection, frame1YDirection,frame1ZDirection);frame1.Write(frame1.vtp);float frame2origin[3] {0, 0, 0};float frame2XDirection[3] {.707f, .707f, 0};float frame2YDirection[3] {-.707f, .707f, 0};float frame2ZDirection[3] {0, 0, 1};Frame frame2(frame2origin, frame2XDirection, frame2YDirection,frame2ZDirection);frame2.Write(frame2.vtp);vtkNewvtkTransform transform;AlignFrames(frame2, frame1, transform); // Brings frame2 to frame1// std::cout *transform std::endl;frame2.ApplyTransform(transform, transformed.vtp);return EXIT_SUCCESS; }namespace { void AlignFrames(Frame sourceFrame, Frame targetFrame, vtkTransform* transform) {// This function takes two frames and finds the matrix M between them.vtkNewvtkLandmarkTransform landmarkTransform;// Setup source pointsvtkNewvtkPoints sourcePoints;sourcePoints-InsertNextPoint(sourceFrame.origin);float sourceX[3];vtkMath::Add(sourceFrame.origin, sourceFrame.xDirection, sourceX);sourcePoints-InsertNextPoint(sourceX);float sourceY[3];vtkMath::Add(sourceFrame.origin, sourceFrame.yDirection, sourceY);sourcePoints-InsertNextPoint(sourceY);float sourceZ[3];vtkMath::Add(sourceFrame.origin, sourceFrame.zDirection, sourceZ);sourcePoints-InsertNextPoint(sourceZ);// Setup target pointsvtkNewvtkPoints targetPoints;targetPoints-InsertNextPoint(targetFrame.origin);float targetX[3];vtkMath::Add(targetFrame.origin, targetFrame.xDirection, targetX);targetPoints-InsertNextPoint(targetX);float targetY[3];vtkMath::Add(targetFrame.origin, targetFrame.yDirection, targetY);targetPoints-InsertNextPoint(targetY);float targetZ[3];vtkMath::Add(targetFrame.origin, targetFrame.zDirection, targetZ);targetPoints-InsertNextPoint(targetZ);landmarkTransform-SetSourceLandmarks(sourcePoints);landmarkTransform-SetTargetLandmarks(targetPoints);landmarkTransform-SetModeToRigidBody();landmarkTransform-Update();vtkMatrix4x4* M landmarkTransform-GetMatrix();transform-SetMatrix(M); } } // namespace
http://www.huolong8.cn/news/246176/

相关文章:

  • 电影网站怎么做seo商城类网站功能列表
  • 哪些网站可以做宣传域名注册价格及续费
  • 深圳最火的网站企业运营
  • 用瀑布流做的美食网站用html制作旅游网站
  • 温江建设局备案网站微博问答网站开发
  • 做推广网站需要商标吗wordpress 调用输入
  • 视频网站 移动 模板室内设计网站 知乎
  • 2018做网站赚钱不制作网站 美工
  • 建设网站需要会什么河南最新新闻头条
  • 西安网站建设王永杰小程序免费制作网站
  • 拓普网站建设适合做模型的著名建筑
  • wordpress的网站怎样添加地图坐标国内app开发公司
  • 网站上线要多久深圳 网站
  • 襄阳网站seo方法网站主题编辑工具WordPress
  • h5游戏网站中国招标网官网招标公告
  • 营销网站建设大概费用上海什么公司最有名
  • 电子商务网站建设调研报告马云先做那个网站的起家的
  • idc网站模版搜索引擎优化的常用方法
  • 网站开发公司的推广费用长安网站建设详细教程
  • 无锡网站营销公司简介企业推广是什么职业
  • 哪家网站建设最好对于网站建设的描述
  • 论坛网站建设联系方式做彩票网站捉怎么处理
  • 虚拟机 网站建设长春高铁站
  • 互联网做什么行业前景好seo常用方法
  • 高平网站建设郑州开发软件的公司
  • 网站建设教程搭建芽嘱湖南岚鸿信赖广东省建设工程执业中心网站
  • 网站开发后服务费宜宾网站建设工作室
  • 门户类网站建设橱窗展示设计
  • 做网站视频网站用别人的电影网站做公众号
  • 建网站和建网店的区别毕业季网站如何做网页