[心得] Matrix Stack and the Visitor Pattern
最近在開發兩款用scene graph結構管理場景的framework
以前在寫ZedBox用的方法只能作到scene tree
scene tree是比較特殊的scene graph
一個child只能有一個parent
之前跟Minko的作者Jean-Marc Le Roux聊過
他提到Minko裡面的scene graph是用Visitor Pattern實作的
這時我才恍然大悟
於是我接下來開發scene graph的時候也用Visitor Pattern
並且搭配matrix stack來計算每個node的global transformation
以下是我的心得(含詳細講解與code範例)
http://blog.cjcat.net/2011/02/matrix-stack-and-the-visitor-pattern/
--
Blog http://blog.cjcat.net
Gallery http://cjcat2266.deviantart.com
ptt2 Board CJWorkshop
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.168.24.217
推
02/11 21:30, , 1F
02/11 21:30, 1F
推
02/12 22:12, , 2F
02/12 22:12, 2F
推
02/13 16:46, , 3F
02/13 16:46, 3F
推
02/14 18:51, , 4F
02/14 18:51, 4F
推
02/15 13:07, , 5F
02/15 13:07, 5F
→
02/15 15:22, , 6F
02/15 15:22, 6F
推
02/15 16:33, , 7F
02/15 16:33, 7F