首页 > 其他分享 >assimp示例1

assimp示例1

时间:2023-08-14 17:34:42浏览次数:37  
标签:示例 aiProcess scene assimp importer include

#include <assimp/Importer.hpp>      // C++ importer interface
#include <assimp/scene.h>           // Output data structure
#include <assimp/postprocess.h>     // Post processing flags
bool DoTheImportThing( const std::string& pFile)
{
  // Create an instance of the Importer class
  Assimp::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 
  // propably 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 it
  if( !scene)
  {
    DoTheErrorLogging( importer.GetErrorString());
    return false;
  }
  // Now we can access the file's contents. 
  DoTheSceneProcessing( scene);
  // We're done. Everything will be cleaned up by the importer destructor
  return true;
}

参考:https://assimp.sourceforge.net/lib_html/usage.html

标签:示例,aiProcess,scene,assimp,importer,include
From: https://www.cnblogs.com/2008nmj/p/17629283.html

相关文章

  • API接口对接电商平台高效获取各大电商平台数据,商品详情数据代码示例
     电商可以通过使用API接口获取商品信息数据。API是应用程序编程接口的缩写,它允许程序之间进行通信和数据传输。为了获取商品信息数据,电商可以利用API接口向商品供应商的数据库发送请求,然后接收并解析返回的数据。具体来说,电商可以按照以下步骤利用API接口获取商品信息数据:1.找......
  • assimp库的使用
    参考:https://github.com/assimp/assimp1.assimp(OpenAssetImportLibrary)简介OpenAssetImportLibraryisalibrarytoloadvarious3dfileformatsintoashared,in-memoryformat.Itsupportsmorethan40fileformatsforimportandagrowingselectionof......
  • JSON生成Form表单的方法示例
    JSON生成Form表单的方法示例 更新时间:2018年11月21日14:21:14 作者:熟悉的陌生人  JSON表单是一个基于React的抽象组件,它可以把JSON数据格式描述的表单转换成项目中的表单,这篇文章主要介绍了JSON生成Form表单的方法示例,感兴趣的小伙伴们可以参考一下 JSON表单描述......
  • WPF 入门笔记 - 07 - MVVM示例
    滴咚,大家好久不见......
  • RabbitMq应用示例(RabbitMq第三篇)
    一、应用示例:参考文献:(写的很好的一篇文章,小编已经参照该博主的内容完整的编写了一遍,可能会有一些遐思,后续会把自己编写的代码也补充一下)Springboot整合RabbitMq,用心看完这一篇就够了_springbootrabbitmq_小目标青年的博客-CSDN博客简单的消息推送流程图:黄色的圈圈就是我们的消息......
  • mongoDB 入门指南、示例
    一、准备工作1、下载mongoDB下载地址:http://www.mongodb.org/downloads选择合适你的版本相关文档:http://www.mongodb.org/display/DOCS/Tutorial2、安装mongoDBA、不解压模式:将下载下来的mongoDB-xxx.zip打开,找到bin目录,运行mongod.exe就可以启动服务,默认端口27017,db保存的路径......
  • 一个简单利用WebGL绘制频谱瀑布图示例
    先看效果还是比较节省性能的,这个还是包含了生成测试数据的性能,实际应用如果是直接通信获得数据应该还能少几毫秒吧!准备工作用了React,但是关系不大WebGL的基础用法(推荐看一看掘金里的一个教程:WebGL入门与实践)有兴趣应该读一读这个的源码GPU.JS,因为一开始偷学了一手flatten......
  • 七月学习之Iptables场景示例
    10、Iptables场景示例10.1、iptables场景一场景描述1、对所有的地址开放本机的tcp(80、22、8080-9090)端口的访问2、允许对所有的地址开放本机的基于ICMP协议的数据包访问3、其他未被允许的端口禁止访问实现思路1、先允许端口、协议2、配置拒绝规则#INPUTiptables-Fiptab......
  • Java语言代码示例
    packagecom.qgproxy;importjava.io.ByteArrayOutputStream;importjava.io.InputStream;importjava.net.Authenticator;importjava.net.HttpURLConnection;importjava.net.InetSocketAddress;importjava.net.PasswordAuthentication;importjava.net.Proxy;importjava.......
  • PHP语言使用隧道代码示例
    /***请求**@param[type]$targetUrl目标站点*@param[type]$proxyIp代理ip*@param[type]$proxyPort代理端口*@param[type]$proxyUserAuthKey*@param[type]$proxyPasswordAuthPwd*@returnvoid*/functionsendRequest($targetUrl,$proxyIp,$proxyPort,$proxy......