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 to cut my primitives along the frustum of a camera.

1) 
 To do this I first have to get my planes equations. I have found a page 
dealing about this problem in OpenGL:
http://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf
 I think I'll use it, replacing in OSG conventions.

I also found this:
http://markmail.org/message/eeolcuruqpsbgrgu#query:osg%20frustum+page:1+mid:eeolcuruqpsbgrgu+state:results
 
>From famous Paul ;).
 Well, it draws the frustum, but it can be used to get the planes equations.

(for whom it may interest)


2)
 Then I have my equations.
Thus I can declare many osg::Plane.
Question
 If the plane is a Vec4d (a,b,c,d) does it well represent the equation
ax+by+cz+d = 0 ?


 I would like to use a PolytopeIntersector. In the doc it's written planes 
normals have to point the inside of the polytope.
Question
 How are the normals set when the plane is initialized?

Question
 Is there any problem declaring a non-closed (also called opened) polytope? I 
don't mind about the far plane.
 
3) Once I have a polytope, I would like to intersect the polytope with the 
scene.
 Thus I declare a PolytopeIntersector I associate to an IntersectionVisitor.
The BIG Question
 How do I associate the IntersectionVisitor to a model? 
I saw for a LineIntersector it is possible to associate it to a view via 
computeIntersections(), but it doesn't seem possible to do the same with 
polytope. 

4)
Question
 Having the intersected points, is it possible to "easily" get the primitive or 
do I have to use this (it is in french, sorry):
http://www.enseignement.polytechnique.fr/profs/informatique/Philippe.Chassignet/03-04/INF_431/td_16.html
(exercise 4)



Thank you a lot!

Cheers,
Maxime

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=14070#14070





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

Reply via email to