Hi Jan,

I'm glad you are using it, I'm answering you below.

2012/9/5 Jan Ciger <jan.ci...@gmail.com>

> Hello Rafael,
>
> I have tried your osgAndroid library, it does indeed work for me after
> fixing few details, such as incorrect project references in Eclipse.
>

Nice to hear that worked for you, Could you post me the changes?, If the
changes are related to the Android.mk files, this is something you need to
change in order to build against OSG (maybe I need to add the note to the
wiki). If are related to the eclipse projects I will be happy to fix them
:).


>
> However, I see a weird bug. I have modified the OSGOverlayCamera example
> to load three .ive files - a cube, floor plane and a monkey mesh (Suzanne
> from Blender). That works ok. However, as soon as I use MatrixTransforms to
> move things around or to scale them, it goes wrong. E.g. setting scale
> factor to 0.1 makes my geometry reliably vanish (4x4 scaling matrix with
> 0.1 on diagonal and 1 in the last element). Using scaling coefficient of
> 0.2 doesn't make it vanish, but doesn't scale it neither ?!
>
> Then I wanted to swap the axes, because my geometry is y-up. So I have
> used this matrix:
>
> Matrix(1, 0, 0, 0,
>            0, 0, 1, 0,
>            0, -1, 0, 0,
>            0, 0, 0, 1);
>
> However, if I use this, add the geometry as children to this matrix and
> set the matrix as scene data to the viewer, the geometry "explodes" (it is
> stretched out into infinity) - as if division by zero was happening
> somewhere or the matrix was singular (it obviously isn't).
>
> Of course, the same geometry configuration with the same matrices is
> working just fine if I add the matching C++ code to the native OSG example
> from the OSG source. What is going on? Some sort of JNI type conversion
> issue? I am not a JNI expert, so I have no clue there ...
>
> For the record, I am testing this on an Acer Iconia A500 tablet, with the
> Ice Cream Sandwich. It has Tegra 2 (without Neon, so using armeabi ABI)
> chipset.
>
> What is going on here?
>

I've been using MatrixTransform for AR applications and I don't remember
that kind of issues, but JNI stuff is tricky and maybe there is a bug
there. Sometimes if you don't keep correctly the reference count of OSG
objects between Java and C++ weird things happen.

Could you post the code or a simple example so I could check it on my side?
Anyway I'm going to test it in order to replicate your problem.

I have a Samsung Galaxy S with Android 2.3.6.

Regards,
Rafa.



>
> Regards,
>
> Jan
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Rafael Gaitán Linares
CTO at Mirage Technologies S.L - http://www.mirage-tech.com
gvSIG3D Developer - http://gvsig3d.blogspot.com
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to