gerwindehaan / osgswig

Python bindings for OpenSceneGraph (auto-export from code.google.com/p/osgswig)
Other
1 stars 1 forks source link

osg.BoundingSphere.center() returns trash #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
See attached example code & data file.  Apparently, osgswig is assuming the
returned value is an osg.Vec3d when it is in fact an osg.Vec3f.  

In our build of OSG-2.6.1, OSG_USE_FLOAT_BOUNDINGSPHERE is ON--is it
perhaps different in yours?

--------------------------------------------------------------------------------
Platform          Windows-XP-5.1.2600-SP3
Architecture      ('32bit', 'WindowsPE')
Machine           x86
--
Python build      ('r261:67517', 'Dec  4 2008 16:51:00')
Python compiler   MSC v.1500 32 bit (Intel)
--
osg.osgGetLibraryName                   OpenSceneGraph Library
osg.osgGetVersion                       2.6.1
osg.osgGetSOVersion                     48
osg Python library location          : 
c:\python26\lib\site-packages\osgswig-0.9.1\osg.pyc
osg Dynamic linked library location  :  <module '_osg' from
'c:\python26\lib\site-packages\osgswig-0.9.1\_osg.pyd'>
--
osgDB.osgGetLibraryName                 OpenSceneGraph DB (Data Base) Library
osgDB.osgGetVersion                     2.6.1
osgDB Python library location        : 
c:\python26\lib\site-packages\osgswig-0.9.1\osgDB.pyc
osgDB Dynamic linked library location:  <module '_osgDB' from
'c:\python26\lib\site-packages\osgswig-0.9.1\_osgDB.pyd'>
--------------------------------------------------------------------------------

Original issue reported on code.google.com by rfritz...@gmail.com on 8 Mar 2009 at 10:30

Attachments:

GoogleCodeExporter commented 9 years ago
Problem also occurs with BoundingBox.center(), _min, and _max.

Original comment by rfritz...@gmail.com on 24 Mar 2009 at 12:04

GoogleCodeExporter commented 9 years ago
Just tried this on osg 2.4 and have the following results:

ctr (Vec3d) =  [26, 4.5, 1.17341]
type(ctr) = <class 'osg.Vec3f'>
ctr (Vec3f) =  26.0 4.5 1.17341041565

Original comment by gerwinde...@gmail.com on 24 Mar 2009 at 5:54

GoogleCodeExporter commented 9 years ago
Hmmm, seems to be confused by our 64-bit processor.

My (default) build has the following in the Config header:

#define OSG_USE_FLOAT_BOUNDINGSPHERE
#define OSG_USE_FLOAT_BOUNDINGBOX

Original comment by rfritz...@gmail.com on 24 Mar 2009 at 6:14