Class: QgsOrientedBox3D¶
Represents a oriented (rotated) box in 3 dimensions.
Warning
Non-stable API, exposed to Python for unit testing only.
Added in version 3.34.
Methods
Returns the vector to the center of the box.  | 
|
Returns the center x-coordinate.  | 
|
Returns the center y-coordinate.  | 
|
Returns the center z-coordinate.  | 
|
Returns an array of all corners as 3D vectors.  | 
|
Returns the overall bounding box of the object.  | 
|
Returns the half axes matrix;  | 
|
Returns   | 
|
Returns   | 
|
Reprojects corners of this box using the given coordinate transform and returns axis-aligned box containing reprojected corners.  | 
|
Returns size of sides of the box.  | 
|
Returns box transformed by a 4x4 matrix.  | 
Static Methods
Constructs an oriented box from an axis-aligned bounding box.  | 
- class qgis.core.QgsOrientedBox3D[source]¶
 Bases:
object- __init__()
 Constructor for a null oriented box.
- __init__(center: Iterable[float], halfAxes: Iterable[float])
 Constructor for a oriented box, with a specified center and half axes matrix.
- Parameters:
 center (Iterable[float])
halfAxes (Iterable[float])
- __init__(center: QgsVector3D, halfAxes: Iterable[QgsVector3D])
 Constructor for a oriented box, with a specified center and half axes matrix.
- Parameters:
 center (QgsVector3D)
halfAxes (Iterable[QgsVector3D])
- __init__(a0: QgsOrientedBox3D)
 - Parameters:
 a0 (QgsOrientedBox3D)
- center(self) QgsVector3D[source]¶
 Returns the vector to the center of the box.
- Return type:
 
- corners(self) List[QgsVector3D]¶
 Returns an array of all corners as 3D vectors.
- Return type:
 List[QgsVector3D]
- static fromBox3D(box: QgsBox3D) QgsOrientedBox3D[source]¶
 Constructs an oriented box from an axis-aligned bounding box.
- Parameters:
 box (QgsBox3D)
- Return type:
 
- halfAxes(self) List[float]¶
 Returns the half axes matrix;
- Return type:
 List[float]
- intersects(self, other: QgsOrientedBox3D) bool[source]¶
 Returns
Trueif the box intersects theotherbox.- Parameters:
 other (QgsOrientedBox3D)
- Return type:
 bool
- reprojectedExtent(self, ct: QgsCoordinateTransform) QgsBox3D[source]¶
 Reprojects corners of this box using the given coordinate
transformand returns axis-aligned box containing reprojected corners.- Raises:
 - Parameters:
 - Return type:
 
- size(self) QgsVector3D[source]¶
 Returns size of sides of the box.
- Return type:
 
- transformed(self, transform: QgsMatrix4x4) QgsOrientedBox3D[source]¶
 Returns box transformed by a 4x4 matrix.
- Parameters:
 transform (QgsMatrix4x4)
- Return type: