Thanks Stephan, you answer was very helpful. After some headbanging I have it
working seemingly flawless. Here is the code for reference:
Code:
osg::Vec3d rayIntersectWithXYPlane(float x, float y, osg::Node* widget) {
// flip mouse y axis
y = ofGetHeight() - y; //important
o
Hi Stefan,
stefan nortd schrieb:
> So I found some code for intersecting a line with a plane.
> What I am missing is how do I translate the mouse pointer
> coordinates into a line expressed in local coordinates?
>
> Here the intersection code if anybody is interested:
There's a class called o
So I found some code for intersecting a line with a plane.
What I am missing is how do I translate the mouse pointer
coordinates into a line expressed in local coordinates?
Here the intersection code if anybody is interested:
Code:
bool getPlaneLineIntersection(const osg::Vec4d& plane,
So far so good. The culling works as expected. I can now define a custom active
invisible area and the picking works with it. Unfortunately it did not quite
tackle my problem with dragging.
The question have now: How do I manually intersect a ray with the x/y-plane of
geode?
The problem I have
Hi Stefan,
So I found this in osgManipulator but I belive I could use this code independantly of it.
Yes, definitely. This will work even outside osgManipulator (I was going
to reply pointing you to this very code, glad you found it by yourself)
The reason why this works is that the drawabl
I think I just found some code that would do what I want. Let me know if there
is a better way of doing this both in regard of the custom active area and the
drag issue.
So I found this in osgManipulator but I belive I could use this code
independantly of it. The idea is to add a cull callback
Hi osg crew,
Learning osg has been really interesting and the documentation got so much
better since the last time I checked it out. Congrats!
How do I add invisible (always culled) geometry to a geode that can be picked?
What I want to do is control the active area independently from that visi
7 matches
Mail list logo