Skip to content

Vector3D

Qt Base Class: QVector3D

Signature: QVector3D(self) -> None QVector3D(self, point: PySide6.QtCore.QPoint) -> None QVector3D(self, point: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) -> None QVector3D(self, vector: PySide6.QtGui.QVector2D) -> None QVector3D(self, vector: PySide6.QtGui.QVector2D, zpos: float) -> None QVector3D(self, vector: PySide6.QtGui.QVector4D) -> None QVector3D(self, xpos: float, ypos: float, zpos: float) -> None

Base classes

Name Children Inherits
QVector3D
PySide6.QtGui
QVector3D(self) -> None

⋔ Inheritance diagram

graph TD
  1473245639248["gui.Vector3D"]
  1473299661792["QtGui.QVector3D"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473299661792 --> 1473245639248
  1473291690208 --> 1473299661792
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QVector3D

Source code in prettyqt\gui\vector3d.py
class Vector3D(QtGui.QVector3D):
    def __bool__(self):
        return not self.isNull()

    def __abs__(self) -> float:
        return self.length()

    @property
    def _x(self) -> float:
        return self.x()

    @property
    def _y(self) -> float:
        return self.y()

    @property
    def _z(self) -> float:
        return self.z()

    __match_args__ = ("_x", "_y", "z")

    def __reduce__(self):
        return type(self), (self.x(), self.y(), self.z())

    def to_point(self) -> core.Point:
        return core.Point(self.toPoint())

    def to_pointf(self) -> core.PointF:
        return core.PointF(self.toPointF())