On 22. Apr 2009, at 17:26, Juan Hernando (via Nabble) wrote:
> >
> > No. My guess is that there is a bug in Projection::operator = ( Wall
> > ). This code is fairly new and hasn't been tested much yet.
> >
> > I don't have time right now to look into it. Can you investigate
> this,
> > or if you don't have the time either, open a bug?
> >
> It seems that the faulty piece of code is this:
> lib/client/projection.cpp:72
> if ( distance <= std::numeric_limits< float >::epsilon( ))
> distance = center.length();
>
> I don't understand why that comparison is there, overall because
> distance is default initialized to 1, so it won't hold unless distance
> is explicetly set.
The reason is that the projector distance is not 'saved' in the wall
description, therefore an arbitrary value has to be assumed. We've
decided to retain the previous distance (default 1), or use the
distance from the origin if it contains an invalid value.
> I haven't read Wall::operator= souce but it's funny that the
> following code:
> eq::Wall w, w2;
> eq::Projection p;
> ... initialize w ...
> w2 = w
> p = w;
> w = p;
> assert(w2 == w);
> always works independently of the the change above.
Yes, because the wall is not overspecified as the projection is. You
can create different projection descriptions (distance changes FOV and
origin) creating the same frustum.
Regarding your original question:
> But if I use a wall like
> wall
> {
> bottom_left [ -.32 -.32 -.75 ]
> bottom_right [ .32 -.32 -.75 ]
> top_left [ -.32 .32 -.75 ]
> }
> I get:
> - 46,2127ª from the frustum passed to frameDraw (which I suppose is
> fine)
> - and 35,48ª from config.getCanvases().front().getProjection().
This is ok: The 46 degrees are from the origin, the 35 degrees FOV
from the origin of the projector (which should not be 0,0,0). Removing
the if() clause above puts the projector in the origin _if_ the wall's
W vector goes through the origin. The current code puts the projector
always 'distance' meters in front of the wall.
Does that answer your question?
Cheers,
Stefan.
--
View this message in context:
http://n2.nabble.com/Projection-specification-quirks-tp2670459p2722934.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com