def hook(dct): if dct["__class__"] == Point.__name__: return Point.hook(dct) elif dct["__class__"] == Pave.__name__: return Pave( dct["width"], dct["length"], dct["height"], dct["centre"], [dct["vertices"][i] for i in range(len(dct["vertices"]))])
def hook(dct): if dct["__class__"] == Point.__name__: return Point.hook(dct) elif dct["__class__"] == Polygone3D.__name__: return Polygone3D(centre=dct["centre"], vertices=[ dct["vertices"][i] for i in range(len(dct["vertices"])) ])
def hook(dct): """ On ne copie pas la liste d'objets à ingorer""" if dct["__class__"] == Point.__name__: return Point.hook(dct) elif dct["__class__"] == Vecteur.__name__: return Vecteur.hook(dct) elif dct["__class__"] == Arene.__name__: return Arene.hook(dct) elif dct["__class__"] == VueMatriceArene.__name__: return VueMatriceArene(dct["arene"], dct["origine"], dct["ox"], dct["ajuste"], dct["matrice"])
def hook(dct): if dct["__class__"] == Objet3D.__name__: return Objet3D(dct["centre"]) elif dct["__class__"] == Point.__name__: return Point.hook(dct)
def hook(dct): """ On ne récupère pas la liste d'objest à ignorer""" if dct["__class__"] == Point.__name__: return Point.hook(dct) elif dct["__class__"] == Roue.__name__: return Roue(**{key: dct[key] for key in Roue.KEYS})