I have a polygon managed by a osg::Geometry object that is interactively 
modified by the user.  Currently, only the point's positions are 
modified, not the number of points or any other attributes.  Each time a 
point is modified, a call to retessellatePolygon is made on a 
tessellator object.  The same Tessellator object is used multiple times 
for each modification.

Normally, this appears to work as expected, that is, it tessellates the 
object.  However if I create a quad, and move one corner to the opposite 
corner, collapsing it into a shape that looks like two lines, the 
polygon is no longer drawn even after the shape is modified so it's no 
longer collapsed.  If you are using a fixed-point font, the following 
ASCII diagram shows approximately how the shape is being modified:

a   b       a,d   b
+---+        +----+
|   |   -->  |
+---+        +
c   d        c

I get this behavior both with tessellation types TESS_TYPE_GEOMETRY and 
TESS_TYPE_DRAWABLE.  TESS_TYPE_POLYGONS seems to improperly tessellate 
the polygon after some modification.

What I want is for the tessellator to tessellate based on the original 
geometry plus the modified vertex positions.  Looking at how the the 
osgTessellator example uses the tessellator, I figured the way I was 
using it would work, but perhaps my mental model of it is flawed.  Do I 
need to recreate the geometry every time before I call retessellate?

- Eron

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to