Hi, everyone.

        I am currently trying to implement 'snaps' in my application. I
don't know if that's the standard nomenclature, so I'll explain briefly what
I mean with that.
       A snap is basically a sudden transformation of the shape on the
screen to a certain orientation and position in space when it reaches a
certain state in the scene. For example, when a point gets close to a plane,
it gets translated to its projection on the plane, which is exactly what I'm
trying to do in my application. For that, I thought of using bounding boxes.
But to be able to control the minimum distance in which the bb's will
intersect, I must set their extensions. While trying to do that with the
function 'set', my compiler accused the following error:

       "2 overloads have no legal conversion for 'this' pointer"

       I'll paste the source code I am using:

osg::ShapeDrawable* drawable = new osg::ShapeDrawable(new osg::Box(posicao,
largura, comprimento, espessura)); // these are the same arguments of the
function
(drawable->getBound()).set(-COMPRIMENTO - 0.1, -LARGURA - 0.1, -ESPESSURA -
0.1,
                                         COMPRIMENTO + 0.1, LARGURA + 0.1,
ESPESSURA + 0.1); // constants in capital letters

        Anyone could explain to me what's happening?

       Thanks for your help.

        Renan M Z Mendes
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to