[osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-23 Thread Sanat Talmaki
Hi, Hi, I am working on an application that is currently using a Cylinder Drawable object. However I had read that if you have plans on using drawables in a final application that needs high-performance then you probably should create your own geometry library. (from osghelp site) I am usin

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-23 Thread Jean-Sébastien Guay
Hi Sanat, I am working on an application that is currently using a Cylinder Drawable object. You probably mean ShapeDrawable, since Drawable is the base class for all drawable objects (including osg::Geometry). How Can I go from using a Drawable to actual geometry ? You have to calculat

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-23 Thread Sanat Talmaki
Hi Jean, Thanks for your post. It was very helpful indeed. (yes I mean ShapeDrawable) My main reason for wanting to create Geometry is that I need to divide the Cylinder object into primitives for further processing and the parser that I had written doesn't seem to work with an osg file created

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-23 Thread Jean-Sébastien Guay
Hi Sanat, My main reason for wanting to create Geometry is that I need to divide the Cylinder object into primitives for further processing and the parser that I had written doesn't seem to work with an osg file created from ShapeDrawable. So I inferred that I need to create geometry rather th

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-23 Thread Chris 'Xenon' Hanson
On 2/23/2011 7:45 PM, Jean-Sébastien Guay wrote: >> My main reason for wanting to create Geometry is that I need to divide the >> Cylinder >> object into primitives for further processing and the parser that I had >> written doesn't >> seem to work with an osg file created from ShapeDrawable. >>

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-24 Thread Sanat Talmaki
Hi Chris, Thanks for the link. I'll take a look. Seems very promising. Thanks Sanat. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37089#37089 ___ osg-users mailing list osg-users@lists.opensceneg

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-02-27 Thread Sanat Talmaki
Hi Jean, I modified the code in the functions and it seemed fairly straightforward. However, I notice that all the cylinders are rendered at the origin inspite of me doing a glTranslate (which I have commented out now). When I opened the osg file I noticed that the matrix had its last column a

Re: [osg-users] Replace Drawable With Actual Geomtry (how to)??

2011-03-02 Thread Sanat Talmaki
The problem with the code was that I was not setting the matrix translation and rotation correctly. I was doing the following which was not working: translateToCenter = Code: osg::Matrix::translate(osg::Vec3(shapefileVertexArray->at(i).x(),