Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qdynamicrigidbody_p.h>
Public Types | |
enum class | MassMode { DefaultDensity , CustomDensity , Mass , MassAndInertiaTensor , MassAndInertiaMatrix } |
enum | AxisLock { LockNone = 0 , LockX = 1 , LockY = 2 , LockZ = 4 } |
Public Types inherited from QQuick3DNode | |
enum | TransformSpace { LocalSpace , ParentSpace , SceneSpace } |
enum | StaticFlags { None } |
Public Member Functions | |
QDynamicRigidBody () | |
\qmltype DynamicRigidBody \inqmlmodule QtQuick3D.Physics \inherits PhysicsBody | |
~QDynamicRigidBody () | |
float | mass () const |
void | setMass (float mass) |
float | density () const |
void | setDensity (float density) |
bool | isKinematic () const |
void | setIsKinematic (bool isKinematic) |
Q_REVISION (6, 5) AxisLock linearAxisLock() const | |
Q_REVISION (6, 5) void setLinearAxisLock(AxisLock new AxisLockLinear) | |
Q_REVISION (6, 5) AxisLock angularAxisLock() const | |
Q_REVISION (6, 5) void setAngularAxisLock(AxisLock new AxisLockAngular) | |
bool | gravityEnabled () const |
void | setGravityEnabled (bool gravityEnabled) |
Q_INVOKABLE void | applyCentralForce (const QVector3D &force) |
Q_INVOKABLE void | applyForce (const QVector3D &force, const QVector3D &position) |
Q_INVOKABLE void | applyTorque (const QVector3D &torque) |
Q_INVOKABLE void | applyCentralImpulse (const QVector3D &impulse) |
Q_INVOKABLE void | applyImpulse (const QVector3D &impulse, const QVector3D &position) |
Q_INVOKABLE void | applyTorqueImpulse (const QVector3D &impulse) |
Q_INVOKABLE void | setAngularVelocity (const QVector3D &angularVelocity) |
Q_INVOKABLE void | setLinearVelocity (const QVector3D &linearVelocity) |
Q_INVOKABLE void | reset (const QVector3D &position, const QVector3D &eulerRotation) |
QQueue< QPhysicsCommand * > & | commandQueue () |
void | updateDefaultDensity (float defaultDensity) |
MassMode | massMode () const |
void | setMassMode (const MassMode newMassMode) |
const QVector3D & | inertiaTensor () const |
void | setInertiaTensor (const QVector3D &newInertiaTensor) |
const QVector3D & | centerOfMassPosition () const |
void | setCenterOfMassPosition (const QVector3D &newCenterOfMassPosition) |
const QQuaternion & | centerOfMassRotation () const |
void | setCenterOfMassRotation (const QQuaternion &newCenterOfMassRotation) |
const QList< float > & | readInertiaMatrix () const |
void | setInertiaMatrix (const QList< float > &newInertiaMatrix) |
const QMatrix3x3 & | inertiaMatrix () const |
Q_REVISION (6, 5) void setKinematicPosition(const QVector3D &position) | |
Q_REVISION (6, 5) QVector3D kinematicPosition() const | |
Q_REVISION (6, 5) void setKinematicRotation(const QQuaternion &rotation) | |
Q_REVISION (6, 5) QQuaternion kinematicRotation() const | |
Q_REVISION (6, 5) void setKinematicEulerRotation(const QVector3D &rotation) | |
Q_REVISION (6, 5) QVector3D kinematicEulerRotation() const | |
Q_REVISION (6, 5) void setKinematicPivot(const QVector3D &pivot) | |
Q_REVISION (6, 5) QVector3D kinematicPivot() const | |
QAbstractPhysXNode * | createPhysXBackend () final |
Public Member Functions inherited from QAbstractPhysicsBody | |
QAbstractPhysicsBody () | |
\qmltype PhysicsBody \inherits PhysicsNode \inqmlmodule QtQuick3D.Physics | |
QPhysicsMaterial * | physicsMaterial () const |
void | setPhysicsMaterial (QPhysicsMaterial *newPhysicsMaterial) |
Q_REVISION (6, 7) bool simulationEnabled() const | |
Q_REVISION (6, 7) void setSimulationEnabled(bool new SimulationEnabled) | |
Public Member Functions inherited from QAbstractPhysicsNode | |
QAbstractPhysicsNode () | |
\qmltype PhysicsNode \inherits Node \inqmlmodule QtQuick3D.Physics | |
~QAbstractPhysicsNode () override | |
QQmlListProperty< QAbstractCollisionShape > | collisionShapes () |
const QVector< QAbstractCollisionShape * > & | getCollisionShapesList () const |
void | updateFromPhysicsTransform (const physx::PxTransform &transform) |
void | registerContact (QAbstractPhysicsNode *body, const QVector< QVector3D > &positions, const QVector< QVector3D > &impulses, const QVector< QVector3D > &normals) |
bool | sendContactReports () const |
void | setSendContactReports (bool sendContactReports) |
bool | receiveContactReports () const |
void | setReceiveContactReports (bool receiveContactReports) |
Q_REVISION (6, 5) bool sendTriggerReports() const | |
Q_REVISION (6, 5) void setSendTriggerReports(bool sendTriggerReports) | |
Q_REVISION (6, 5) bool receiveTriggerReports() const | |
Q_REVISION (6, 5) void setReceiveTriggerReports(bool receiveTriggerReports) | |
bool | hasStaticShapes () const |
Q_REVISION (6, 7) int filterGroup() const | |
Q_REVISION (6, 7) void setfilterGroup(int new filterGroup) | |
Q_REVISION (6, 7) int filterIgnoreGroups() const | |
Q_REVISION (6, 7) void setFilterIgnoreGroups(int new FilterIgnoreGroups) | |
Public Member Functions inherited from QQuick3DNode | |
QQuick3DNode (QQuick3DNode *parent=nullptr) | |
\qmltype Node \inherits Object3D \inqmlmodule QtQuick3D | |
~QQuick3DNode () override | |
float | x () const |
\qmlproperty real QtQuick3D::Node::x | |
float | y () const |
\qmlproperty real QtQuick3D::Node::y | |
float | z () const |
\qmlproperty real QtQuick3D::Node::z | |
QQuaternion | rotation () const |
\qmlproperty quaternion QtQuick3D::Node::rotation | |
QVector3D | eulerRotation () const |
\qmlproperty vector3d QtQuick3D::Node::eulerRotation | |
QVector3D | position () const |
\qmlproperty vector3d QtQuick3D::Node::position | |
QVector3D | scale () const |
\qmlproperty vector3d QtQuick3D::Node::scale | |
QVector3D | pivot () const |
\qmlproperty vector3d QtQuick3D::Node::pivot | |
float | localOpacity () const |
\qmlproperty real QtQuick3D::Node::opacity | |
bool | visible () const |
\qmlproperty bool QtQuick3D::Node::visible | |
int | staticFlags () const |
\qmlproperty int QtQuick3D::Node::staticFlags | |
QQuick3DNode * | parentNode () const |
QVector3D | forward () const |
\qmlproperty vector3d QtQuick3D::Node::forward \readonly | |
QVector3D | up () const |
\qmlproperty vector3d QtQuick3D::Node::up \readonly | |
QVector3D | right () const |
\qmlproperty vector3d QtQuick3D::Node::right \readonly | |
QVector3D | scenePosition () const |
\qmlproperty vector3d QtQuick3D::Node::scenePosition \readonly | |
QQuaternion | sceneRotation () const |
\qmlproperty quaternion QtQuick3D::Node::sceneRotation \readonly | |
QVector3D | sceneScale () const |
\qmlproperty vector3d QtQuick3D::Node::sceneScale \readonly | |
QMatrix4x4 | sceneTransform () const |
\qmlproperty matrix4x4 QtQuick3D::Node::sceneTransform \readonly | |
Q_INVOKABLE void | rotate (qreal degrees, const QVector3D &axis, QQuick3DNode::TransformSpace space) |
\qmlmethod QtQuick3D::Node::rotate(real degrees, vector3d axis, enumeration space) | |
Q_INVOKABLE QVector3D | mapPositionToScene (const QVector3D &localPosition) const |
\qmlmethod vector3d QtQuick3D::Node::mapPositionToScene(vector3d localPosition) | |
Q_INVOKABLE QVector3D | mapPositionFromScene (const QVector3D &scenePosition) const |
\qmlmethod vector3d QtQuick3D::Node::mapPositionFromScene(vector3d scenePosition) | |
Q_INVOKABLE QVector3D | mapPositionToNode (const QQuick3DNode *node, const QVector3D &localPosition) const |
\qmlmethod vector3d QtQuick3D::Node::mapPositionToNode(QtQuick3D::Node node, vector3d localPosition) | |
Q_INVOKABLE QVector3D | mapPositionFromNode (const QQuick3DNode *node, const QVector3D &localPosition) const |
\qmlmethod vector3d QtQuick3D::Node::mapPositionFromNode(QtQuick3D::Node node, vector3d localPosition) | |
Q_INVOKABLE QVector3D | mapDirectionToScene (const QVector3D &localDirection) const |
\qmlmethod vector3d QtQuick3D::Node::mapDirectionToScene(vector3d localDirection) | |
Q_INVOKABLE QVector3D | mapDirectionFromScene (const QVector3D &sceneDirection) const |
\qmlmethod vector3d QtQuick3D::Node::mapDirectionFromScene(vector3d sceneDirection) | |
Q_INVOKABLE QVector3D | mapDirectionToNode (const QQuick3DNode *node, const QVector3D &localDirection) const |
\qmlmethod vector3d QtQuick3D::Node::mapDirectionToNode(QtQuick3D::Node node, vector3d localDirection) | |
Q_INVOKABLE QVector3D | mapDirectionFromNode (const QQuick3DNode *node, const QVector3D &localDirection) const |
\qmlmethod vector3d QtQuick3D::Node::mapDirectionFromNode(QtQuick3D::Node node, vector3d localDirection) | |
void | markAllDirty () override |
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 . | |
Public Member Functions inherited from QQmlParserStatus | |
QQmlParserStatus () | |
virtual | ~QQmlParserStatus () |
Additional Inherited Members | |
Public Slots inherited from QQuick3DNode | |
void | setX (float x) |
void | setY (float y) |
void | setZ (float z) |
void | setRotation (const QQuaternion &rotation) |
void | setEulerRotation (const QVector3D &eulerRotation) |
void | setPosition (const QVector3D &position) |
void | setScale (const QVector3D &scale) |
void | setPivot (const QVector3D &pivot) |
void | setLocalOpacity (float opacity) |
void | setVisible (bool visible) |
void | setStaticFlags (int staticFlags) |
Public Slots inherited from QQuick3DObject | |
void | update () |
void | setParentItem (QQuick3DObject *parentItem) |
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 QQuick3DNode | |
void | connectNotify (const QMetaMethod &signal) override |
void | disconnectNotify (const QMetaMethod &signal) override |
void | componentComplete () override |
Invoked after the root component that caused this instantiation has completed construction. | |
QQuick3DNode (QQuick3DNodePrivate &dd, QQuick3DNode *parent=nullptr) | |
QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) override |
virtual void | itemChange (ItemChange, const ItemChangeData &) override |
Protected Member Functions inherited from QQuick3DObject | |
QQuick3DObject (QQuick3DObjectPrivate &dd, QQuick3DObject *parent=nullptr) | |
void | classBegin () override |
Invoked after class creation, but before any properties have been set. | |
void | componentComplete () override |
Invoked after the root component that caused this instantiation has completed construction. | |
bool | isComponentComplete () const |
virtual void | preSync () |
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. | |
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 28 of file qdynamicrigidbody_p.h.
Enumerator | |
---|---|
LockNone | |
LockX | |
LockY | |
LockZ |
Definition at line 40 of file qdynamicrigidbody_p.h.
|
strong |
Enumerator | |
---|---|
DefaultDensity | |
CustomDensity | |
Mass | |
MassAndInertiaTensor | |
MassAndInertiaMatrix |
Definition at line 31 of file qdynamicrigidbody_p.h.
|
default |
\qmltype DynamicRigidBody \inqmlmodule QtQuick3D.Physics \inherits PhysicsBody
A physical body that can move or be moved.
This type defines a dynamic rigid body: an object that is part of the physics scene and behaves like a physical object with mass and velocity.
false
.\qmlproperty float DynamicRigidBody::mass
This property defines the mass of the body. Note that this is only used when massMode is not {DynamicRigidBody.CustomDensity}
or {DynamicRigidBody.DefaultDensity}
. Also note that a value of 0 is interpreted as infinite mass and that negative numbers are not allowed.
Default value: 1
Range: {[0, inf]}
\qmlproperty float DynamicRigidBody::density
This property defines the density of the body. This is only used when massMode is set to {DynamicRigidBody.CustomDensity}
.
Default value: {0.001}
Range: {(0, inf]}
\qmlproperty AxisLock DynamicRigidBody::linearAxisLock
This property locks the linear velocity of the body along the axes defined by the DynamicRigidBody.AxisLock enum. To lock several axes just bitwise-or their enum values.
Available options:
\value DynamicRigidBody.None No axis lock.
\value DynamicRigidBody.LockX Lock X axis.
\value DynamicRigidBody.LockY Lock Y axis.
\value DynamicRigidBody.LockZ Lock Z axis.
Default value: {DynamicRigidBody.None}
\qmlproperty AxisLock DynamicRigidBody::angularAxisLock
This property locks the angular velocity of the body along the axes defined by the DynamicRigidBody.AxisLock enum. To lock several axes just bitwise-or their enum values.
Available options:
\value DynamicRigidBody.None No axis lock.
\value DynamicRigidBody.LockX Lock X axis.
\value DynamicRigidBody.LockY Lock Y axis.
\value DynamicRigidBody.LockZ Lock Z axis.
Default value: {DynamicRigidBody.None}
\qmlproperty bool DynamicRigidBody::isKinematic This property defines whether the object is kinematic or not. A kinematic object does not get influenced by external forces and can be seen as an object of infinite mass. If this property is set then in every simulation frame the physical object will be moved to its target position regardless of external forces. Note that to move and rotate the kinematic object you need to use the kinematicPosition, kinematicRotation, kinematicEulerRotation and kinematicPivot properties.
Default value: {false}
\qmlproperty bool DynamicRigidBody::gravityEnabled This property defines whether the object is going to be affected by gravity or not.
Default value: {true}
\qmlproperty MassMode DynamicRigidBody::massMode
This property holds the enum which describes how mass and inertia are calculated for this body.
Available options:
\value DynamicRigidBody.DefaultDensity Use the density specified in the \l {PhysicsWorld::}{defaultDensity} property in PhysicsWorld to calculate mass and inertia assuming a uniform density.
\value DynamicRigidBody.CustomDensity Use specified density in the specified in the \l {DynamicRigidBody::}{density} to calculate mass and inertia assuming a uniform density.
\value DynamicRigidBody.Mass Use the specified mass to calculate inertia assuming a uniform density.
\value DynamicRigidBody.MassAndInertiaTensor Use the specified mass value and inertia tensor.
\value DynamicRigidBody.MassAndInertiaMatrix Use the specified mass value and calculate inertia from the specified inertia matrix.
Default value: {DynamicRigidBody.DefaultDensity}
\qmlproperty vector3d DynamicRigidBody::inertiaTensor
Defines the inertia tensor vector, using a parameter specified in mass space coordinates.
This is the diagonal vector of a 3x3 diagonal matrix, if you have a non diagonal world/actor space inertia tensor then you should use \l{DynamicRigidBody::inertiaMatrix}{inertiaMatrix} instead.
The inertia tensor components must be positive and a value of 0 in any component is interpreted as infinite inertia along that axis. Note that this is only used when massMode is set to DynamicRigidBody.MassAndInertiaTensor
.
Default value: {(1, 1, 1)}
\qmlproperty vector3d DynamicRigidBody::centerOfMassPosition
Defines the position of the center of mass relative to the body. Note that this is only used when massMode is set to DynamicRigidBody.MassAndInertiaTensor
.
Default value: {(0, 0, 0)}
\qmlproperty quaternion DynamicRigidBody::centerOfMassRotation
Defines the rotation of the center of mass pose, i.e. it specifies the orientation of the body's principal inertia axes relative to the body. Note that this is only used when massMode is set to DynamicRigidBody.MassAndInertiaTensor
.
Default value: {(1, 0, 0, 0)}
\qmlproperty list<float> DynamicRigidBody::inertiaMatrix
Defines the inertia tensor matrix. This is a 3x3 matrix in column-major order. Note that this matrix is expected to be diagonalizable. Note that this is only used when massMode is set to DynamicRigidBody.MassAndInertiaMatrix
.
Default value: A 3x3 identity matrix
\qmlproperty vector3d DynamicRigidBody::kinematicPosition
Defines the position of the object when it is kinematic, i.e. when \l isKinematic is set to true
. On each iteration of the simulation the physical object will be updated according to this value.
Default value: {(0, 0, 0)}
\qmlproperty vector3d DynamicRigidBody::kinematicRotation
Defines the rotation of the object when it is kinematic, i.e. when \l isKinematic is set to true
. On each iteration of the simulation the physical object will be updated according to this value.
Default value: {(0, 0, 0)}
\qmlproperty vector4d DynamicRigidBody::kinematicEulerRotation
Defines the euler rotation of the object when it is kinematic, i.e. when \l isKinematic is set to true
. On each iteration of the simulation the physical object will be updated according to this value.
Default value: {(1, 0, 0, 0)}
\qmlproperty vector3d DynamicRigidBody::kinematicPivot
Defines the pivot of the object when it is kinematic, i.e. when \l isKinematic is set to true
. On each iteration of the simulation the physical object will be updated according to this value.
Default value: {(0, 0, 0)}
\qmlmethod DynamicRigidBody::applyCentralForce(vector3d force)
Applies a force on the center of the body.
\qmlmethod DynamicRigidBody::applyForce(vector3d force, vector3d position)
Applies a force at a position on the body.
\qmlmethod DynamicRigidBody::applyTorque(vector3d torque)
Applies a torque on the body.
\qmlmethod DynamicRigidBody::applyCentralImpulse(vector3d impulse)
Applies an impulse on the center of the body.
\qmlmethod DynamicRigidBody::applyImpulse(vector3d impulse, vector3d position)
Applies an impulse at a position on the body.
\qmlmethod DynamicRigidBody::applyTorqueImpulse(vector3d impulse)
Applies a torque impulse on the body.
\qmlmethod DynamicRigidBody::setAngularVelocity(vector3d angularVelocity)
Sets the angularVelocity of the body.
\qmlmethod DynamicRigidBody::setLinearVelocity(vector3d linearVelocity)
Sets the linearVelocity of the body.
\qmlmethod DynamicRigidBody::reset(vector3d position, vector3d eulerRotation)
Resets the body's position and eulerRotation.
QDynamicRigidBody::~QDynamicRigidBody | ( | ) |
Definition at line 307 of file qdynamicrigidbody.cpp.
References QList< T >::clear(), and qDeleteAll().
Definition at line 582 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue().
Definition at line 597 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue().
Definition at line 587 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue(), and QQuick3DNode::position.
Definition at line 602 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue(), and QQuick3DNode::position.
Definition at line 592 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue().
Definition at line 607 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue().
const QVector3D & QDynamicRigidBody::centerOfMassPosition | ( | ) | const |
Definition at line 331 of file qdynamicrigidbody.cpp.
|
signal |
const QQuaternion & QDynamicRigidBody::centerOfMassRotation | ( | ) | const |
Definition at line 313 of file qdynamicrigidbody.cpp.
|
signal |
QQueue< QPhysicsCommand * > & QDynamicRigidBody::commandQueue | ( | ) |
Definition at line 571 of file qdynamicrigidbody.cpp.
|
finalvirtual |
Implements QAbstractPhysicsNode.
Definition at line 663 of file qdynamicrigidbody.cpp.
float QDynamicRigidBody::density | ( | ) | const |
Definition at line 497 of file qdynamicrigidbody.cpp.
|
signal |
bool QDynamicRigidBody::gravityEnabled | ( | ) | const |
Definition at line 468 of file qdynamicrigidbody.cpp.
|
signal |
const QMatrix3x3 & QDynamicRigidBody::inertiaMatrix | ( | ) | const |
Definition at line 453 of file qdynamicrigidbody.cpp.
|
signal |
const QVector3D & QDynamicRigidBody::inertiaTensor | ( | ) | const |
Definition at line 402 of file qdynamicrigidbody.cpp.
|
signal |
bool QDynamicRigidBody::isKinematic | ( | ) | const |
Definition at line 463 of file qdynamicrigidbody.cpp.
|
signal |
float QDynamicRigidBody::mass | ( | ) | const |
Definition at line 458 of file qdynamicrigidbody.cpp.
|
signal |
QDynamicRigidBody::MassMode QDynamicRigidBody::massMode | ( | ) | const |
Definition at line 360 of file qdynamicrigidbody.cpp.
|
signal |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
new |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const & |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const & |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const & |
QDynamicRigidBody::Q_REVISION | ( | 6 | , |
5 | ) const & |
|
new |
const QList< float > & QDynamicRigidBody::readInertiaMatrix | ( | ) | const |
Definition at line 419 of file qdynamicrigidbody.cpp.
Definition at line 617 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue(), QQuick3DNode::eulerRotation, and QQuick3DNode::position.
Definition at line 540 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue().
Definition at line 336 of file qdynamicrigidbody.cpp.
References centerOfMassPositionChanged(), CustomDensity, DefaultDensity, emit, QQueue< T >::enqueue(), Mass, MassAndInertiaMatrix, MassAndInertiaTensor, and qFuzzyCompare().
void QDynamicRigidBody::setCenterOfMassRotation | ( | const QQuaternion & | newCenterOfMassRotation | ) |
Definition at line 318 of file qdynamicrigidbody.cpp.
References centerOfMassRotationChanged(), emit, QQueue< T >::enqueue(), MassAndInertiaTensor, and qFuzzyCompare().
void QDynamicRigidBody::setDensity | ( | float | density | ) |
Definition at line 502 of file qdynamicrigidbody.cpp.
References CustomDensity, density, densityChanged(), emit, QQueue< T >::enqueue(), and qFuzzyCompare().
void QDynamicRigidBody::setGravityEnabled | ( | bool | gravityEnabled | ) |
Definition at line 530 of file qdynamicrigidbody.cpp.
References emit, QQueue< T >::enqueue(), gravityEnabled, and gravityEnabledChanged().
Definition at line 437 of file qdynamicrigidbody.cpp.
References QList< T >::data(), QGenericMatrix< N, M, T >::data(), emit, QQueue< T >::enqueue(), fuzzyEquals(), inertiaMatrixChanged(), QList< T >::length(), MassAndInertiaMatrix, and qMin().
Definition at line 407 of file qdynamicrigidbody.cpp.
References emit, QQueue< T >::enqueue(), inertiaTensorChanged(), MassAndInertiaTensor, and qFuzzyCompare().
void QDynamicRigidBody::setIsKinematic | ( | bool | isKinematic | ) |
Definition at line 514 of file qdynamicrigidbody.cpp.
References emit, QQueue< T >::enqueue(), QAbstractPhysicsNode::hasStaticShapes(), isKinematic, isKinematicChanged(), and qWarning.
Definition at line 612 of file qdynamicrigidbody.cpp.
References QQueue< T >::enqueue().
void QDynamicRigidBody::setMass | ( | float | mass | ) |
Definition at line 473 of file qdynamicrigidbody.cpp.
References CustomDensity, DefaultDensity, emit, QQueue< T >::enqueue(), Mass, mass, MassAndInertiaMatrix, MassAndInertiaTensor, massChanged(), and qFuzzyCompare().
Definition at line 365 of file qdynamicrigidbody.cpp.
References CustomDensity, DefaultDensity, emit, QQueue< T >::enqueue(), QPhysicsWorld::getWorld(), Mass, MassAndInertiaMatrix, MassAndInertiaTensor, massModeChanged(), qWarning, and world.
void QDynamicRigidBody::updateDefaultDensity | ( | float | defaultDensity | ) |
Definition at line 576 of file qdynamicrigidbody.cpp.
References DefaultDensity, and QQueue< T >::enqueue().
Referenced by QPhysXDynamicBody::updateDefaultDensity().
|
readwrite |
Definition at line 54 of file qdynamicrigidbody_p.h.
Referenced by getLockFlags().
|
read |
Definition at line 64 of file qdynamicrigidbody_p.h.
|
read |
Definition at line 66 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 50 of file qdynamicrigidbody_p.h.
Referenced by setDensity().
|
readwrite |
Definition at line 58 of file qdynamicrigidbody_p.h.
Referenced by setGravityEnabled().
|
readwrite |
Definition at line 68 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 62 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 57 of file qdynamicrigidbody_p.h.
Referenced by setIsKinematic().
|
read |
Definition at line 73 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 78 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 71 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 76 of file qdynamicrigidbody_p.h.
|
readwrite |
Definition at line 52 of file qdynamicrigidbody_p.h.
Referenced by getLockFlags().
|
readwrite |
Definition at line 49 of file qdynamicrigidbody_p.h.
Referenced by setMass().
|
readwrite |
Definition at line 61 of file qdynamicrigidbody_p.h.