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
You seem to use the same base-point for all but one
plane:
lPlane.set(lNorm, lPosition);
This will give you a degenerated polytope of
volume 0.
Try using
lPlane.set(lNorm, lPosition-radius*lNorm);
with some radius > 0
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