Class: QgsOrientedBox3D¶
- class qgis.core.QgsOrientedBox3D¶
Bases:
sip.wrapper
Represents a oriented (rotated) box in 3 dimensions.
Warning
Non-stable API, exposed to Python for unit testing only.
Added in version 3.34.
QgsOrientedBox3D() Constructor for a null oriented box.
QgsOrientedBox3D(center: Iterable[float], halfAxes: Iterable[float]) Constructor for a oriented box, with a specified center and half axes matrix.
QgsOrientedBox3D(center:
QgsVector3D
, halfAxes: Iterable[QgsVector3D]) Constructor for a oriented box, with a specified center and half axes matrix.QgsOrientedBox3D(
QgsOrientedBox3D
)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.
Constructs an oriented box from an axis-aligned bounding box.
Returns the half axes matrix;
Returns
True
if the box intersects theother
box.Returns
True
if the box is a null box.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.
- center(self) QgsVector3D ¶
Returns the vector to the center of the box.
- Return type:
- centerX(self) float ¶
Returns the center x-coordinate.
See also
See also
- Return type:
float
- centerY(self) float ¶
Returns the center y-coordinate.
See also
See also
- Return type:
float
- centerZ(self) float ¶
Returns the center z-coordinate.
See also
See also
- Return type:
float
- corners(self) List[QgsVector3D] ¶
Returns an array of all corners as 3D vectors.
- Return type:
List[QgsVector3D]
- fromBox3D(box: QgsBox3D) QgsOrientedBox3D ¶
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 ¶
Returns
True
if the box intersects theother
box.- Parameters:
other (QgsOrientedBox3D)
- Return type:
bool
- isNull(self) bool ¶
Returns
True
if the box is a null box.- Return type:
bool
- reprojectedExtent(self, ct: QgsCoordinateTransform) QgsBox3D ¶
Reprojects corners of this box using the given coordinate
transform
and returns axis-aligned box containing reprojected corners.- Raises:
- Parameters:
- Return type:
- size(self) QgsVector3D ¶
Returns size of sides of the box.
- Return type:
- transformed(self, transform: QgsMatrix4x4) QgsOrientedBox3D ¶
Returns box transformed by a 4x4 matrix.
- Parameters:
transform (QgsMatrix4x4)
- Return type: