Exemplo n.º 1
0
 def data(self, data):
     self.geometry = Geometry.from_data(data['geometry'])
     self.origin = Origin.from_data(
         data['origin']) if data['origin'] else None
     self.name = data['name']
     self.attr = _attr_from_data(data['attr'])
     self.init_transformation = Transformation.from_data(
         data['init_transformation']
     ) if data['init_transformation'] else None
     self.current_transformation = Transformation.from_data(
         data['current_transformation']
     ) if data['current_transformation'] else None
Exemplo n.º 2
0
 def from_data(cls, data):
     visual = cls(Geometry.from_data(data['geometry']))
     visual.data = data
     return visual
Exemplo n.º 3
0
 def from_data(cls, data):
     collision = cls(Geometry.from_data(data['geometry']))
     collision.data = data
     return collision