[osg-users] dynamic_cast equivalent in osgDotNet

2007-10-02 Thread Christoffer Markusson
Hi, What is the equivalence in C# using the osgDotNet wrappers to do the following? osgGA::GUIActionAdapter& aa osgViewer::Viewer* viewer = dynamic_cast( &aa ); Christoffer ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.open

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-02 Thread Christophe Medard
Markusson" <[EMAIL PROTECTED]> To: Sent: Tuesday, October 02, 2007 12:26 PM Subject: [osg-users] dynamic_cast equivalent in osgDotNet > Hi, > > What is the equivalence in C# using the osgDotNet wrappers to do the > following? > > osgGA::GUIActionAdapter& aa >

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-02 Thread Christoffer Markusson
Hi Christophe, That gives error message "Cannot convert type 'OsgGA.GUIActionAdapter' to 'OsgViewer.Viewer' via a built-in conversion". Doing a direct cast, "viewer = (OsgViewer.Viewer)aa", also gives a error message when compiling in Visual Studio 2005. Christoffer >Christophe Medard christop

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-02 Thread Christophe Medard
29 - Original Message - From: "Christoffer Markusson" <[EMAIL PROTECTED]> To: Sent: Tuesday, October 02, 2007 1:24 PM Subject: Re: [osg-users] dynamic_cast equivalent in osgDotNet > Hi Christophe, > > That gives error message > > "Cannot convert typ

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-02 Thread Michael Wittman
t; > > - Original Message - > From: "Christoffer Markusson" <[EMAIL PROTECTED]> > To: > Sent: Tuesday, October 02, 2007 1:24 PM > Subject: Re: [osg-users] dynamic_cast equivalent in osgDotNet > > > > Hi Christophe, > > > >

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-03 Thread Robert Osfield
On 10/3/07, Michael Wittman <[EMAIL PROTECTED]> wrote: > It's possible to add support to osgDotNet for upcasts along non-leftmost > inheritance branches. But downcasting in the same situation is a much > harder problem, and I don't know of a good solution for it at the moment. Perhaps we could ad

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-03 Thread Michael Wittman
Hi Robert, On Wed, Oct 03, 2007 at 09:11:21AM +0100, Robert Osfield wrote: > On 10/3/07, Michael Wittman <[EMAIL PROTECTED]> wrote: > > It's possible to add support to osgDotNet for upcasts along non-leftmost > > inheritance branches. But downcasting in the same situation is a much > > harder pro

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-04 Thread Robert Osfield
Hi Michael, osgGA knows about core osg wher osg::View is defined, so could this work? Robert. On 10/4/07, Michael Wittman <[EMAIL PROTECTED]> wrote: > Hi Robert, > > On Wed, Oct 03, 2007 at 09:11:21AM +0100, Robert Osfield wrote: > > On 10/3/07, Michael Wittman <[EMAIL PROTECTED]> wrote: > > > I

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-04 Thread Michael Wittman
On Thu, Oct 04, 2007 at 08:56:55AM +0100, Robert Osfield wrote: > osgGA knows about core osg wher osg::View is defined, so could this work? Yes, actually that would work well in this case as it would provide a pointer to an object in the leftmost inheritance branch of osgViewer::Viewer. The outpu

Re: [osg-users] dynamic_cast equivalent in osgDotNet

2007-10-05 Thread Robert Osfield
On 10/5/07, Michael Wittman <[EMAIL PROTECTED]> wrote: > On Thu, Oct 04, 2007 at 08:56:55AM +0100, Robert Osfield wrote: > > osgGA knows about core osg wher osg::View is defined, so could this work? > > Yes, actually that would work well in this case as it would > provide a pointer to an object in