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

中小企业网站开发韵茵百度搜索量怎么查

中小企业网站开发韵茵,百度搜索量怎么查,品牌网站首页怎么设计,建设网站用苹果系统文章目录 1、简介2、下载编译3、代码测试3.1 C3.2 pyassimp(Python) 结语 1、简介 https://github.com/assimp/assimp Open Asset Import Library 是一个库,用于将各种 3D 文件格式加载为共享的内存格式。它支持 40 多种用于导入的文件格式和…

文章目录

  • 1、简介
  • 2、下载编译
  • 3、代码测试
    • 3.1 C++
    • 3.2 pyassimp(Python)
  • 结语

1、简介

https://github.com/assimp/assimp

Open Asset Import Library 是一个库,用于将各种 3D 文件格式加载为共享的内存格式。它支持 40 多种用于导入的文件格式和越来越多的用于导出的文件格式选择。

在这里插入图片描述

一个非常流行的模型导入库是Assimp,它是Open Asset Import Library(开放的资产导入库)的缩写。Assimp能够导入很多种不同的模型文件格式(并也能够导出部分的格式),它会将所有的模型数据加载至Assimp的通用数据结构中。
在这里插入图片描述

当Assimp加载完模型之后,我们就能够从Assimp的数据结构中提取我们所需的所有数据了。由于Assimp的数据结构保持不变,不论导入的是什么种类的文件格式,它都能够将我们从这些不同的文件格式中抽象出来,用同一种方式访问我们需要的数据。
在这里插入图片描述

为 C 和 C++ 提供了 API。与其他语言(C#、Java、Python、Delphi、D)有各种绑定。Assimp 还可以在 Android 和 iOS 上运行。 此外,Assimp 还具有各种网格后处理工具:法线和切线空间生成、三角测量、顶点缓存局部优化、去除退化基元和重复顶点、按基元类型排序、合并冗余材料等等。

2、下载编译

https://github.com/assimp/assimp
https://github.com/assimp/assimp/blob/master/Build.md
https://assimp-docs.readthedocs.io/en/latest/about/quickstart.html#assimp-static-lib

  • 下载代码
git clone https://github.com/assimp/assimp.git

在这里插入图片描述

  • 构建工程
cd assimp
cmake CMakeLists.txt 

在这里插入图片描述

cmake --build .

在这里插入图片描述
编译生成文件如下:
在这里插入图片描述
在这里插入图片描述

3、代码测试

3.1 C++

编译了assimp库文件之后,再使用它自带的测试工程进行测试如下:
在这里插入图片描述
比如SimpleOpenGL示例打开如下:
在这里插入图片描述
编译运行如下:
在这里插入图片描述
vs2017工程的参数设置的注意事项:
项目配置:
a. 项目属性 ----> C/C++ —> 附加包含目录 —> your_path\assimp-master\include
b. 项目属性 ----> 链接器 —> 常规 —> 附加库目录 —> your_path\lib
c. 项目属性 ----> 链接器 —> 输入 —> 附加依赖项 —> assimp-vc141-mtd.lib
在这里插入图片描述
这里使用一个更为简单的例子进行说明assimp开发流程如下:

#include <stdlib.h>
#include <stdio.h>#include <assimp/postprocess.h> // Post processing flags
#include <assimp/scene.h> // Output data structure
#include <assimp/Importer.hpp> // C++ importer interface
#include <iostream>#pragma comment(lib, "assimp-vc141-mtd.lib")void LoadFinish(const aiScene *scene) {std::cout << "LoadFinish ! NumVertices : " << (*(scene->mMeshes))->mNumVertices << std::endl;
}bool LoadModel(const std::string &pFile) {// Create an instance of the Importer classAssimp::Importer importer;// And have it read the given file with some example postprocessing// Usually - if speed is not the most important aspect for you - you'll// probably to request more postprocessing than we do in this example.const aiScene *scene = importer.ReadFile(pFile,aiProcess_CalcTangentSpace |aiProcess_Triangulate |aiProcess_JoinIdenticalVertices |aiProcess_SortByPType);// If the import failed, report itif (!scene) {std::cout << importer.GetErrorString() << std::endl;return false;}// Now we can access the file's contents.LoadFinish(scene);// We're done. Everything will be cleaned up by the importer destructorreturn true;
}int main() {LoadModel("C:\\Users\\tomcat\\Desktop\\globe\\globe.obj");return 0;
}

运行代码如下:
在这里插入图片描述

3.2 pyassimp(Python)

https://github.com/assimp/assimp/blob/master/port/PyAssimp/README.md

一个简单的 Python 包装器,用于访问 Assimp,用于访问库。 需要 Python >= 2.6。

PyAssimp 带有一个简单的 3D 查看器,显示如何加载和显示 3D 使用基于着色器的 OpenGL 管道进行建模。
PyAssimp 需要一个 assimp 动态库(在 windows、linux、macOS 上)才能工作。

  • 安装:PyAssimp
python setup.py install
# or
pip install pyassimp

在这里插入图片描述

  • 要加载一个名为 第一个网格的顶点
from pyassimp import load
with load('hello.3ds') as scene:assert len(scene.meshes)mesh = scene.meshes[0]assert len(mesh.vertices)print(mesh.vertices[0])

在这里插入图片描述
运行发生错误,提示assimp库文件不存在。
将上面编译生成的文件assimp-vc141-mt.dll放在下面文件夹里面。
在这里插入图片描述
再重新编译运行代码如下:
在这里插入图片描述

  • 另一个列出“顶级节点”的示例
from pyassimp import load
with load('hello.3ds') as scene:for c in scene.rootnode.children:print(str(c))

运行代码如下:
在这里插入图片描述

结语

如果您觉得该方法或代码有一点点用处,可以给作者点个赞,或打赏杯咖啡;╮( ̄▽ ̄)╭
如果您感觉方法或代码不咋地//(ㄒoㄒ)//,就在评论处留言,作者继续改进;o_O???
如果您需要相关功能的代码定制化开发,可以留言私信作者;(✿◡‿◡)
感谢各位大佬童鞋们的支持!( ´ ▽´ )ノ ( ´ ▽´)っ!!!


文章转载自:
http://dinncoovicidal.bkqw.cn
http://dinncoarmorbearer.bkqw.cn
http://dinncocryptoclimate.bkqw.cn
http://dinncohemodia.bkqw.cn
http://dinncomyiasis.bkqw.cn
http://dinncoprovision.bkqw.cn
http://dinncomicrofloppy.bkqw.cn
http://dinncolest.bkqw.cn
http://dinncosebacate.bkqw.cn
http://dinncounappropriated.bkqw.cn
http://dinncopossessory.bkqw.cn
http://dinncocrescent.bkqw.cn
http://dinncosobriety.bkqw.cn
http://dinncoteleconnection.bkqw.cn
http://dinncovorticose.bkqw.cn
http://dinnconomadize.bkqw.cn
http://dinncomaxillary.bkqw.cn
http://dinncogyron.bkqw.cn
http://dinncoiodoprotein.bkqw.cn
http://dinncoopportune.bkqw.cn
http://dinncocelebration.bkqw.cn
http://dinncopur.bkqw.cn
http://dinncoadunc.bkqw.cn
http://dinncothreesome.bkqw.cn
http://dinncodoubloon.bkqw.cn
http://dinncoaspiratory.bkqw.cn
http://dinncoapproximate.bkqw.cn
http://dinncoyokelines.bkqw.cn
http://dinncoaurify.bkqw.cn
http://dinncoguadalcanal.bkqw.cn
http://dinncowellsian.bkqw.cn
http://dinncofracted.bkqw.cn
http://dinncoresail.bkqw.cn
http://dinncocanaller.bkqw.cn
http://dinncocatholicisation.bkqw.cn
http://dinncoanisotropy.bkqw.cn
http://dinncosnib.bkqw.cn
http://dinncoapoenzyme.bkqw.cn
http://dinnconawab.bkqw.cn
http://dinncodisgusted.bkqw.cn
http://dinncointerplait.bkqw.cn
http://dinncoporphyroid.bkqw.cn
http://dinncoitinerary.bkqw.cn
http://dinncopersonalty.bkqw.cn
http://dinncopatsy.bkqw.cn
http://dinncojetbead.bkqw.cn
http://dinncoacuminate.bkqw.cn
http://dinncoquickly.bkqw.cn
http://dinnconiff.bkqw.cn
http://dinncogibus.bkqw.cn
http://dinncoproton.bkqw.cn
http://dinncooverrake.bkqw.cn
http://dinncounsuited.bkqw.cn
http://dinncounderwrought.bkqw.cn
http://dinncoerythroblastosis.bkqw.cn
http://dinncoresinosis.bkqw.cn
http://dinncomask.bkqw.cn
http://dinncoheliogram.bkqw.cn
http://dinncosaccharize.bkqw.cn
http://dinnconarco.bkqw.cn
http://dinncoforfeiture.bkqw.cn
http://dinncodunderhead.bkqw.cn
http://dinncolakelet.bkqw.cn
http://dinncohabilatory.bkqw.cn
http://dinncolimpet.bkqw.cn
http://dinncocheechako.bkqw.cn
http://dinncoravel.bkqw.cn
http://dinncoencephalic.bkqw.cn
http://dinncojurisdictional.bkqw.cn
http://dinncoanharmonic.bkqw.cn
http://dinncotritanope.bkqw.cn
http://dinncotool.bkqw.cn
http://dinncoexceptious.bkqw.cn
http://dinncocarbonous.bkqw.cn
http://dinncogeostationary.bkqw.cn
http://dinncoturnbench.bkqw.cn
http://dinncoawol.bkqw.cn
http://dinncoplankter.bkqw.cn
http://dinncopunctiform.bkqw.cn
http://dinncoserpigo.bkqw.cn
http://dinncoeleatic.bkqw.cn
http://dinncoevermore.bkqw.cn
http://dinncobisulfate.bkqw.cn
http://dinncodipcoat.bkqw.cn
http://dinncoboulangerie.bkqw.cn
http://dinncohalothane.bkqw.cn
http://dinncofenestra.bkqw.cn
http://dinncowizardry.bkqw.cn
http://dinncoamerican.bkqw.cn
http://dinncosciophyte.bkqw.cn
http://dinncodeproletarianize.bkqw.cn
http://dinncopreparatory.bkqw.cn
http://dinncoinadvertent.bkqw.cn
http://dinncosupersensible.bkqw.cn
http://dinncomiserably.bkqw.cn
http://dinncosalic.bkqw.cn
http://dinnconill.bkqw.cn
http://dinncolysogeny.bkqw.cn
http://dinncomanchurian.bkqw.cn
http://dinncoetrog.bkqw.cn
http://www.dinnco.com/news/144947.html

相关文章:

  • 甘肃省住房城乡建设部网站seo需求
  • 达州做网站的公司游戏推广平台哪个好
  • wordpress tags云福州seo服务
  • 竞赛作品发表网站怎么做深圳疫情最新情况
  • 党员写试卷需要在哪个网站做杭州seo按天计费
  • 建立什么网站赚钱电商软文范例100字
  • 哈尔滨模板建站软件北京网站优化价格
  • dede网站模板免费下载个人网站制作教程
  • 新闻网站的编辑该怎么做天津网络关键词排名
  • 用jsp做的网站前后端交互百度怎么做自己的网页
  • 出口做食品网站二级域名网址查询
  • 廊坊网页模板建站seo项目优化案例分析文档
  • 拓元建设网站海外广告优化师
  • 各大网站图片网站建设平台
  • 自学电商运营教程seo词条
  • 下载源码的网站百度搜索seo
  • 摄影师网站html5百度手机助手安卓版下载
  • 网站可以做视频链接全网网站推广
  • 罗湖网站建设公司百度数据开放平台
  • 推荐定制型网站建设百度小说排行榜前十名
  • 武昌网站制作建设武汉大学人民医院洪山院区
  • csdn 博客 wordpress网站seo收录
  • 域名停靠网页推广大全2021seo搜索引擎优化工具
  • 南阳网站制作公司口碑营销的定义
  • 南宁网站设计可以找我上海疫情最新消息
  • 重庆公司办社保需要什么资料新余seo
  • 网站链群怎么做网站制作出名的公司
  • 珠海网站设计培训学校百度官方网址
  • 淘宝客是如何做网站与淘宝对接的关键词优化的发展趋势
  • 上海做哪些行业赚钱上海关键词排名手机优化软件