diff --git a/assignment-client/src/avatars/ScriptableAvatar.h b/assignment-client/src/avatars/ScriptableAvatar.h index 2d8dce23de..37e82947ae 100644 --- a/assignment-client/src/avatars/ScriptableAvatar.h +++ b/assignment-client/src/avatars/ScriptableAvatar.h @@ -149,7 +149,7 @@ public: * Gets the avatar entities as binary data. *
Warning: Potentially a very expensive call. Do not use if possible.
* @function Avatar.getAvatarEntityData - * @returns {AvatarEntityMap} + * @returns {AvatarEntityMap} The avatar entities as binary data. */ Q_INVOKABLE AvatarEntityMap getAvatarEntityData() const override; @@ -157,7 +157,7 @@ public: * Sets the avatar entities from binary data. *Warning: Potentially an expensive call. Do not use if possible.
* @function Avatar.setAvatarEntityData - * @param {AvatarEntityMap} avatarEntityData + * @param {AvatarEntityMap} avatarEntityData - The avatar entities as binary data. */ Q_INVOKABLE void setAvatarEntityData(const AvatarEntityMap& avatarEntityData) override; diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index a20518076f..858af7ba3c 100755 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -131,7 +131,7 @@ const int COLLIDE_WITH_OTHER_AVATARS = 11; // 12th bit * * *The values for the hand states are added together to give the Setting joint data completely overrides/replaces all motion from the default animation system including inverse
+ * Sets a specific joint's rotation and position relative to its parent, in model coordinates.
+ * Warning: These coordinates are not necessarily in meters. Setting joint data completely overrides/replaces all motion from the default animation system including inverse
* kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,
* the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate
* joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set
@@ -714,7 +715,7 @@ public:
* @function Avatar.setJointData
* @param {number} index - The index of the joint.
* @param {Quat} rotation - The rotation of the joint relative to its parent.
- * @param {Vec3} translation - The translation of the joint relative to its parent.
+ * @param {Vec3} translation - The translation of the joint relative to its parent, in model coordinates.
* @example Setting joint data completely overrides/replaces all motion from the default animation system including inverse
+ * Sets a specific joint's translation relative to its parent, in model coordinates.
+ * Warning: These coordinates are not necessarily in meters. Setting joint data completely overrides/replaces all motion from the default animation system including inverse
* kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,
* the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate
* joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set
* the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. Warning: These coordinates are not necessarily in meters. For information on the joint hierarchy used, see
+ * Avatar Standards. Setting joint data completely overrides/replaces all motion from the default animation system including inverse
+ * Sets a specific joint's rotation and position relative to its parent, in model coordinates.
+ * Warning: These coordinates are not necessarily in meters. Setting joint data completely overrides/replaces all motion from the default animation system including inverse
* kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,
* the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate
* joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set
@@ -805,7 +810,7 @@ public:
* @function Avatar.setJointData
* @param {string} name - The name of the joint.
* @param {Quat} rotation - The rotation of the joint relative to its parent.
- * @param {Vec3} translation - The translation of the joint relative to its parent.
+ * @param {Vec3} translation - The translation of the joint relative to its parent, in model coordinates.
*/
Q_INVOKABLE virtual void setJointData(const QString& name, const glm::quat& rotation, const glm::vec3& translation);
@@ -843,20 +848,21 @@ public:
Q_INVOKABLE virtual void setJointRotation(const QString& name, const glm::quat& rotation);
/**jsdoc
- * Sets a specific joint's translation relative to its parent.
- * Setting joint data completely overrides/replaces all motion from the default animation system including inverse
+ * Sets a specific joint's translation relative to its parent, in model coordinates.
+ * Warning: These coordinates are not necessarily in meters. Setting joint data completely overrides/replaces all motion from the default animation system including inverse
* kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,
* the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate
* joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set
* the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. Warning: These coordinates are not necessarily in meters. For information on the joint hierarchy used, see
+ * Avatar Standards. Warning: These coordinates are not necessarily in meters. Warning: These coordinates are not necessarily in meters. Setting joint data completely overrides/replaces all motion from the default animation system including inverse
* kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,
* the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate
* joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set
* the rotation of the elbow, the hand inverse kinematics position won't end up in the right place.HandState
value. For example, if the left
- * hand's finger is pointing, the value is 1 + 4 == 5.
+ * hand's finger is pointing, the value is
1 + 4 == 5
.
* @typedef {number} HandState
*/
const char HAND_STATE_NULL = 0;
@@ -705,8 +705,9 @@ public:
Q_INVOKABLE void setRawJointData(QVector
* true
if the joint data is valid, false
if not.
+ * @returns {boolean} true
if the joint data are valid, false
if not.
*/
Q_INVOKABLE bool isJointDataValid(int index) const;
@@ -787,17 +789,20 @@ public:
Q_INVOKABLE virtual glm::quat getJointRotation(int index) const;
/**jsdoc
- * Gets the translation of a joint relative to its parent. For information on the joint hierarchy used, see
- * Avatar Standards.
+ * Gets the translation of a joint relative to its parent, in model coordinates.
+ *
* true
if the joint data is valid, false
if not.
+ * @returns {boolean} true
if the joint data are valid, false
if not.
*/
Q_INVOKABLE virtual bool isJointDataValid(const QString& name) const;
@@ -908,11 +914,13 @@ public:
Q_INVOKABLE virtual glm::quat getJointRotation(const QString& name) const;
/**jsdoc
- * Gets the translation of a joint relative to its parent. For information on the joint hierarchy used, see
- * Avatar Standards.
+ * Gets the translation of a joint relative to its parent, in model coordinates.
+ * Avatar
API.
+ * @returns {Vec3[]} The translations of all joints relative to each's parent, in model coordinates. The values are in the
+ * same order as the array returned by {@link MyAvatar.getJointNames}, or {@link Avatar.getJointNames} if using the
+ * Avatar
API.
*/
Q_INVOKABLE virtual QVectorAvatar
API.
+ * @param {Vec3[]} translations - The translations for all joints in the avatar, in model coordinates. The values are in
+ * the same order as the array returned by {@link MyAvatar.getJointNames}, or {@link Avatar.getJointNames} if using the
+ * Avatar
API.
*/
Q_INVOKABLE virtual void setJointTranslations(const QVectorsessionDisplayName
property value changes.
+ * Triggered when the avatar's sessionDisplayName
property value changes.
* @function Avatar.sessionDisplayNameChanged
* @returns {Signal}
*/
void sessionDisplayNameChanged();
/**jsdoc
- * Triggered when the avatar's skeletonModelURL
property value changes.
+ * Triggered when the avatar's model (i.e., skeletonModelURL
property value) is changed.
* @function Avatar.skeletonModelURLChanged
* @returns {Signal}
*/