|
From: Matthias B. <ba...@ir...> - 2004-08-05 16:09:52
|
Hi,
I have implemented the previously mentioned space restructuring
(SpaceBase, SimpleSpace, HashSpace, QuadTreeSpace classes and a factory
function Space). Now there's a problem with the XODE reader because it's
assuming ode.Space is a class and not a function (e.g. when using
isinstance()). The unit test produces exceptions like this:
File "C:\PROGRA~1\PROGRA~1\Python23\Lib\site-packages\xode\geom.py",
line 20, in __init__
self._space = self.getFirstAncestor(ode.Space).getODEObject()
File "C:\PROGRA~1\PROGRA~1\Python23\Lib\site-packages\xode\node.py",
line 209, in getFirstAncestor
if (isinstance(parent.getODEObject(), type)):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes
and types
So is this a real problem or can it be easily fixed? (you could use
SpaceBase instead of Space. However, I don't know if you have to be able
to create instances of the class you're using. You can't create
instances from SpaceBase)
By the way, what kind of Space will the XODE reader create? By browsing
through the XODE spec it seems there's no way to specify which space
should be used...(or did I miss something?).
- Matthias -
|