[Ves] Bounds and dirtiness

Pat Marion pat.marion at kitware.com
Sat Jun 29 19:22:35 EDT 2013


Hi Eduardo,

I added your notes to an existing bug report, here:

http://public.kitware.com/Bug/view.php?id=14011

That bug report reports an issue which might be related.  Hopefully these
issues can be resolved by a review and fix to the bounds update code.  For
now, I'm afraid that calling setBoundsDirty() or setParentBoundsDirty() is
the main workaround until the issue is fixed.

Pat


On Sat, Jun 29, 2013 at 6:48 PM, Eduardo Poyart <poyart at gmail.com> wrote:

> Hello,
>
> I came across an interesting problem. I'm on stage/next, but I believe
> this happens with the current version as well.
>
> I have a class that is an ImageWidgetRepresentation, similar to
> vesKiwiImageWidgetRepresentation. It has a vesTransformNode, and underneath
> it, four children. The purpose of the vesTransformNode is so that I can
> rotate and translate the model with respect to the rest of the scene.
>
> However, whenever I translate the model, the bounds start to accumulate
> high values, affecting the outcome of a subsequent resetScene.
>
> I tracked it down to the updateBounds process. In
> vesTransformNode::updateBounds(vesNode& child), vesTransformNode looks at
> the bounds of the children, transform them with its own transform and then
> set these new values on the children.
>
> The problem is: in the children (vesActor::computeBounds()), there is a
> test for this->m_mapper->boundsDirty() before they reset their bounds
> according to the geometry. Since I never change the mapper, their bounds
> are never dirty. So, the children still have the transformed bounds that
> got stored there by the parent in the previous frame. The parent obtains
> them again, transforms them and stores them again, thereby accumulating the
> translations.
>
> I managed to figure out a fix: after I modify the vesTransformNode's
> transformation, I loop through all its children and set bounds dirty on
> their mappers.
>
> Is this a problem with the updateBounds process, or am I doing something
> wrong? The solution seems clumsy.
>
> Should vesTransformNode::updateBounds(vesNode& child) really set the
> bounds on the children? (see line that says child.setBounds(min, max)).
> What is the purpose of that?
>
> Thanks
> Eduardo
>
>
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130629/c052332d/attachment-0001.html>


More information about the Ves mailing list