Re: [osg-users] Why is Vec not a template?

2010-10-23 Thread Robert Osfield
Hi Jan, On Sat, Oct 23, 2010 at 4:58 AM, Jan Ciger wrote: > Now on a tangent a bit, but as we are discussing code design here: is > there a particular reason why the osg::PositionAttitudeTransform is not > a subclass of osg::MatrixTransform? It seems rather illogical and makes > for messy problem

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Robert, On 10/22/2010 10:03 PM, Robert Osfield wrote: > Hi Brad, > > On Fri, Oct 22, 2010 at 8:13 PM, Brad Colbert wrote: >> One thing I would like to see is, where possible, taking advantage of >> SSE(2/3) instructions on CPU's that have the

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Robert Osfield
Hi Brad, On Fri, Oct 22, 2010 at 8:13 PM, Brad Colbert wrote: > One thing I would like to see is, where possible, taking advantage of > SSE(2/3) instructions on CPU's that have them.  I imagine that there could be > some speed up, especially if operations could be batched (I'm sure a whole > o

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Brad Colbert
22, 2010 11:36 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Why is Vec not a template? Hi Brad, On Fri, Oct 22, 2010 at 6:17 PM, Brad Colbert wrote: > A templated Vec class isn't all that hard to implement and maintain, it's > pretty straight forward. There are awkward

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Robert Osfield
Hi Brad, On Fri, Oct 22, 2010 at 6:17 PM, Brad Colbert wrote: > A templated Vec class isn't all that hard to implement and maintain, it's > pretty straight forward. There are awkward, and making it templated is totally pointless. What is there to gain? > What's a pain is a templated Matrix cl

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Brad Colbert
ing on the task. -B -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mathias Goldau Sent: Friday, October 22, 2010 6:46 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Why is Vec

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Robert Osfield
Hi Mathias, On Fri, Oct 22, 2010 at 2:45 PM, Mathias Goldau wrote: > I really could imagine that a template< size_t, typename value_type > is > indeed really awkward and hard to maintain. But so you will have much more > code duplication. There is practically no maintenance work required on the

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Mathias Goldau
Am 22.10.2010 14:37, Robert Osfield wrote: > Hi Mathias, > > On Fri, Oct 22, 2010 at 1:01 PM, Mathias Goldau > wrote: >> I just wondered why Vec3 and related Vec classes are all different classes >> and >> why they aren't realized as templates? > > Because templates aren't always the perfect to

Re: [osg-users] Why is Vec not a template?

2010-10-22 Thread Robert Osfield
Hi Mathias, On Fri, Oct 22, 2010 at 1:01 PM, Mathias Goldau wrote: > I just wondered why Vec3 and related Vec classes are all different classes and > why they aren't realized as templates? Because templates aren't always the perfect tool for the job. Three main reasons : specialization of types

[osg-users] Why is Vec not a template?

2010-10-22 Thread Mathias Goldau
Hi, I just wondered why Vec3 and related Vec classes are all different classes and why they aren't realized as templates? best regards Mathias -- Institut für Informatik Universität Leipzig Johannisgasse 26, 04103 Leipzig Phone: +493419732283 ___ osg-