查看: 3016|回复: 9
打印 上一主题 下一主题

[Anark] Transform Ease (Script Utilities Behavior)

[复制链接]
Asen    

867

主题

0

听众

1万

积分

外协人员

Rank: 7Rank: 7Rank: 7

纳金币
17488
精华
1
跳转到指定楼层
楼主
发表于 2011-10-15 10:53:00 |只看该作者 |倒序浏览






               Transform Ease (Script Utilities Behavior)
              









           Summary
         

           Adds a few properties and methods to every Node for working with transformation matrices.
         





               Category
              


              Latest Behaviors
            




               Author
              


              Gavin Kistner
            




               Difficulty
              


              (Reference)
            




               Time to Complete
              


              5 Minutes
            








           Downloads
         


            Click Here
           
           to download the associated files.
         


            (This document covers version 0.9 of the 'Transform Ease' behavior, current as of 2005-Mar-21)
           

            Description
           


             This behavior extends every Node (Camera, Light, Group, Model, and Text objects) with three new properties and two new methods. To use, simply attach this behavior anywhere in the scene. (You have to actually attach it to add the functionality; loading it into the library for the project is not enough.)
            

              
            


              
            


              myNode.lastLocalTransform
            


             Like the
            
              lastGlobalTransform
            
             property, this property returns a transformation matrix from the previous frame.
            

             Unlike
            
              lastGlobalTransform
            
             , the transformation is for the node with respect to its parent, not with respect the scene.
            

              
            


              
            


              myNode.currentGlobalTransform
            


             Like
            
              lastGlobalTransform
            
             , this property is a matrix holding the transformation matrix for the object with respect to the scene.
            

             Unlike
            
              lastGlobalTransform
            
             , the transformation is for the current state of the object, not the previous frame.
            

             Changes already made to transformations (position, scale, rotation, and pivot) on any ancestor of the object during the current frame will be reflected in this matrix, but references to the returned matrix are not automatically updated as objects are transformed. (You must assign a new variable to the property to force the matrix to be recomputed after changing the transformation on the object or its ancestors.)
            



               WARNING
              

             : It is computationally expensive to calculate this matrix, requiring one function call and four matrix multiplications for every ancestor of the object. If you can use
            
              lastGlobalTransform
            
             instead, you should.
            

              
            


              
            


              myNode.currentLocalTransform
            


             Like
            
              currentGlobalTransform
            
             , but returns the transformation matrix of the calling node with respect to the parent of that node.
            



               WARNING
              

             : It is computationally expensive to calculate this matrix, requiring one function call and four matrix multiplications. If you can use
            
              lastLocalTransform
            
             instead, you should.
            

              
            


              
            


              myNode.lastTransformFrom(
              
               inAncestor
              
              ,
              
               outMatrix
              
              )
            


             Returns the transformation matrix for the calling node with respect to an arbitrary ancestor, using information from the last frame.
            

             The
            

               inAncestor
              

             parameter should be a node that is an ancestor of the calling node. If this value is not passed (or is not a node) the return value is the
            
              lastGlobalTransform
            
             for the calling node.
            

             If the
            

               outMatrix
              

             parameter is supplied, that matrix will be modified and returned; otherwise, a new matrix will be created and returned.
            

             (Re-using the same matrix across successive calls to this method will result in slightly better memory performance, since a new Matrix will not be allocated each time.)
            

              
            


              
            


              myNode.currentTransformFrom(
              
               inAncestor
              
              ,
              
               outMatrix
              
              )
            


             Returns the transformation matrix for the calling node with respect to an arbitrary ancestor, using information from the current frame.
            

             The
            

               inAncestor
              

             parameter should be a node that is an ancestor of the calling node. If this value is not passed (or is not a node, or is not an ancestor of the calling node) then the return value will be the same as the
            
              currentGlobalTransform
            
             matrix for the calling node.
            

             If the
            

               outMatrix
              

             parameter is supplied, the matrix will be modified and returned; otherwise, a new matrix will be created and returned.
            

             (Re-using the same matrix across successive calls to this method will result in slightly better memory performance, since a new Matrix will not be allocated each time.)
            



               WARNING
              

             : It is computationally expensive to calculate this matrix, requiring one function call and four matrix multiplications for every below the ancestor node (including the calling node). If you can use the
            
              lastTransformFrom(...)
            
             method instead, you should.
            


分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-4-18 23:21:34 |只看该作者
“再次路过……”我造一个-----特别路过
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

板凳
发表于 2012-4-24 08:05:25 |只看该作者
爱咋咋地!
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

地板
发表于 2012-5-9 23:26:07 |只看该作者
都闪开,介个帖子,偶来顶
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

5#
发表于 2012-5-10 23:21:25 |只看该作者
呵呵,很好,方便罗。
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

6#
发表于 2012-5-29 23:27:02 |只看该作者
先顶上去,偶要高亮加精鸟!
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2012-6-17 23:19:44 |只看该作者
呵呵,很好,方便罗。
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

8#
发表于 2012-6-29 23:24:55 |只看该作者
呵呵,很好,方便罗。
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

9#
发表于 2012-7-28 23:26:57 |只看该作者
我是老实人,我来也!
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

10#
发表于 2013-2-7 00:19:06 |只看该作者
先垫一块,再说鸟
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-8-5 15:40 , Processed in 0.075163 second(s), 28 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部