To answer my own question. The approach that worked was to just remove the
"zNear" plane from the Polytope. It is the last plane.
Seems like an unnecessary hack.
PolytopeIntersector* picker
= new PolytopeIntersector ( osgUtil::Intersector::PROJECTION, nx1,
ny1, nx2, ny2 );
auto pla
Hi,
I am using the PolytopeIntersector to select objects in a "selection box"
Works as expected in most cases.
However when I am "zoomed in" (perspective view) fairly tightly ( the eye
point is inside the bounding box of the geometry), the PolytopeIntersector
returns "no hits" on the geometry.
I
Hi,
I am looking for some clarification of the primitiveIndex value of polytope
intersection. I have added a very simple scene file containing 3 planar faces
of a cube with 6 triangles in a primitive set. I have been testing the
polytope intersector with osgkeyboardmouse using the following com
Thanks for the answer.
How could I solve this?
2016-12-04 12:47 GMT+00:00 Robert Osfield :
> Hi Bruno,
>
> The complication with AutoTransform is the it computes it's values
> only in the CullVisitor so you'll inherit what ever the last frame
> used for it's settings. This should work OK most of
Hi Bruno,
The complication with AutoTransform is the it computes it's values
only in the CullVisitor so you'll inherit what ever the last frame
used for it's settings. This should work OK most of the time. If you
have multiple views on the scene this will mean that there are
multiple stats but on
Hello,
in my scene graph I'm using an AutoTransform to add a circle with
Radius=10, centered on (0,0,0):
float Radius = 10;
for (int i = 0; i < nPointsInCircle; i++)
vertArray[i] = Vec3d( radius * sin(...), radius* cos(...), 0.));
then I add this to a Drawable + Geode, and add that Geode
Hi robertosfield,
Thank you for you reply.
This absolutley understandable. Every group can have it's own transformation
and so every group has it's own local coordinates. Quite clear.
So i guess there is absolutley no way to caluclate distances in
Worldcoordinates?
I admit, I don't understan
Hi David,
Way too much detail in a difficult form to follow when skimming over
things to spot what might going amiss.
The best I can suggest right now is think about the coordinate frame
that the distance and coordinate values are being reported in. If you
have transforms in your scene graph the
Hi,
I'm very sorry that i have to create a new post. I'm currently facing a problem
i can't solve on my own.
Im working on a single Model which has a lot of group nodes and geometry nodes.
This model is categorized in a few "main" groups.
In the beginning i worked only with one of this main
Hi Gianni,
On 03.11.2014 11:47, Gianni Ambrosio wrote:
> Hi Peter,
> thank you for the fast reply.
>
> I need some clarifications about question 1.
> In my application I will use the "picked" point to calculate, and then show,
> the arclength of a path, i.e. the length of the path from start to
Hi Peter,
thank you for the fast reply.
I need some clarifications about question 1.
In my application I will use the "picked" point to calculate, and then show,
the arclength of a path, i.e. the length of the path from start to the picked
point. So I would not need to show coordinates to the us
Hello Gianni,
2) line geometry is infinitely thin. To create an exact intersection with
another line in floating point precision is like winning the lottery. You
will want to use PolytopeIntersector to intersect with non-polygonal
geometry instead.
2014-11-03 10:37 GMT+01:00 Gianni Ambrosio :
>
Hi All,
I'm trying to handle mouse movements to show some informations to the user.
I have basically two questions.
1) Lookig at "osgkeyboardmouse.cpp" example found the following code:
Code:
if (_useWindowCoordinates)
{
// use window coordinates
Hi,
Thanks for the tips. I know the planes' orientations need to be right. I
assumed that by creating the Polytope from a BoundingBox that they would be,
and when I inspect the values I think they're correct. I did try flipping them
all in case I was wrong about the orientation, but that didn't
HI Chris,
It really is hard to know what is going on with your usage as I don't know
you data or the code that you are using with the OSG.
It could be a problem with the orientation of the planes of the Polytope -
they are need to be consistent with all their normals pointing inwards. If
you hav
Hi Chris,
I also fight a long time with PolytopeIntersector and PagedLOD. Did you add
callback to read your PagedLOD? See osgSim::LineOfSight for an example.
Does it help?
Regards
2014-03-12 21:15 GMT+01:00 Chris Long :
> Hi,
>
> I'm getting unexpected behavior from PolytopeIntersector and was
Hi,
I'm getting unexpected behavior from PolytopeIntersector and was wondering if
it might have something to do with the PagedLODs in my scene graph.
I want to find all polygons in a rectilinear volume in my model, in model
coordinates (not related to any view on the screen) based on two corner
Hi,
I'm also interested if you have a solution to easily pick points & lines !
Thank you!
Cheers,
Aurelien
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=52972#52972
___
osg-users mailing list
osg
On Thu, Mar 7, 2013 at 4:53 AM, Robert Milharcic <
robert.milhar...@ib-caddy.si> wrote:
> On 4.3.2013 11:05, Andreas Roth wrote:
>
>> hanks to Aurelien for the work-around.
>>
> Hi Andreas,
>
> That is of course my personal opinion, but i think PolytopeIntersector is
> overkill for most, if not al
On 4.3.2013 11:05, Andreas Roth wrote:
hanks to Aurelien for the work-around.
Hi Andreas,
That is of course my personal opinion, but i think PolytopeIntersector
is overkill for most, if not all usage scenarios plus it doesn't work
correctly on a scaled geometry. I simply took LineSegmentInter
Hi,
i tried to use the osgEarth::Picker class, which uses the
PolytopeIntersector for picking and came across the same issue.
I used Aurelien work-around and recalculate the distance, but as Aurelien
already mentioned it's quite slow because of all the recalculation and sorting.
Since Aurelien
Hi,
Yes, I'm facing the same problem.
I found a workaround by resorting intersections in a new container :
for each intersection :
- I compute the worldIntersectionPoint by transfoming the
localIntersectionPoint in world coordinates
- I compute the camera world position <-> worldIntersectionPoin
Peter Hrenka wrote:
>
> I had a partial fix which helped as long as there is no projection involved.
> Unfortunately that is probably the main use-case... I think the proper way to
> do this involves storing the inverse matrices in the result-structure and
> back-transforming the intersection
Hi Peter,
Yes this is a nice precision, the euclidian distance will be a second
pass to check the intersected results.
Thanks a lot :-)
Regards,
Vincent
Le 08/09/2011 10:21, Peter Hrenka a écrit :
Hi Vincent,
Am 08.09.2011 10:00, schrieb Vincent Bourdier:
Hi Peter
Le 08/09/2011 09:40,
Hi Vincent,
Am 08.09.2011 10:00, schrieb Vincent Bourdier:
> Hi Peter
>
> Le 08/09/2011 09:40, Peter Hrenka a écrit :
>>> The goal is to compute if a point is at less than a fixed distance from
>>> a node, and to my mind the intersection is the best way but maybe there
>>> is something more adapt
Hi Peter
Le 08/09/2011 09:40, Peter Hrenka a écrit :
The goal is to compute if a point is at less than a fixed distance from
a node, and to my mind the intersection is the best way but maybe there
is something more adapted ?
I think that should be possible.
I would recommend using a cube which
Hi Vincent,
Am 08.09.2011 08:51, schrieb Vincent Bourdier:
> Hi all,
>
> I'm currently trying to compute an intersection between a sphere and a
> node.
> PolytopeIntersector seems to be the best choice according to the
> documentation, but I didn't find any example of implementation.
Have a look
Hi all,
I'm currently trying to compute an intersection between a sphere and a
node.
PolytopeIntersector seems to be the best choice according to the
documentation, but I didn't find any example of implementation.
Next, are there some limitations to its usage ? (I saw something about
convex
Hi Peter,
Just I did notice that for long/skinny objects the bounding sphere is a very
poor fit. One option for me is to dig down and get the boundingBox() of the
drawable that lies as the basis of my geometry. In my experience, that can
allow for a much tighter fit for this type of selection.
Hi Andrew,
Andrew Cunningham schrieb:
Umm, I think I found my own answer.
- Subclass PolytopeIntersector to get access to the _polyTope member
- transform this PolyTope by the inverse camera projection matrix to put it
into world coords
- When processing the Node, get the Node's bounding spher
Umm, I think I found my own answer.
- Subclass PolytopeIntersector to get access to the _polyTope member
- transform this PolyTope by the inverse camera projection matrix to put it
into world coords
- When processing the Node, get the Node's bounding sphere, and transform that
by the Intersectio
Hi,
I am using the PolytopeIntersector to select , using a mouse based screen
rectangle, objects in my scene.
Works great. However, when post-processing the intersections returned by the
PolytopeIntersector I would like to check for certain nodes whether the
(bounding box of the ) node is ENT
Hi Peter,
I have no time to work on this either at the moment. I will just avoid the
scale transforms and scale the objects 'manually'.
Andrew
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16108#16108
Hi Andrew,
Andrew Cunningham schrieb:
Hi Peter,
Did you ever work up a fix for this?
...
I had a partial fix which helped as long as there is
no projection involved. Unfortunately that is probably
the main use-case... I think the proper way to do this
involves storing the inverse matrices in
Hi Peter,
Did you ever work up a fix for this?
...
Thank you!
Cheers,
Andrew
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16056#16056
___
osg-users mailing list
osg-users@lists.openscenegraph.or
Hi, Peter
Thanks for looking into this a tricky bug ... I got really lost trying to
trace the problem myself. good luck!
I think as a workaround I will scale the geometry manually without using a
transform.
Andrew
--
Read this topic online here:
http://forum.openscenegraph
Hi Andrew,
Andrew Cunningham schrieb:
Hi Peter,
Although your fix did not work - it is definitely the "scale" part of the
transform causing the problem. If I remove the scaling part of the transform , then the
polytope picking works as expected
...
Thank you for the example.
It turns
Hi Peter,
Although your fix did not work - it is definitely the "scale" part of the
transform causing the problem. If I remove the scaling part of the transform ,
then the polytope picking works as expected
...
Andrew
--
Read this topic online here:
http://forum.opensceneg
Hi again Andrew,
Andrew Cunningham schrieb:
Hi,
I am having some problems with the "distance" found by the PolytopeIntersector
but only when the geometry I am trying to pick has a non-null (Matrix)Transform in it's
parent.
The PolytopeIntersector registers that object as a 'hit', BUT the d
Hi Maxime,
Maxime BOUCHER schrieb:
Hi,
Just a question.
The polytopeIntersections compute the intersections with planes or "all"
"objects" in the Polytope?
I mean if I draw the "local intersection points" will I get an empty or full
shape of the polytope?
The polytopeIntersector perform
Hi,
Just a question.
The polytopeIntersections compute the intersections with planes or "all"
"objects" in the Polytope?
I mean if I draw the "local intersection points" will I get an empty or full
shape of the polytope?
I wonder because I tried a polytope with a single plane (to test), an
Hi Andrew,
Andrew Cunningham schrieb:
Hi,
I am having some problems with the "distance" found by the PolytopeIntersector
but only when the geometry I am trying to pick has a non-null (Matrix)Transform in it's
parent.
The PolytopeIntersector registers that object as a 'hit', BUT the distanc
Hi,
I am having some problems with the "distance" found by the PolytopeIntersector
but only when the geometry I am trying to pick has a non-null
(Matrix)Transform in it's parent.
The PolytopeIntersector registers that object as a 'hit', BUT the distance
recorded appears to be incorrect ( the
[quote]The point of Polytopes is that they are convex which makes
all kinds of tests very easy. If you want to modell something
non-convex (something like Constructive Solid Geometry) then
PolytopeIntersector will not help you as it is.[quote]
My solutution was to triangulate the convex polygon
Hi Maxime,
Maxime BOUCHER schrieb:
[...]
Peter Hrenka wrote:
You call the method accept(osg::NodeVisitor&) of your model (which is a
osg::Node).
See the example osgkeyboardmouse.
My bad, I should have seen it.
We certainly need an osgpolytopeintersector example...
Meanwhile "grep" is you
Thank you very much Peter.
Peter Hrenka wrote:
> Hi Maxime,
>
> The plane uses the above plane equation.
> (If you are familiar with projective spaces, the Vec4 can be seen
> as the projective normal in homogenous coordinates:
> (a,b,c,d) dot (x,y,z,w) = 0, where w=1 for affine points )
>
> Not
Hi Maxime,
Maxime BOUCHER schrieb:
Hi,
I have a lot of questions for you!
But, there is one really more critical than the others.
Let me just introduce the problem :).
(I am sorry if I bother, but I searched on the net, in the doc and examples
and didn't find answers. I apologize if this is
Hi,
I have a lot of questions for you!
But, there is one really more critical than the others.
Let me just introduce the problem :).
(I am sorry if I bother, but I searched on the net, in the doc and examples
and didn't find answers. I apologize if this is because I badly searched.)
I want t
Hi Robert,
The PolytopeIntersector just detects and records objects that
intersect with the Polytope, there is no interrelation between the
objects, there are all just independent intersections. So for the
functionality you are after you'll need to post process the list of
intersections.
OK,
Hi J-S,
The PolytopeIntersector just detects and records objects that
intersect with the Polytope, there is no interrelation between the
objects, there are all just independent intersections. So for the
functionality you are after you'll need to post process the list of
intersections.
I'm not 10
Hello all,
I am implementing box-selection of objects using
osgUtil::PolytopeIntersector. When I use LineSegmentIntersector, I know
that the first intersection returned is the closest object that was
intersected. In the case of PolytopeIntersector, I need something more.
Basically, I need to
Hi Gianloca,
Gianluca Natale wrote:
> Hi,
> I went deeply in debug into my code, and I discovered that the problem
> is in OSG v.2.2.
> Actually it returns the object with the shortest node path among those
> in the intersection vector.
> Was it a known bug?
No, I do not consider this a bug. As a
]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, January 10, 2008 9:05 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] polytopeIntersector
HI Gianluca,
In the 2.3.x dev release and SVN of the OSG there are improvements to
the PolytopeIntersector that might help you so it'
HI Gianluca,
In the 2.3.x dev release and SVN of the OSG there are improvements to
the PolytopeIntersector that might help you so it'd be worth trying
out over using 2.2
Robert.
On Jan 10, 2008 5:46 PM, Gianluca Natale <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi all!
>
>
>
> I'm trying to use a osgU
Hi Gianluca
You say you wish to get the nearest intersection with the PolytopeIntersector...
I think the mistake is here:
osg::NodePath& nodePath =
/*picker->getFirstIntersection()*/closestIntersection.nodePath;
If you want to have the nearest intersection, you must get the first
intersection
Hi all!
I'm trying to use a osgUtil::PolytopeIntersector
to find the closest object in my 3D scene graph (with OSG ver.2.2).
I read on the OSG QSG that it should return the closest object
as the first in the list of intersections.
But it is not like that!
I mean that the array of intersect
56 matches
Mail list logo