Hi,

On Sun, 2008-12-14 at 18:40 +0100, Christoph Schäfer wrote:
> Hi!
> 
> Has anybody yet designed something like an observer for OSG::Node (or others) 
> to send a notification to another object on  e.g. setting a new 
> transformation matrix, adding children,…? 
> 
> I’m thinking about sub classing OSG::Node to be able to implement an observer 
> pattern. But since I’m using two aspects in my project I don’t know how this 
> will work out with ...MTRecPtr e.g.
> 
> Probably OpenSG has some similar concept to observers already implemented but 
> I just don’t see it?
> 
> Any suggestions/thoughts about this topics are very much appreciated ☺

Kind of, you can attach changed callbacks to any container. These are
boost functions which take the changed container and the mask which
field did change as an argument. A simple example can be found in 

Source/System/FieldContainer/Base/testChangedCallback.cpp

Based on these there are FieldConnectors which give you route like
functionality. The ComplexSceneManager uses them to do the 
animation parts (The vrml/osg loader can create those). 


kind regards,
  gerrit



------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to