def register(self, mod): """ Registers the module. """ verifyClass(IModule, type(mod)) self._registry[mod.name] = mod self._mod_type_reg.setdefault(type(mod),[]).append(mod)
def register(self, mod): """ Registers the module. """ verifyClass(IModule, type(mod)) self._registry[mod.name] = mod self._mod_type_reg.setdefault(type(mod), []).append(mod)
def init(self, parent, name, scene, direction, min_force, max_force, material, position = Ogre.Vector3.ZERO, orientation = Ogre.Quaternion.IDENTITY, scale = Ogre.Vector3(1,1,1)): core.verifyClass(IPart, parent) #Visual.init(self, parent, name, scene, mesh, material, position, # orietnation, scale) # Switch me back after the scene node issue is fixed Object.init(parent, name) Thruster._create(self, scene, min_force, max_force, direction, mesh, material, position, orientation, scale)
def _create_object(self, node, iface, parent = None): _class = core.Component.get_class(iface, node['type']) core.verifyClass(IKMLStorable, _class) # Build parameters to pass to __init__ kwargs = {} # General parameters kwargs['name'] = node['name'] kwargs['position'] = node['position'] kwargs['orientation'] = Quat(node['orientation'], axis_angle = True) # Get all the class specific arguments kwargs.update(_class.kml_load(node)) # Create the class return _class(**kwargs)
def _create_object(self, node, iface, parent=None): _class = core.Component.get_class(iface, node['type']) core.verifyClass(IKMLStorable, _class) # Build parameters to pass to __init__ kwargs = {} # General parameters kwargs['name'] = node['name'] kwargs['position'] = node['position'] kwargs['orientation'] = Quat(node['orientation'], axis_angle=True) # Get all the class specific arguments kwargs.update(_class.kml_load(node)) # Create the class return _class(**kwargs)
def init(self, parent, name, scene, direction, min_force, max_force, material, position=Ogre.Vector3.ZERO, orientation=Ogre.Quaternion.IDENTITY, scale=Ogre.Vector3(1, 1, 1)): core.verifyClass(IPart, parent) #Visual.init(self, parent, name, scene, mesh, material, position, # orietnation, scale) # Switch me back after the scene node issue is fixed Object.init(parent, name) Thruster._create(self, scene, min_force, max_force, direction, mesh, material, position, orientation, scale)