建立View and Data – 3D模型
来源:互联网 发布:matlab中做数据预测 编辑:程序博客网 时间:2024/06/06 03:49
View and Data – 3D模型
1、创建展示3D模型的容器,引入必要的css和js文件
<!DOCTYPE html> <head> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=no"/> <meta charset="utf-8"> <!-- The Viewer CSS --> <link rel="stylesheet" href="https://developer.api.autodesk.com/viewingservice/v1/viewers/style.min.css" type="text/css"> </head> <body> <!-- The Viewer will be instantiated here --> <div id="MyViewerDiv"></div> <!-- The Viewer JS --> <script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/three.js"></script> <script src="https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.js"></script> </body></html>
2、编写扩展js,来展示自己的3D模型
var viewerApp;// view对象var viewer;// 扩展对象var extension;var _mainViewerSubToolbar = null;var controlGroup;// 配置初始化选项// 这里的accessToken和urn都是上传模型文件到官方服务器返回的var options = { env: 'AutodeskProduction', getAccessToken: function (onGetAccessToken) { var accessToken = '0E5yQLZxN4rddupcbDydhcRa6auQ'; var expireTimeSeconds = 60 * 30; onGetAccessToken(accessToken, expireTimeSeconds); } };var documentId = 'urn:dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGVzdGFuZG9zdGVjYXp6b2RpYXBpLWFydGh1cjQ1Ni9EaXNuZXltZXAucnZ0';// 3D模型的初始化Autodesk.Viewing.Initializer(options, function onInitialized() { var config = { extensions: ["Autodesk.Viewing.MarkupsCore","Autodesk.Viewing.MarkupRectangle"] }; viewerApp = new Autodesk.Viewing.ViewingApplication('MyViewerDiv'); viewerApp.registerViewer(viewerApp.k3D, Autodesk.Viewing.Private.GuiViewer3D, config); viewerApp.loadDocument(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);});// 文档加载成功的回调function onDocumentLoadSuccess(doc) { var viewables = viewerApp.bubble.search({'type': 'geometry'}); if (viewables.length === 0) { return; } viewerApp.selectItem(viewables[0].data, onItemLoadSuccess, onItemLoadFail);}// 文档加载失败的回调function onDocumentLoadFailure(viewerErrorCode) { // ...}// 模型加载成功的回调function onItemLoadSuccess(viewer, item) { // ...}// 模型加载失败的回调function onItemLoadFail(errorCode) { // ...}
0 1
- 建立View and Data – 3D模型
- 建立View and Data – 3D模型
- 论文阅读:Volumetric and Multi-View CNNs for Object Classification on 3D Data
- 建立自己的3D模型文件
- Data Modeling模型(建立ER模型)
- 建立自己的3D静态模型文件
- Maxwell 3D v11中自定义参数模型的建立
- 建立自己的3D静态模型文件
- 使用Jt2Go控件显示3D模型 / View 3D Model with JT2GO
- data dictionary and dynamic performance view
- Autodesk View and Data API二次开发学习指南
- Autodesk View and Data API练练手
- 3d data set
- Virtual View Synthesis Method and Self Evaluation Metrics for Free Viewpoint Television and 3D Video
- 在程序中怎么回放3DMax建立的3D模型
- 通过kinect实现3d扫描建立打印模型(processing、skanect、ReconstructMe)
- 3D模型体素化
- JS 3D 模型
- Linux 下安装Eclipse C++
- 图片转换为视频
- POJ 1459 Power Network (最大流, 网络流, EdmondsKarp算法求解最大流)
- C 基本语法
- 毕业设计的坑--unity ai的设计,我选择使用behavior tree插件(5)
- 建立View and Data – 3D模型
- //C#查询所有DataGridView绑定
- Spring MVC之@RequestMapping 详解
- jmeter参数化
- 进程通信:匿名管道和命名管道
- C# var
- ListView深入学习(2)
- 内存分配方式之基本分页
- Leetcode 214. Shortest Palindrome