九、DAG hierarchy
DAG 节点有两种,Transformation/shape。
shape节点是transformation的子节点。 transformation节点包括position, rotation, scale, parents infromation.
A dag path 代表从root node到shape node 所经历的一个transform的集合。
instancing:当transform或者shape节点有多个父节点的时候,他们被认为instanced。例如一颗树上的很多个树叶,可以共用一个shape节点,如图:

leaf是shape节点。
Transform3 and the Leaf is instanced (it has two parents). The two valid DAG paths in this example are: Transform 1 - Transform 3 - Leaf and Transform 2 - Transform 3 - Leaf.
For example:
MFnDagNode—has methods for determining the number of parents, and the parents of a node.
MFnTransform—is the function set for operating on transform nodes (derived from MFnDagNode) and has methods to get and set transformation, such as rotation, translation, or scale.
MFnNurbsSurface—is one of many types of function sets which operate on the many types of shape nodes (also derived fromMFnDagNode, but not derived from MFnTransform) and has methods to get and set the CVs of the surface, etc.
DAG path: 节点间用|隔开,每个instance node可以有多条路径。
DAG paths and worldspace operations in the API
DAG path represents how a shape is inserted into the scene, a DAG path must be used when attempting any world space operation via the API.
Almost all of the classes that contains methods that will return an MObject for a node also contain methods that will return DAG paths so you can get an MDagPath handle to the desired node. As well, all the MFn classes can be constructed with either an MObject or anMDagPath. 但如果是用MObject来构建MFn,则不能使用world space的操作。
The MDagPathrepresents paths as a stack of nodes with the root node being on the bottom of the stack. The push() and pop() methods allow nodes along the path to be added or removed from the representation.
These methods do not add and remove nodes from the actual DAG but only from the representation constructed by theMDagPath class.
The MDagPath class allows these transformations to be returned using theinclusiveMatrix() and exclusiveMatrix() classes.
每条路径的变换矩阵可以有两种方式:inclusive matrix是包括最后一个节点的Matrix, exclusiveMatrix()不包括最后一个节点。
For example, if a path is defined as:
|RootTransform|Transform1|Transform2|Shape
the inclusive matrix down to Transform2 would be the accumulation of RootTransform, Transform1, and Transform2. The exclusive matrix would contain the accumulation of only RootTransform and Transform1.
1. 为什么要将shape node加入DAG path
selection操作返回的是选择到物体的shape节点的父tranform节点,
MGlobal::getActiveSelectionList()返回的MDagPath是shape node前的transform节点,用extendToShape()函数。
Function set对应MDagPath路径上最后一个节点,如果是shape就应该用shape的function set, 是transform就用tranform的function set。
2. 一个transform node只有一个shape node,除了下面情况:

|Transform1|Shape1 is the original historical object while |Transform1|Shape1a is the actual object visible in any interactive window. |Transform1|Shape1 is also called an intermediate object.This is important later when working with the dependency graph.
3. Dag walking example:
这个例子,iterating through DAG either a depth first or breadth first manner。是file translator的基础。
九、DAG hierarchy的更多相关文章
- spark 源码分析之十九 -- DAG的生成和Stage的划分
		
上篇文章 spark 源码分析之十八 -- Spark存储体系剖析 重点剖析了 Spark的存储体系.从本篇文章开始,剖析Spark作业的调度和计算体系. 在说DAG之前,先简单说一下RDD. 对RD ...
 - spark 源码分析之十九 -- Stage的提交
		
引言 上篇 spark 源码分析之十九 -- DAG的生成和Stage的划分 中,主要介绍了下图中的前两个阶段DAG的构建和Stage的划分. 本篇文章主要剖析,Stage是如何提交的. rdd的依赖 ...
 - 十、DG
		
1.DG是dependency graph,我认为是依赖图,和DAG(有向无环图)的区别:DAG用来做场景管理,每个node代表的不是tranform就是shape,有父子关系. DG是代表了每个实体 ...
 - Spark 源码分析系列
		
如下,是 spark 源码分析系列的一些文章汇总,持续更新中...... Spark RPC spark 源码分析之五--Spark RPC剖析之创建NettyRpcEnv spark 源码分析之六- ...
 - spark 源码分析之二十一 -- Task的执行流程
		
引言 在上两篇文章 spark 源码分析之十九 -- DAG的生成和Stage的划分 和 spark 源码分析之二十 -- Stage的提交 中剖析了Spark的DAG的生成,Stage的划分以及St ...
 - spark shuffle的写操作之准备工作
		
前言 在前三篇文章中,spark 源码分析之十九 -- DAG的生成和Stage的划分 剖析了DAG的构建和Stage的划分,spark 源码分析之二十 -- Stage的提交 剖析了TaskSet任 ...
 - spark源码分析以及优化
		
第一章.spark源码分析之RDD四种依赖关系 一.RDD四种依赖关系 RDD四种依赖关系,分别是 ShuffleDependency.PrunDependency.RangeDependency和O ...
 - B4 and After: Managing Hierarchy, Partitioning, and Asymmetry for Availability and Scale in Google’s Sofware-Defined WAN
		
B4及之后:为谷歌软件定义WAN的可用性和扩展管理层次化.划分和不对称 本文为SIGCOMM 2018会议论文,由谷歌提供. 笔者翻译了该论文.由于时间仓促,且笔者英文能力有限,错误之处在所难免:欢迎 ...
 - 学习笔记(二)--->《Java 8编程官方参考教程(第9版).pdf》:第七章到九章学习笔记
		
注:本文声明事项. 本博文整理者:刘军 本博文出自于: <Java8 编程官方参考教程>一书 声明:1:转载请标注出处.本文不得作为商业活动.若有违本之,则本人不负法律责任.违法者自负一切 ...
 
随机推荐
- Mybatis根据表自动生成相关代码
			
这个地方的生成需要用到三个文件,generatorConfig.xml.mybatis-generator-core-1.3.1.jar和mysql-connector-java-5.1.29.jar ...
 - Qt msgBox 快捷版
			
使用 int iRet = msgBox(pos, tr("警告") , tr("确定要删除当前选中的行吗?") , tr(, ); == iRet) retu ...
 - 永不消逝的电波(二)HackRF入门:家用无线门铃信号重放
			
0×00 前言 在第一篇文章:永不消逝的电波(一):无线电入门篇 我们了解了一下无线电的发展史以及无线电的一些物理知识,在第二篇里我们将用HackRF录制家用门铃的无线信号,然后重放门铃信号. 门铃从 ...
 - RedHat不能使用ifconfig命令
			
安装RedHat后,使用ifconfig命令,结果报错command not found,解决方法如下: 1.cat ~/.bash_profile 查看path 2.vi /etc/prof ...
 - Javascript 事件(一)
			
焦点事件获取焦点事件onfocus \ 失去焦点事件 onblur 使浏览器能够区分用户输入的对象,当一个元素有焦点的时候,那么他就可以接收用户的输入.我们可以通过一些方式给元素设置焦点 1. ...
 - sass安装 使用
			
一 什么是sass sass是一种css开发工具.提供了很多便利的写法,使得css开发变得简单 易维护 sass有两种后缀名文件:一种后缀名为sass,不使用大括号和分号:另一 ...
 - VS2010 刷新工具箱(刷新自定义控件)
			
有时候自己自定义了控件,定义完后却不见工具箱中刷新出来自定义的控件,解决方案有了三种: 点评:在项目中增加了几个自定义控件,想在窗口上添加时却发现工具箱根本就没有些控件,晕了.记得2008都可以自动出 ...
 - Oracle数据库3
			
在前两章,我们学习了SQL语言中基本的一些查询语句,也就是数据库查询语言DQL,今天我们要介绍的数据库操作语言DML 数据库中,我们除了查询之外,最主要的就是日常的增.删.改.查了. 数据库操作语言 ...
 - C语言数组初始化
			
例如: int a[15] = {0}; 第一种,编译器会把第一个初始化值赋给数组的第一个元素,然后用0赋给其余的元素.如果没有给出初始值,编译器不会去做初始化工作.这样简洁的方式让代码更加高效. 还 ...
 - 腾讯优测| 让Android屏幕适配开发更简单-Google百分比布
			
文/腾讯优测工程师 吴宇焕 腾讯优测优社区干货精选~ 相信开发同学都被安卓设备碎片化的问题折磨过,市面上安卓手机的主流屏幕尺寸种类繁多,给适配造成很大的困难.就算搞定了屏幕尺寸问题,各种分辨率又让人眼 ...