aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Karlsson <jonas.karlsson@qt.io>2024-03-06 12:36:48 +0100
committerJonas Karlsson <jonas.karlsson@qt.io>2024-03-07 09:59:31 +0100
commit543f0512fa31f0c75ba339ec77e6eaf7cc019eb5 (patch)
treeb7b89985fe750aa6e779281bee2f5e804bc8966e
parent8b71b99f57c25343947c80efb33c2b9c35df1c5a (diff)
Docs: Document default property values
Change-Id: I3e4f1fae532110d7b59540353e0e06bcfe08488f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/quick3dphysics/qabstractcollisionshape.cpp2
-rw-r--r--src/quick3dphysics/qabstractphysicsbody.cpp2
-rw-r--r--src/quick3dphysics/qabstractphysicsnode.cpp8
-rw-r--r--src/quick3dphysics/qboxshape.cpp2
-rw-r--r--src/quick3dphysics/qcapsuleshape.cpp4
-rw-r--r--src/quick3dphysics/qcharactercontroller.cpp14
-rw-r--r--src/quick3dphysics/qdynamicrigidbody.cpp36
-rw-r--r--src/quick3dphysics/qphysicsmaterial.cpp13
-rw-r--r--src/quick3dphysics/qsphereshape.cpp2
9 files changed, 66 insertions, 17 deletions
diff --git a/src/quick3dphysics/qabstractcollisionshape.cpp b/src/quick3dphysics/qabstractcollisionshape.cpp
index 3ecf22e..bfe76f1 100644
--- a/src/quick3dphysics/qabstractcollisionshape.cpp
+++ b/src/quick3dphysics/qabstractcollisionshape.cpp
@@ -26,6 +26,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty bool CollisionShape::enableDebugDraw
This property enables drawing the shape's debug view.
+
+ Default value: \c{false}
*/
QAbstractCollisionShape::QAbstractCollisionShape(QQuick3DNode *parent) : QQuick3DNode(parent)
diff --git a/src/quick3dphysics/qabstractphysicsbody.cpp b/src/quick3dphysics/qabstractphysicsbody.cpp
index 1519dab..aaf0516 100644
--- a/src/quick3dphysics/qabstractphysicsbody.cpp
+++ b/src/quick3dphysics/qabstractphysicsbody.cpp
@@ -28,6 +28,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty bool PhysicsBody::simulationEnabled
This property defines if the body will partake in the physical simulation.
+
+ Default value: \c{true}
*/
QAbstractPhysicsBody::QAbstractPhysicsBody()
diff --git a/src/quick3dphysics/qabstractphysicsnode.cpp b/src/quick3dphysics/qabstractphysicsnode.cpp
index 46e7307..b19b81c 100644
--- a/src/quick3dphysics/qabstractphysicsnode.cpp
+++ b/src/quick3dphysics/qabstractphysicsnode.cpp
@@ -32,6 +32,8 @@ QT_BEGIN_NAMESPACE
\qmlproperty bool PhysicsNode::sendContactReports
This property determines whether this body will send contact reports when colliding with other
bodies.
+
+ Default value: \c{false}
*/
/*!
@@ -39,18 +41,24 @@ QT_BEGIN_NAMESPACE
This property determines whether this body will receive contact reports when colliding with
other bodies. If activated, this means that the bodyContact signal will be emitted on a
collision with a body that has sendContactReports set to true.
+
+ Default value: \c{false}
*/
/*!
\qmlproperty bool PhysicsNode::sendTriggerReports
This property determines whether this body will send reports when entering or leaving a trigger
body.
+
+ Default value: \c{false}
*/
/*!
\qmlproperty bool PhysicsNode::receiveTriggerReports
This property determines whether this body will receive reports when entering or leaving a
trigger body.
+
+ Default value: \c{false}
*/
/*!
diff --git a/src/quick3dphysics/qboxshape.cpp b/src/quick3dphysics/qboxshape.cpp
index f8eb50d..7737661 100644
--- a/src/quick3dphysics/qboxshape.cpp
+++ b/src/quick3dphysics/qboxshape.cpp
@@ -27,6 +27,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty vector3d BoxShape::extents
This property defines the extents of the box in the x, y and z directions.
+
+ Default value: \c{(100, 100, 100)}
*/
QBoxShape::QBoxShape() = default;
diff --git a/src/quick3dphysics/qcapsuleshape.cpp b/src/quick3dphysics/qcapsuleshape.cpp
index 70c2e48..a2ad1f2 100644
--- a/src/quick3dphysics/qcapsuleshape.cpp
+++ b/src/quick3dphysics/qcapsuleshape.cpp
@@ -30,11 +30,15 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty float CapsuleShape::diameter
This property defines the diameter of the capsule
+
+ Default value: \c{100}
*/
/*!
\qmlproperty float CapsuleShape::height
This property defines the height of the capsule
+
+ Default value: \c{100}
*/
QCapsuleShape::QCapsuleShape() = default;
diff --git a/src/quick3dphysics/qcharactercontroller.cpp b/src/quick3dphysics/qcharactercontroller.cpp
index 222a186..fe5c604 100644
--- a/src/quick3dphysics/qcharactercontroller.cpp
+++ b/src/quick3dphysics/qcharactercontroller.cpp
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
against terrain, the character can move slower than the speed defined by \c movement. Conversely, if the
character is in free fall, it may move much faster.
- The default value is \c{(0, 0, 0)}.
+ Default value: \c{(0, 0, 0)}
*/
/*!
@@ -54,8 +54,9 @@ QT_BEGIN_NAMESPACE
This property defines the gravitational acceleration that applies to the character.
For a character that walks on the ground, it should typically be set to
\l{PhysicsWorld::gravity}{PhysicsWorld.gravity}. A floating character that has movement
- controls in three dimensions will normally have gravity \c{(0, 0, 0)}. The default value is
- \c{(0, 0, 0)}.
+ controls in three dimensions will normally have gravity \c{(0, 0, 0)}.
+
+ Default value: \c{(0, 0, 0)}.
*/
/*!
@@ -64,8 +65,9 @@ QT_BEGIN_NAMESPACE
This property defines whether the \l movement property has effect when the character is in free
fall. This is only relevant if \l gravity in not null. A value of \c true means that the
character will change direction in mid-air when \c movement changes. A value of \c false means that
- the character will continue on its current trajectory until it hits another object. The default
- value is \c true.
+ the character will continue on its current trajectory until it hits another object.
+
+ Default value: \c true
*/
/*!
@@ -98,7 +100,7 @@ QT_BEGIN_NAMESPACE
This property enables/disables the \l {CharacterController::shapeHit} callback for this
character controller.
- Default value: false
+ Default value: \c{false}
*/
/*!
diff --git a/src/quick3dphysics/qdynamicrigidbody.cpp b/src/quick3dphysics/qdynamicrigidbody.cpp
index d97f892..cd14c39 100644
--- a/src/quick3dphysics/qdynamicrigidbody.cpp
+++ b/src/quick3dphysics/qdynamicrigidbody.cpp
@@ -30,7 +30,7 @@ QT_BEGIN_NAMESPACE
\c {DynamicRigidBody.CustomDensity} or \c {DynamicRigidBody.DefaultDensity}. Also note that
a value of 0 is interpreted as infinite mass and that negative numbers are not allowed.
- Default value is \c 1.
+ Default value: \c 1
Range: \c{[0, inf]}
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
This property defines the density of the body. This is only used when massMode is set to \c
{DynamicRigidBody.CustomDensity}.
- Default value is \c{0.001}.
+ Default value: \c{0.001}
Range: \c{(0, inf]}
\sa massMode
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
Available options:
\value DynamicRigidBody.None
- No axis lock (default value).
+ No axis lock.
\value DynamicRigidBody.LockX
Lock X axis.
@@ -68,6 +68,8 @@ QT_BEGIN_NAMESPACE
\value DynamicRigidBody.LockZ
Lock Z axis.
+
+ Default value: \c{DynamicRigidBody.None}
*/
/*!
@@ -79,7 +81,7 @@ QT_BEGIN_NAMESPACE
Available options:
\value DynamicRigidBody.None
- No axis lock (default value).
+ No axis lock.
\value DynamicRigidBody.LockX
Lock X axis.
@@ -89,6 +91,8 @@ QT_BEGIN_NAMESPACE
\value DynamicRigidBody.LockZ
Lock Z axis.
+
+ Default value: \c{DynamicRigidBody.None}
*/
/*!
@@ -99,12 +103,16 @@ QT_BEGIN_NAMESPACE
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: \c{false}
+
\sa kinematicPosition, kinematicRotation, kinematicEulerRotation, kinematicPivot
*/
/*!
\qmlproperty bool DynamicRigidBody::gravityEnabled
This property defines whether the object is going to be affected by gravity or not.
+
+ Default value: \c{true}
*/
/*!
@@ -112,8 +120,6 @@ QT_BEGIN_NAMESPACE
This property holds the enum which describes how mass and inertia are calculated for this body.
- By default, \c DynamicRigidBody.DefaultDensity is used.
-
Available options:
\value DynamicRigidBody.DefaultDensity
@@ -133,6 +139,8 @@ QT_BEGIN_NAMESPACE
\value DynamicRigidBody.MassAndInertiaMatrix
Use the specified mass value and calculate inertia from the specified inertia
matrix.
+
+ Default value: \c{DynamicRigidBody.DefaultDensity}
*/
/*!
@@ -148,7 +156,7 @@ QT_BEGIN_NAMESPACE
interpreted as infinite inertia along that axis. Note that this is only used when
massMode is set to \c DynamicRigidBody.MassAndInertiaTensor.
- Default value is (1, 1, 1).
+ Default value: \c{(1, 1, 1)}
\sa massMode, inertiaMatrix
*/
@@ -159,6 +167,8 @@ QT_BEGIN_NAMESPACE
Defines the position of the center of mass relative to the body. Note that this is only used
when massMode is set to \c DynamicRigidBody.MassAndInertiaTensor.
+ Default value: \c{(0, 0, 0)}
+
\sa massMode, inertiaTensor
*/
@@ -169,6 +179,8 @@ QT_BEGIN_NAMESPACE
principal inertia axes relative to the body. Note that this is only used when massMode is set to
\c DynamicRigidBody.MassAndInertiaTensor.
+ Default value: \c{(1, 0, 0, 0)}
+
\sa massMode, inertiaTensor
*/
@@ -179,6 +191,8 @@ QT_BEGIN_NAMESPACE
matrix is expected to be diagonalizable. Note that this is only used when massMode is set to
\c DynamicRigidBody.MassAndInertiaMatrix.
+ Default value: A 3x3 identity matrix
+
\sa massMode, inertiaTensor
*/
@@ -190,6 +204,8 @@ QT_BEGIN_NAMESPACE
true. On each iteration of the simulation the physical object will be updated according to this
value.
+ Default value: \c{(0, 0, 0)}
+
\sa isKinematic, kinematicRotation, kinematicEulerRotation, kinematicPivot
*/
@@ -201,6 +217,8 @@ QT_BEGIN_NAMESPACE
true. On each iteration of the simulation the physical object will be updated according to this
value.
+ Default value: \c{(0, 0, 0)}
+
\sa isKinematic, kinematicPosition, kinematicEulerRotation, kinematicPivot
*/
@@ -212,6 +230,8 @@ QT_BEGIN_NAMESPACE
true. On each iteration of the simulation the physical object will be updated according to this
value.
+ Default value: \c{(1, 0, 0, 0)}
+
\sa isKinematic, kinematicPosition, kinematicEulerRotation, kinematicPivot
*/
@@ -223,6 +243,8 @@ QT_BEGIN_NAMESPACE
true. On each iteration of the simulation the physical object will be updated according to this
value.
+ Default value: \c{(0, 0, 0)}
+
\sa isKinematic, kinematicPosition, kinematicEulerRotation, kinematicRotation
*/
diff --git a/src/quick3dphysics/qphysicsmaterial.cpp b/src/quick3dphysics/qphysicsmaterial.cpp
index b1fe4ac..83c9e26 100644
--- a/src/quick3dphysics/qphysicsmaterial.cpp
+++ b/src/quick3dphysics/qphysicsmaterial.cpp
@@ -35,7 +35,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty float PhysicsMaterial::staticFriction
This property defines the amount of friction that is applied between surfaces that are not
- moving lateral to each-other. The default value is \c 0.5.
+ moving lateral to each-other.
+
+ Default value: \c 0.5
Range: \c{[0, inf]}
*/
@@ -43,7 +45,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty float PhysicsMaterial::dynamicFriction
This property defines the amount of friction applied between surfaces that are moving relative
- to each-other. The default value is \c 0.5.
+ to each-other.
+
+ Default value: \c 0.5
Range: \c{[0, inf]}
*/
@@ -54,8 +58,9 @@ QT_BEGIN_NAMESPACE
The coefficient of restitution of two
colliding objects is a fractional value representing the ratio of speeds after and before an
impact, taken along the line of impact. A coefficient of restitution of 1 is said to collide
- elastically, while a coefficient of restitution < 1 is said to be inelastic. The default value
- is \c 0.5.
+ elastically, while a coefficient of restitution < 1 is said to be inelastic.
+
+ Default value: \c 0.5
Range: \c{[0, 1]}
*/
diff --git a/src/quick3dphysics/qsphereshape.cpp b/src/quick3dphysics/qsphereshape.cpp
index 07e0527..91b7dd7 100644
--- a/src/quick3dphysics/qsphereshape.cpp
+++ b/src/quick3dphysics/qsphereshape.cpp
@@ -23,6 +23,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty float SphereShape::diameter
This property defines the diameter of the sphere
+
+ Default value: \c{100}
*/
QSphereShape::QSphereShape() = default;