info-inventor-dev
[Top] [All Lists]

Projectin a 2D point into Worldspace, for makeing up worldspace ray toge

To: info-inventor-dev@xxxxxxxxxxx
Subject: Projectin a 2D point into Worldspace, for makeing up worldspace ray together with actual viewing direction
From: Christoph Hintermüller <hinzge@xxxxxxxxxxxxxx>
Date: Fri, 04 May 2001 12:34:40 +0200
Sender: owner-info-inventor-dev@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux 2.4.0 i686; en-US; 0.8.1) Gecko/20010326
Hi
I do have the folowing problem to solve:
1) leth the user draw a 2D polygon onto the screen
2) project each point of the polygon back to worldspace as near as possible to the eye
3) take reproceted points and the actual viewing direction to project the drawn polygon onto
the underlying surface.
4) i have to save all necessary informations in order to be able to modifiy the selection with further ones from other viewing directions and zooming sizes
5) i have tor check wether points from the acutal surfaceoutline lie inside tha new polygon and decide onto the characteristics of the polygon wether to remove the point from the
surface outline or not .
6) take the surfacepoints from the actual selection and check wether they ly inside the
polygons beeing dravn before and again decide wether to add the poitn to the resultin
outline or not
7) before adding/keeping/removing the points in 5) and 6) check wether the point can be seen
from the actual point of view or not and if not do not touch it at all or ignore it.
for 1) i can use some tools allready done by others.
for three i consided kusing the SoRayPickaction with an Worldspace ray set.


But for 2) i don't know exactly what to use
I till now extract the camera from the XtExamineViewer, or better the cameras Viewing Volume
the viewers Vewport Region But i don't know what i still need to make step 3 independent
from the actual view and to be able to reapply 3 for 7) without bothering about the actual
point and direction of view
for 3) i think of using SoRayPickAction in worldspace Ray mode
- 4) is oen by copying all the necessary informations
- 5) is so far doen by taking the saved viewing volume and using the world to screen
projection function in order to get the projection point in normalized screen cooridnates
and than the point is located in realtion to the saved original screen polygon.
- 6) is doen in the sam way as 5 only that instead of the allready acepted surfacepoints the
newly determined surfacepoints are projected onto the screen the former polygons were drawn
- 7) use 3) for degtermining wether a point beeing located inside the the polygon can be seen
form the actual point of view or not, if not the point is ignored (menas is either kept in
surface outline or just left aside.


My problem is how to get a 2d screnn point into world space only dependent on the state
of the viewer/camera at thime when the corresponding poly gon was drawn
And which informations to save in order to reproduce the projections onto the screen and back at a time when the viwer/camera sate has definitly changed since saving.


I do need this in order to enable the user to draw exact outlines onto the underneath surface. This is used or better needed for example to mark a region on the surface inside
which an extrution having the drawn schape should take place.


the whole reprocection thing and viewer/cmaera independent stuff should be there for convenience reasons in order to allow the user to correct and refine the outline without
the need of complete redraw.


cu
Christoph Hintermüller
Technical University Graz Austria



--
THESIS:     God is alive
PROOVE:     Who else would have scheduled the mankind and world first
            recommendation of resrearch????
CONCLUSION: Scientists do what he wants, willing or not:)


<Prev in Thread] Current Thread [Next in Thread>