[osg-users] osgTerrain::TerrainTile not in parental list (??)

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Tue Dec 6 09:16:23 PST 2016


Thanks Robert ! Very well explained !

Cheers!
Nick

On Tue, Dec 6, 2016 at 10:17 AM, Robert Osfield <robert.osfield at gmail.com>
wrote:

> Hi Nick,
>
> On 6 December 2016 at 05:38, Trajce Nikolov NICK
> <trajce.nikolov.nick at gmail.com> wrote:
> > Hi Robert, Community,
> >
> > This might sounds stupid so I am apologize upfront. I spent some time
> > reading the code of TerrainTile and I am seeing it as a Group (right?).
> When
> > using NodeVisitors I am seeing the TerrainTiles as part of the scene.
> When I
> > want to use it as ordinary Group it is not.
> >
> > For example, I have this scene:
> > PagedLOD->Group->TerrainTile->MatrixTransform->Geode
> >
> > MatrixTransform is reporting 0 numParents and
> Geode->getParentalNodePaths is
> > up to the MatrixTransform
> >
> > I am confused. I am after replacing the TerrainTile with my own
> Group/Node
>
> The TerrainTile "has a" TerrainTechnique, and it's the concrete
> TerrainTechnique (such as GeometryTechnique) to take the elevant and
> image layers assigned to the TerrailTile and create a local subgraph
> capable of rendering that data.
>
> It's entirely up to the TerrainTechnique how it creates and manages
> it's own local subgraph graph, and typically won't directly assign it
> to the main scene graph, rather it it's self contained within the
> TerrainTechnique, this means the parent can be null for the topmost
> node in the local subgraph.  This subgraph is still traversed because
> TerrainTile calls TerrainTechnique on each traversal, and the
> TerrainTechnique implementation can decide how best to do the
> traversal of it's local subgraph.
>
> The fact that the local subraphs are traversed means that the
> NodeVisitor's that are doing the traversal will collect the full
> NodePath from the root of the scene graph down through the TerrainTile
> to the local subgraph, so if you want  the parental chain then a
> visitor will provide this for you.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161206/cd87a4c5/attachment-0003.htm>


More information about the osg-users mailing list