Enrique Dumas wrote:
> " canvases[canvasId].getInverseVworldProjection(leftInverseProjection,
>
> rightInverseProjection);"
>
> and why it is hard to compute it by myself ?

I'm probably the wrong person to answer this, because I don't know
the minute details of the j3d implementation. I'll just answer in
hand-waving terms terms and then let the j3d guys rap me over the
knuckles when I say something stupid.
The view frustum is basically a description of the limits of visibility
in coordinate system of the virtual world. Building up this information
takes quite a lot of work if you don't have everything available to you.
The frustum consists of six planes, which together define a bounding
box. You can roughly calculate the sides of this box using the field of
view information, the aspect ratio of the screen and the clipping planes.

In making these calculations you then need to know how the screen
coordinates are being mapped to the world coordinates - the window
eyepoint policy (and maybe the movement policy?). Each of these stuff
around with the final projection information. Unfortunately it is not
just a simple UVN camera model we're dealing with here. In one of our
examples, the actual view frustum describes the 5 sides of a cave.
Usinng the j3d API call takes that into account for us. If you don't use
that call, you also then have to work out how many canvases are being
used, what their physical location is (Screen3D info) and then build up
your own frustum from the multiple smaller frustums. If you are doing
that every frame, it's soon going to be a performance issue. Even then,
I'm not entirely sure you'd get the right value anyway. Notice how many
people have problems understanding how just the basic clip policy works
without even thinking about multicanvas issues. There's definitely still
a large amount of black-magic going on down in the bowels of the Java3D
view model.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                               - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to