def add_child(self, child):
        """Adds an object as a child in the scene graph."""
        if not issubclass(child.__class__, SceneGraph):
            raise TypeError("child must have parent/child iteration implemented to be a node in a SceneGraph.")
        # if not hasattr(child, 'update'):
            # raise TypeError("child must have an attribute update()")

        child._parent = self
        self._children.append(child)
def add_child ( self , child ) : if not issubclass ( child . __class__ , SceneGraph ) : raise TypeError ( "child must have parent/child iteration implemented to be a node in a SceneGraph." ) child . _parent = self self . _children . append ( child )
Adds an object as a child in the scene graph.