|
给大家分享一个小经验,算是自己学习的一个心得吧。
' T1 {2 n# k- U9 u$ y% g4 x: P' v5 G) ^. \; r1 x
大家使用flexsim做对象指代,特别是在树中查找对象的时候有很多方法,现在我教大家一个:如图
& Q, A/ z( t5 h% P* V$ C2 b
2 b F; h" u" S" U3 V当看到一些节点,这些节点只有一串数值,且后面还注释这一串地址,那么我告诉大家其实这串数值就是地址所指向的节点的引用。那么我们可以使用tonode()函数来返回该节点,还能使用up()函数返回该节点上级的节点,还能使用ownerobject()函数返回该实体。7 r5 _1 F* S8 a
2 }+ s+ J% M( i( e4 b8 T
这么做的话,大大提高了建模速度。+ A$ @: Z1 z8 R5 a
tonode() : Assert type as a node pointer.
; _0 p+ }5 x. Q# r. D" A ?up(): This command returns the node in the tree that contains thenode.+ o8 w$ W+ J' n. X
ownerobject(): This command returns the node with object data attached to it that is the start of the sub-tree that thenode is in. In other words, it returns the object node that contains thenode. 0 H: {' p0 g# h+ [" Q) O6 ~
: h. S( h% W) ~, K, Atonode() : Assert type as a node pointer.+ ~+ V9 A: d- ]$ b
up(): This command returns the node in the tree that contains thenode.
2 m$ ~' }$ b! r) n) `3 J% N* Fownerobject(): This command returns the node with object data attached to it that is the start of the sub-tree that thenode is in. In other words, it returns the object node that contains thenode. |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|