Hello Christian,

On 2014-07-16 15:06, Christian Bar wrote:
> Hello! I am experiencing a problem with the QuadTreeTerrain rendering.
> With the test project everything works, but when I tried to implement it
> inside my project the terrain shows just some little parts of it (also
> with wrong triangles, this one seems like an indexing problem).
> After lot of trials, it seems to me that the quadtree algorithm does not
> work properly when the terrain is not in the origin of the world
> coordinates.

hmm, possible, it may never have been located anywhere but at the origin.

[snip]
> I also tried to use the 'terrain->setEyePoint()' and
> 'terrain->setEyePointValid()', but it works (again) only if the terrain
> is in the origin.

In which coordinate system did you specify the eye point? For example 
was the eye point you set in the terrain's local coordinate system or in 
world coordinates?

> What can I do to solve my problem? Thank you!

My guess would be that the camera position (either the one derived from 
the active camera or the one set explicitly) are not transformed to 
local coordinates. I don't have the code in front of me right now (can 
take a look tomorrow), but my hope would be that the eye position is 
calculate only in one (or very few) places and only needs to be 
multiplied with the inverse transform of the current node.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to