Hi Anthony,

ShapeDrawable supports the Drawable::accept(PrimitiveFunctor&)
interface so you can implement your own custom PrimitiveFunctor to get
access to the vertex and primitive data.  You can even use the
TriangleFunctor that subclasses from PrimitiveFunctor and breaks the
primitives all down into triangles.  The
src/osgUtil/LineSegmentIntersector.cpp is a example of this in action.

However, I'm not sure why you don't just access the heightfield
directly and infer your own triangles from it.  You don't say anything
about what you want to do with the triangles so I really can't say
much about what route would be best.

Robert.

On Thu, Dec 17, 2009 at 9:03 AM, Anthony Face <[email protected]> wrote:
> Helo everybody,
>
> I am triing to put an HeightField derived class into triangles Polygons.
> I found how to do with "Geometrie" but not for "ShapeDrawable"
>
> My siplified code do something like:
>
>
>
> Code:
>
> new shapeDrawable(new HeightField);
>
>
>
>
> Default polygon mode is QUAD i realy need to got TRIANGLE.
>
>
> sorry if question already asked but i did not found the answer by search!
>
> Thank you for helping!
>
> Anthony[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=21598#21598
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to