zoukankan      html  css  js  c++  java
  • SKNode的渲染顺序

    SKNode的渲染顺序

      SKNode的zPosition属性,指定相对于其父视图的z轴坐标。

      

      The default value is 0.0. The positive z axis is projected toward the viewer so that nodes with larger z values are closer to the viewer.   

      zPosition越大,则越接近用户,即zPosition值大者会把小的给覆盖掉。

      When a node tree is rendered, the height of each node (in absolute coordinates) is calculated and then all nodes in the tree are rendered from smallest z value to largest z value. If multiple nodes share the same z position, those nodes are sorted so that parent nodes are drawn before their children, and siblings are rendered in the order that they appear in their parent’s children array. Hit-testing is processed in the opposite order.

      当一棵树被渲染。1)会计算每个结点zPosition的绝对高度。2)按zPosition绝对值从小到大排序,然后从小到大依次渲染。3)如果2个node的zPosition相等,则优先绘制父类,再绘制子类;或按结果在children array中的次序绘制。

      The SKView class’s ignoresSiblingOrder property controls whether node sorting is enabled for nodes at the same z position.

     

  • 相关阅读:
    提取轮廓后的画图处理
    提取视频中的前景物体
    写入视频帧
    处理视频序列
    视频读写
    三维重建-相机标定
    图像拼接相关
    计算两幅图像之间的单应矩阵
    ransac算法(随机抽样一致性)
    图像间投影关系
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3664414.html
Copyright © 2011-2022 走看看