def isInWindow(self, vec: QVector3D) -> bool: xMin, yMin = self.vMin.asTuple() xMax, yMax = self.vMax.asTuple() if vec.x() < xMin or vec.x() > xMax: return False if vec.y() < yMin or vec.y() > yMax: return False return True
def get_real_2d_coords_from_theoretical_3d_coords(self, point: QVector3D): z = point.x() y = point.y() x = point.z() x_2 = -(x - z) * sqrt(3) / 2 y_2 = -((x + z) / 2 - y) return self.get_real_coord(QPointF(x_2, y_2))
def get_coords_from_3d(self, point: QVector3D, k): return QPointF(point.x() - k * point.z() / 2, point.y() - k * point.z() / 2)