QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
QgsOrientedBox3D Class Reference

Represents a oriented (rotated) box in 3 dimensions. More...

#include <qgsorientedbox3d.h>

Public Member Functions

 QgsOrientedBox3D ()
 Constructor for a null oriented box.
 
 QgsOrientedBox3D (const QgsVector3D &center, const QList< QgsVector3D > &halfAxes)
 Constructor for a oriented box, with a specified center and half axes matrix.
 
 QgsOrientedBox3D (const QList< double > &center, const QList< double > &halfAxes)
 Constructor for a oriented box, with a specified center and half axes matrix.
 
QgsVector3D center () const
 Returns the vector to the center of the box.
 
double centerX () const
 Returns the center x-coordinate.
 
double centerY () const
 Returns the center y-coordinate.
 
double centerZ () const
 Returns the center z-coordinate.
 
QVector< QgsVector3Dcorners () const
 Returns an array of all corners as 3D vectors.
 
QgsBox3D extent () const
 Returns the overall bounding box of the object.
 
const double * halfAxes () const
 Returns the half axes matrix;.
 
QList< double > halfAxesList () const
 Returns the half axes matrix;.
 
bool intersects (const QgsOrientedBox3D &other) const
 Returns true if the box intersects the other box.
 
bool isNull () const
 Returns true if the box is a null box.
 
bool operator!= (const QgsOrientedBox3D &other) const
 
bool operator== (const QgsOrientedBox3D &other) const
 
QgsBox3D reprojectedExtent (const QgsCoordinateTransform &ct) const
 Reprojects corners of this box using the given coordinate transform and returns axis-aligned box containing reprojected corners.
 
QgsVector3D size () const
 Returns size of sides of the box.
 
QgsOrientedBox3D transformed (const QgsMatrix4x4 &transform) const
 Returns box transformed by a 4x4 matrix.
 

Static Public Member Functions

static QgsOrientedBox3D fromBox3D (const QgsBox3D &box)
 Constructs an oriented box from an axis-aligned bounding box.
 

Friends

class QgsCesiumUtils
 

Detailed Description

Represents a oriented (rotated) box in 3 dimensions.

Warning
Non-stable API, exposed to Python for unit testing only.
Since
QGIS 3.34

Definition at line 43 of file qgsorientedbox3d.h.

Constructor & Destructor Documentation

◆ QgsOrientedBox3D() [1/3]

QgsOrientedBox3D::QgsOrientedBox3D ( )
default

Constructor for a null oriented box.

◆ QgsOrientedBox3D() [2/3]

QgsOrientedBox3D::QgsOrientedBox3D ( const QList< double > &  center,
const QList< double > &  halfAxes 
)

Constructor for a oriented box, with a specified center and half axes matrix.

Definition at line 27 of file qgsorientedbox3d.cpp.

◆ QgsOrientedBox3D() [3/3]

QgsOrientedBox3D::QgsOrientedBox3D ( const QgsVector3D center,
const QList< QgsVector3D > &  halfAxes 
)

Constructor for a oriented box, with a specified center and half axes matrix.

Definition at line 44 of file qgsorientedbox3d.cpp.

Member Function Documentation

◆ center()

QgsVector3D QgsOrientedBox3D::center ( ) const
inline

Returns the vector to the center of the box.

Definition at line 120 of file qgsorientedbox3d.h.

◆ centerX()

double QgsOrientedBox3D::centerX ( ) const
inline

Returns the center x-coordinate.

See also
centerY()
centerZ()

Definition at line 99 of file qgsorientedbox3d.h.

◆ centerY()

double QgsOrientedBox3D::centerY ( ) const
inline

Returns the center y-coordinate.

See also
centerX()
centerZ()

Definition at line 107 of file qgsorientedbox3d.h.

◆ centerZ()

double QgsOrientedBox3D::centerZ ( ) const
inline

Returns the center z-coordinate.

See also
centerX()
centerY()

Definition at line 115 of file qgsorientedbox3d.h.

◆ corners()

QVector< QgsVector3D > QgsOrientedBox3D::corners ( ) const

Returns an array of all corners as 3D vectors.

Definition at line 105 of file qgsorientedbox3d.cpp.

◆ extent()

QgsBox3D QgsOrientedBox3D::extent ( ) const

Returns the overall bounding box of the object.

Definition at line 86 of file qgsorientedbox3d.cpp.

◆ fromBox3D()

QgsOrientedBox3D QgsOrientedBox3D::fromBox3D ( const QgsBox3D box)
static

Constructs an oriented box from an axis-aligned bounding box.

Definition at line 60 of file qgsorientedbox3d.cpp.

◆ halfAxes()

const double * QgsOrientedBox3D::halfAxes ( ) const
inline

Returns the half axes matrix;.

Definition at line 125 of file qgsorientedbox3d.h.

◆ halfAxesList()

QList< double > QgsOrientedBox3D::halfAxesList ( ) const

Returns the half axes matrix;.

Definition at line 75 of file qgsorientedbox3d.cpp.

◆ intersects()

bool QgsOrientedBox3D::intersects ( const QgsOrientedBox3D other) const

Returns true if the box intersects the other box.

Definition at line 177 of file qgsorientedbox3d.cpp.

◆ isNull()

bool QgsOrientedBox3D::isNull ( ) const

Returns true if the box is a null box.

Definition at line 70 of file qgsorientedbox3d.cpp.

◆ operator!=()

bool QgsOrientedBox3D::operator!= ( const QgsOrientedBox3D other) const
inline

Definition at line 83 of file qgsorientedbox3d.h.

◆ operator==()

bool QgsOrientedBox3D::operator== ( const QgsOrientedBox3D other) const
inline

Definition at line 67 of file qgsorientedbox3d.h.

◆ reprojectedExtent()

QgsBox3D QgsOrientedBox3D::reprojectedExtent ( const QgsCoordinateTransform ct) const

Reprojects corners of this box using the given coordinate transform and returns axis-aligned box containing reprojected corners.

Exceptions
QgsCsException

Definition at line 133 of file qgsorientedbox3d.cpp.

◆ size()

QgsVector3D QgsOrientedBox3D::size ( ) const

Returns size of sides of the box.

Definition at line 125 of file qgsorientedbox3d.cpp.

◆ transformed()

QgsOrientedBox3D QgsOrientedBox3D::transformed ( const QgsMatrix4x4 transform) const

Returns box transformed by a 4x4 matrix.

Definition at line 157 of file qgsorientedbox3d.cpp.

Friends And Related Symbol Documentation

◆ QgsCesiumUtils

friend class QgsCesiumUtils
friend

Definition at line 189 of file qgsorientedbox3d.h.


The documentation for this class was generated from the following files: