Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Thrall, Bryan
Martin Beckett wrote on Friday, September 04, 2009 5:20 PM: Hi, I have a class derived from PositionAttitudeTransform. It's simply an Adapter it contains no new variables but fixes up some methods for osg::PAT to be used in an existing design for some navigation routines. The existing

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Gordon Tomlinson
Don't think so, __ Gordon Tomlinson gor...@gordontomlinson.com IM: gordon3db...@3dscenegraph.com www.vis-sim.com www.gordontomlinson.com

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Martin Beckett
[quote=Paul Martz]If you can (obviously) change your code to understand instances of your new custom class, then I don't understand why you can't change your code to understand instances of ref_ptrs to your new custom class. Please explain this restriction further. I have a complicated

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Ismail Pazarbasi
2009/9/5 Martin Beckett m...@mgbeckett.com: [quote=Paul Martz]If you can (obviously) change your code to understand instances of your new custom class, then I don't understand why you can't change your code to understand instances of ref_ptrs to your new custom class. Please explain this

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Martin Beckett
Thanks but not really - then I can't use the new class in the scene graph. The idea was to have a 'location' object in the scenegraph which is a PAT as far as OSG is concerned but has methods which reflect the interface I'm used to and fit the needs of my problem domain. That I can do with an

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Ismail Pazarbasi
Hi Martin, 2009/9/5 Martin Beckett m...@mgbeckett.com: Thanks but not really - then I can't use the new class in the scene graph. Yes, you can, can't you? Pass your objects to constructor. I wouldn't do it, but you want if you want to. class MyAdapter { typedef osg::ref_ptrosg::PAT

Re: [osg-users] Derived classes and ref_ptr

2009-09-04 Thread Ismail Pazarbasi
It appears that I forgot comments in constructors. 2009/9/5 Ismail Pazarbasi pazarb...@gmail.com: [snip] class MyAdapter {  typedef osg::ref_ptrosg::PAT osg_pat_type;  osg_pat_type m_sppat; public: // here is missing part  // you will use this constructor to pass a osg::ref_ptrosg::PAT