Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquick3dxrspatialanchor_p.h>
Public Types | |
enum class | Classification { Unknown , Wall , Ceiling , Floor , Table , Seat , Window , Door , Other } |
Signals | |
void | offset3DChanged () |
void | extent3DChanged () |
void | positionChanged () |
void | rotationChanged () |
void | classificationChanged () |
void | classificationStringChanged () |
void | has2DBoundsChanged () |
void | has3DBoundsChanged () |
void | offset2DChanged () |
void | extent2DChanged () |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QQuick3DXrSpatialAnchor (QtQuick3DXr::XrSpaceId space, QUuid &uuid, QObject *parent=nullptr) | |
\qmltype XrSpatialAnchor \inherits QtObject \inqmlmodule QtQuick3D.Xr | |
~QQuick3DXrSpatialAnchor () override | |
QVector3D | offset3D () const |
\qmlproperty vector3d XrSpatialAnchor::offset3D | |
void | setOffset3D (const QVector3D &newOffset) |
QVector3D | extent3D () const |
\qmlproperty vector3d XrSpatialAnchor::extent3D | |
void | setExtent3D (const QVector3D &newExtent) |
QVector3D | position () const |
\qmlproperty vector3d XrSpatialAnchor::position | |
void | setPosition (const QVector3D &newPosition) |
QQuaternion | rotation () const |
\qmlproperty quaternion XrSpatialAnchor::rotation | |
void | setRotation (const QQuaternion &newRotation) |
Classification | classification () const |
\qmlproperty enumeration XrSpatialAnchor::classification | |
void | setClassification (Classification newClassification) |
QString | classificationString () const |
\qmlproperty string XrSpatialAnchor::classificationString | |
void | setClassificationString (const QString &newClassificationString) |
bool | has2DBounds () const |
\qmlproperty bool XrSpatialAnchor::has2DBounds | |
void | setBounds2D (const QVector2D &offset, const QVector2D &extent) |
bool | has3DBounds () const |
\qmlproperty bool XrSpatialAnchor::has3DBounds | |
void | setBounds3D (const QVector3D &offset, const QVector3D &extent) |
QVector2D | offset2D () const |
\qmlproperty vector2d XrSpatialAnchor::offset2D | |
QVector2D | extent2D () const |
\qmlproperty vector2d XrSpatialAnchor::extent2D | |
QString | identifier () const |
\qmlproperty string XrSpatialAnchor::identifier | |
QSet< QUuid > | roomLayoutUuids () const |
void | setRoomLayoutUuids (const QSet< QUuid > &newRoomLayoutUuids) |
QSet< QUuid > | spaceContainerUuids () const |
void | setSpaceContainerUuids (const QSet< QUuid > &newSpaceContainerUuids) |
QtQuick3DXr::XrSpaceId | space () const |
Public Member Functions inherited from QObject | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
bool | moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL) |
Changes the thread affinity for this object and its children and returns true on success. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
void | killTimer (Qt::TimerId id) |
template<typename T > | |
T | findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
T | findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Properties | |
bool | has2DBounds |
bool | has3DBounds |
QVector2D | offset2D |
QVector2D | extent2D |
QVector3D | offset3D |
QVector3D | extent3D |
QVector3D | position |
QQuaternion | rotation |
Classification | classification |
QString | classificationString |
QString | identifier |
Properties inherited from QObject | |
QString | objectName |
the name of this object | |
Friends | |
class | QQuick3DXrAnchorManager |
Additional Inherited Members | |
Public Slots inherited from QObject | |
void | deleteLater () |
\threadsafe | |
Static Public Member Functions inherited from QObject | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
Protected Member Functions inherited from QObject | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Protected Attributes inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Related Symbols inherited from QObject | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 32 of file qquick3dxrspatialanchor_p.h.
|
strong |
Enumerator | |
---|---|
Unknown | |
Wall | |
Ceiling | |
Floor | |
Table | |
Seat | |
Window | |
Door | |
Other |
Definition at line 51 of file qquick3dxrspatialanchor_p.h.
QT_BEGIN_NAMESPACE QQuick3DXrSpatialAnchor::QQuick3DXrSpatialAnchor | ( | QtQuick3DXr::XrSpaceId | space, |
QUuid & | uuid, | ||
QObject * | parent = nullptr ) |
\qmltype XrSpatialAnchor \inherits QtObject \inqmlmodule QtQuick3D.Xr
Tracks a specific location or object in real space.
This type represents a spatial anchor that tracks a specific location or object in real space. It provides information about the anchor's position, rotation, classification, and bounds.
Spatial anchors are accessed through an \l XrSpatialAnchorListModel.
See the \l{Qt Quick 3D - XR Spatial Anchors Example} for how to use this type.
\qmlproperty enumeration XrSpatialAnchor::Classification
The classification of the spatial anchor. \readonly
The Classification enum provides a set of predefined category types that describe the purpose or context of a spatial anchor.
\value Classification.Unknown The label has not been set or identified. \value Classification.Wall The anchor represents a wall. \value Classification.Ceiling The anchor represents a ceiling. \value Classification.Floor The anchor represents a floor. \value Classification.Table The anchor represents a table. \value Classification.Seat The anchor represents a seat. \value Classification.Window The anchor represents a window. \value Classification.Door The anchor represents a door. \value Classification.Other The anchor was not identified as any of the above types. See: \l classificationString
The following table shows the mapping between the classification type in \qxr, OpenXR, and VisionOS. If the classification type from the system falls outside of the defined types, then the Type is set to Other
, and the system type is provided by the \l classificationString property.
{Other}.\table \header
Definition at line 110 of file qquick3dxrspatialanchor.cpp.
|
override |
Definition at line 117 of file qquick3dxrspatialanchor.cpp.
QQuick3DXrSpatialAnchor::Classification QQuick3DXrSpatialAnchor::classification | ( | ) | const |
\qmlproperty enumeration XrSpatialAnchor::classification
The classification type of the spatial anchor. \readonly
This property returns the \l {XrSpatialAnchor::Classification}{classification type} for this anchor (for example,Table
or Floor
) describing the anchor's purpose or context.
Other
and the \l classificationString property will contain the original label.Definition at line 226 of file qquick3dxrspatialanchor.cpp.
|
signal |
QString QQuick3DXrSpatialAnchor::classificationString | ( | ) | const |
\qmlproperty string XrSpatialAnchor::classificationString
The classification type of the spatial anchor as a string. \readonly
This property returns the classification type as a string if one exists. If the classification type is not in the set of types defined by the \l Classification enums, the label is set to Other
, and this property can be used to access the type as it was reported by the system.
Definition at line 254 of file qquick3dxrspatialanchor.cpp.
|
signal |
QVector2D QQuick3DXrSpatialAnchor::extent2D | ( | ) | const |
\qmlproperty vector2d XrSpatialAnchor::extent2D
The 2D extent of the spatial anchor. \readonly
This property holds the spatial anchor's size in two dimensions (width and height) within the X/Z plane. It is valid when \l has2DBounds is true
.
Definition at line 359 of file qquick3dxrspatialanchor.cpp.
|
signal |
QVector3D QQuick3DXrSpatialAnchor::extent3D | ( | ) | const |
\qmlproperty vector3d XrSpatialAnchor::extent3D
The 3D extent of the spatial anchor. \readonly
This property specifies the spatial anchor's volume in three dimensions (width, height, and depth). It is valid when \l has3DBounds is true
.
Definition at line 155 of file qquick3dxrspatialanchor.cpp.
|
signal |
bool QQuick3DXrSpatialAnchor::has2DBounds | ( | ) | const |
\qmlproperty bool XrSpatialAnchor::has2DBounds
Indicates whether the spatial anchor has 2D bounds. \readonly
This property holds true
if the spatial anchor has 2D bounds, described by \l offset2D and \l extent2D, indicating that it represents a flat surface (for example, a floor or wall).
Otherwise, it returns false.
Definition at line 280 of file qquick3dxrspatialanchor.cpp.
|
signal |
bool QQuick3DXrSpatialAnchor::has3DBounds | ( | ) | const |
\qmlproperty bool XrSpatialAnchor::has3DBounds
Indicates whether the spatial anchor has 3D bounds. \readonly
This property returns true
if the spatial anchor has 3D bounds, indicating that it represents a volume (for example, a table or a cupboard). The bounds are described by \l offset3D and \l extent3D.
Otherwise, it returns false
.
Definition at line 313 of file qquick3dxrspatialanchor.cpp.
|
signal |
QString QQuick3DXrSpatialAnchor::identifier | ( | ) | const |
\qmlproperty string XrSpatialAnchor::identifier
A unique identifier for this spatial anchor. \readonly
This property holds a unique identifier associated with the spatial anchor. This is the same identifier referenced by a \l XrSpatialAnchorListModel.
Definition at line 373 of file qquick3dxrspatialanchor.cpp.
QVector2D QQuick3DXrSpatialAnchor::offset2D | ( | ) | const |
\qmlproperty vector2d XrSpatialAnchor::offset2D
The 2D offset of the spatial anchor.
\readonly This property holds the offset of the anchor's bounds within the X/Z plane. It is valid when \l has2DBounds is true
.
Definition at line 343 of file qquick3dxrspatialanchor.cpp.
|
signal |
QVector3D QQuick3DXrSpatialAnchor::offset3D | ( | ) | const |
\qmlproperty vector3d XrSpatialAnchor::offset3D
The 3D offset of the spatial anchor. \readonly
This property provides the 3D offset of the anchor's bounds (in meters) from the anchor's \l position.
Definition at line 131 of file qquick3dxrspatialanchor.cpp.
|
signal |
QVector3D QQuick3DXrSpatialAnchor::position | ( | ) | const |
\qmlproperty vector3d XrSpatialAnchor::position
The position of the spatial anchor.
\readonly This property returns the 3D position (in meters) of the spatial anchor's origin within the session's coordinate system.
Definition at line 177 of file qquick3dxrspatialanchor.cpp.
|
signal |
Definition at line 378 of file qquick3dxrspatialanchor.cpp.
QQuaternion QQuick3DXrSpatialAnchor::rotation | ( | ) | const |
\qmlproperty quaternion XrSpatialAnchor::rotation
The orientation of the spatial anchor. \readonly
This property provides the spatial anchor's rotation (as a quaternion).
Definition at line 198 of file qquick3dxrspatialanchor.cpp.
|
signal |
Definition at line 285 of file qquick3dxrspatialanchor.cpp.
Definition at line 318 of file qquick3dxrspatialanchor.cpp.
void QQuick3DXrSpatialAnchor::setClassification | ( | Classification | newClassification | ) |
Definition at line 231 of file qquick3dxrspatialanchor.cpp.
Definition at line 259 of file qquick3dxrspatialanchor.cpp.
Definition at line 160 of file qquick3dxrspatialanchor.cpp.
Definition at line 136 of file qquick3dxrspatialanchor.cpp.
Definition at line 182 of file qquick3dxrspatialanchor.cpp.
Definition at line 383 of file qquick3dxrspatialanchor.cpp.
void QQuick3DXrSpatialAnchor::setRotation | ( | const QQuaternion & | newRotation | ) |
Definition at line 203 of file qquick3dxrspatialanchor.cpp.
void QQuick3DXrSpatialAnchor::setSpaceContainerUuids | ( | const QSet< QUuid > & | newSpaceContainerUuids | ) |
Definition at line 393 of file qquick3dxrspatialanchor.cpp.
|
inline |
Definition at line 101 of file qquick3dxrspatialanchor_p.h.
Definition at line 388 of file qquick3dxrspatialanchor.cpp.
|
friend |
Definition at line 119 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 43 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 44 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 38 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 40 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 35 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 36 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 45 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 37 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 39 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 41 of file qquick3dxrspatialanchor_p.h.
|
read |
Definition at line 42 of file qquick3dxrspatialanchor_p.h.