예제 #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
파일: Objet3D.py 프로젝트: IlyesBB/gl_robot
 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})