zoukankan      html  css  js  c++  java
  • View and Data API Tips : Conversion between DbId and node

    By Daniel Du

    In View and Data client side API, The assets in the Autodesk Viewer have an object tree, a tree structure that represents the model hierarchy. Each element in model can be representing as a node of model tree. Each node has a dbId, this is a unique id for the element in the model. There is a one-to-one correspondence between a node and a dbId.

    In View and Data client API, some methods use dbId as parameter and some methods use node as parameter, in that case you will need to do the conversion. To get the node object from dbId, here is code snippet:

     var node = viewer.model.getData()
         .instanceTree.dbIdToNode[dbId];

    To get dbId of a node, just use the dbId property:

    var dbId = node.dbId

    Just a small tip in case you don’t know.

  • 相关阅读:
    android 中ImageButton按下改变背景图片的效果
    Android根据Button状态(normal,focused,pressed)显示不同背景图片
    Android简单逐帧动画Frame的实现(三)
    Android消息总线的演进之路:用LiveDataBus替代RxBus、EventBus
    美团点评云真机平台实践
    美团客户端响应式框架EasyReact开源啦
    MCI:移动持续集成在大众点评的实践
    如何基于深度学习实现图像的智能审核?
    Android自动化页面测速在美团的实践
    美团外卖iOS多端复用的推动、支撑与思考
  • 原文地址:https://www.cnblogs.com/junqilian/p/5149756.html
Copyright © 2011-2022 走看看