示例#1
0
文件: Pave.py 项目: IlyesBB/gl_robot
 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"]))])
示例#2
0
 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"]))
                           ])
示例#3
0
 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"])
示例#4
0
 def hook(dct):
     if dct["__class__"] == Objet3D.__name__:
         return Objet3D(dct["centre"])
     elif dct["__class__"] == Point.__name__:
         return Point.hook(dct)
示例#5
0
文件: Roue.py 项目: IlyesBB/gl_robot
 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})