Beispiel #1
0
 def __init__(self, parameters, *args, **kwargs):
     """
     Hangar class constructor.
     """
     super().__init__("Hangar", parameters, *args, **kwargs)
     self._dimensions = parameters.dimensions_hangar
     self.vertices = utils.pos_to_vertices(self.position, self.dimensions)
Beispiel #2
0
 def __init__(self, parameters, *args, **kwargs):
     """
     Mobile class constructor.
     """
     super().__init__("Mobile", parameters, *args, **kwargs)
     self._dimensions = parameters.dimensions_mobile
     self.vertices = utils.pos_to_vertices(self.position, self.dimensions)
Beispiel #3
0
 def __init__(self, name, dimensions):
     """
     Object3d class constructor.
     """
     self._name = name
     self._position = Coord6d([0, 0, 0, 0, 0, 0])
     self._dimensions = dimensions
     self.vertices = pos_to_vertices(self._position, self._dimensions)
Beispiel #4
0
 def move(self, destination):
     """
     Move a mobile.
     """
     # change position
     self.position.move(destination)
     # refresh the vertices
     self.vertices = pos_to_vertices(self.position, self.dimensions)
Beispiel #5
0
 def position(self, destination):
     """
     Move a mobile.
     """
     # change position
     self._position = destination
     # refresh the vertices
     self.vertices = utils.pos_to_vertices(self.position, self.dimensions)
     print(f"{self.name} has moved!")