Re: [osg-users] Using vec3d for CullStack eye point

2009-04-21 Thread Robert Osfield
On Tue, Apr 21, 2009 at 2:40 AM, Ravi Mathur  wrote:
>  I would think that anyone who intentionally requests double precision
> matrices is doing so out of need, and would probably be willing to accept
> the inevitable performance hit.

You've got things the wrong way round, the OSG builds double matrices
by default, so there has to be an intentional request for float
precision.

Changing the eye point to double probably won't cause performance
problems, but one has to be wary of this.

As for double precision of the eye point, you're the first person to
request this, and there are plenty of others handling geocentric
databases, so needing double matrices isn't necessarily mean that ones
requires a double eye precision.  Having doubles is no bad thing
though, as long as there isn't a performance hit nor awkwardness in
integration with other parts of the OSG.


> Is there anything I should do to get this change started?  I'm sure you are
> busy with other issues so I can try it out on my computer tomorrow to see if
> there are any unexpected hangups.

Dive in a code up a solution and see if there are any problems.  If
things pan out OK submit your changes to osg-submisssions.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using vec3d for CullStack eye point

2009-04-20 Thread Ravi Mathur
 I would think that anyone who intentionally requests double  
precision matrices is doing so out of need, and would probably be  
willing to accept the inevitable performance hit.


Is there anything I should do to get this change started?  I'm sure  
you are busy with other issues so I can try it out on my computer  
tomorrow to see if there are any unexpected hangups.


Ravi

On Apr 20, 2009, at 3:55 PM, Robert Osfield wrote:

On Mon, Apr 20, 2009 at 9:37 PM, Ravi Mathur  
 wrote:
So would it be worth it to implement the CullStack::EyePointStack  
typedef as
Vec3d/Vec3f depending on the value of the OSG_USE_FLOAT_MATRIX  
compile

variable?


Yes I think this would make sense.  We'd need to mindful of any
performance consequences of doing this, but for the most part I
wouldn't have thought it would be issue.

Robert.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using vec3d for CullStack eye point

2009-04-20 Thread Robert Osfield
On Mon, Apr 20, 2009 at 9:37 PM, Ravi Mathur  wrote:
> So would it be worth it to implement the CullStack::EyePointStack typedef as
> Vec3d/Vec3f depending on the value of the OSG_USE_FLOAT_MATRIX compile
> variable?

Yes I think this would make sense.  We'd need to mindful of any
performance consequences of doing this, but for the most part I
wouldn't have thought it would be issue.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Using vec3d for CullStack eye point

2009-04-20 Thread Ravi Mathur

Hey all,

First off, this is NOT another "can we change all vec3 to vec3d"  
thread. My question is more specific. :)


In osg::CullStack, the EyePointStack is a Vec3 stack, therefore a  
Vec3f stack.  However, the stack itself is built up using elements  
from a osg::Matrix, which could be a Matrixd (if so chosen from  
OSG_USE_FLOAT_MATRIX).  For users like me who need a Vec3d eye point,  
the EyePointStack becomes useless because it only stores Vec3f  
values.  So we end up having to do redundant work (although admittedly  
not difficult work) to recover the eye point from the CullStack's  
modelview matrix.


So would it be worth it to implement the CullStack::EyePointStack  
typedef as Vec3d/Vec3f depending on the value of the  
OSG_USE_FLOAT_MATRIX compile variable?


Thanks,
Ravi
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org