Hi Julien-Charles,

Julien-Charles Lévesque schrieb:
Hi Peter,

What do you mean by a degenerated polytope of volume 0 ? That polytope definitely doesn't have a null volume since I've been using it to select objects in my application and it works.

The four planes all have the same starting point because I want the polytope to be a pyramid coming out from a user's hand, so the planes -should- all intersect at the summit, no ?

You are right. I did not look closely enough and assumed
you where trying to build a parallel polytope.
The polytope looks to be alright.


Julien-Charles

On Thu, Feb 4, 2010 at 8:35 AM, Peter Hrenka <[email protected] <mailto:[email protected]>> wrote:

    Hi Julien-Charles,

    Julien-Charles Lévesque schrieb:

        [...]


        Here is my code... stripped down to a minimum. I assume that you
        have a 4x4 matrix containing orientation of your selector
        (lOrientation) and a vec3 containing it's position (lPosition).
        I built the polytope to point in the direction of positive
        y-axis. Sorry for the french variable names and comments here
        and there... I don't think they hurt readability much at this
        level :P

        However, I wasn't able to extract a reliable 3x3 rotation matrix
        from mouse coordinates. I can only say that this code works well
        with the raw 3x3 orientation and position provided by my
        tracker. Do you have any idea for a desktop variation ? I can
        implement it. I could also integrate all this in the
        examplekeyboardmouse, once I've figured out how to do it with a
        mouse :P

I would suggest to control the rotation and position
using the keyboard. This should be enough for the
purpose of an osg-example. I think it would be nice
if the polytope would be visualized as a wireframe
model.
I also would suggest of creating a new osgpolytopeintersector-
example because nobody really looks into osgkeyboardmouse
when looking for polytope-intersection functionality...



Cheers,

Peter
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to