On Fri, May 9, 2008 at 1:12 PM, Ulrich Hertlein <[EMAIL PROTECTED]> wrote:
> Robert Osfield wrote:
>>
>> downside is that rendering once built into the display lists won't be
>> updated automatically.  To get ShapeDrawable to update the display
>> list simple do drawable->dirtyDisplayList(false).
>
> Would it make sense to dirty the ShapeDrawable automatically when the shape
> is changed using 'setShape'?

setShape would need to be changed to be a virtual method to achieve this as its
currently only implemented in the Drawable base class, here setShape
is just a handle
for setting the shape used for collision detection algorithms.

I actual regret writing ShapeDrawable now, it was only ever intended
to be quite and dirty way
to visual a shape, and never a general purpose tool for visualising
shapes that users actual want
so its always falling short of people expectations.  It's design
doesn't lend itself to becoming
a general purpose shape visualization tool either, rather its a dead
end design that's used far
too widely for its own or its users good.

An alternative might be to just have a createGeometry(osg::Shape&)
function that builds a geometry
that given a shape.  Or perhaps rewrite ShapeDrawable so it "is a"
Geometry, or "has a" Geometry.  Suggestions
welcome.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to