You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test/test_osg.py tests 4 and 5 fail.
Test 4:
{{{
n = osg.Node()
g = osg.Group()
g.addChild(n)
self.failUnless(n.getParent(0) == g) # fails
self.failUnless(g.getChild(0) == n) # fails
parents = n.getParents()
self.failUnless(parents[0] == g) # fails
}}}
Test 5:
{{{
sd = osg.ShapeDrawable(osg.Sphere(), None)
geode = osg.Geode()
geode.addDrawable(sd)
self.failUnless(sd.getParent(0) == geode) # fails
self.failUnless(geode.getDrawable(0) == sd) # fails
drawables = geode.getDrawableList()
self.failUnless(drawables[0] == sd) # fails
}}}
So it seems there is some copying going on, or for some other reason the
comparison fails. Perhaps it compares the addresses of the ref_ptrs instead
of using ref_ptr::operator== or comparing the pointers directly? Or perhaps
it stores the object in a ref_ptr, and getParent()/getChild()/getDrawable()
returns a pointer, and since the objects are not the same type the
comparison returns false by default?
I have at least verified that sd == sd returns true. This fails though:
{{{
n1 = g.getChild(0)
self.failUness(n1 == n)
}}}
So it would seem it's a copying issue.
Original issue reported on code.google.com by [email protected] on 11 Sep 2009 at 4:23
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 11 Sep 2009 at 4:23The text was updated successfully, but these errors were encountered: