mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
AvatarList API JSDoc stubs
This commit is contained in:
parent
fdeb0e3305
commit
f629022b8c
2 changed files with 39 additions and 11 deletions
|
@ -29,10 +29,25 @@
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* The AvatarManager API has properties and methods which manage Avatars within the same domain.
|
* The AvatarManager API has properties and methods which manage Avatars within the same domain.
|
||||||
|
*
|
||||||
|
* <p><strong>Note:</strong> This API is also provided to Interface and client entity scripts as the synonym,
|
||||||
|
* <code>AvatarList</code>. For assignment client scripts, see the separate {@link AvatarList} API.
|
||||||
|
*
|
||||||
* @namespace AvatarManager
|
* @namespace AvatarManager
|
||||||
*
|
*
|
||||||
* @hifi-interface
|
* @hifi-interface
|
||||||
* @hifi-client-entity
|
* @hifi-client-entity
|
||||||
|
*
|
||||||
|
* @borrows AvatarList.getAvatarIdentifiers as getAvatarIdentifiers
|
||||||
|
* @borrows AvatarList.getAvatarsInRange as getAvatarsInRange
|
||||||
|
* @borrows AvatarList.avatarAddedEvent as avatarAddedEvent
|
||||||
|
* @borrows AvatarList.avatarRemovedEvent as avatarRemovedEvent
|
||||||
|
* @borrows AvatarList.avatarSessionChangedEvent as avatarSessionChangedEvent
|
||||||
|
* @borrows AvatarList.isAvatarInRange as isAvatarInRange
|
||||||
|
* @borrows AvatarList.sessionUUIDChanged as sessionUUIDChanged
|
||||||
|
* @borrows AvatarList.processAvatarDataPacket as processAvatarDataPacket
|
||||||
|
* @borrows AvatarList.processAvatarIdentityPacket as processAvatarIdentityPacket
|
||||||
|
* @borrows AvatarList.processKillAvatar as processKillAvatar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AvatarManager : public AvatarHashMap {
|
class AvatarManager : public AvatarHashMap {
|
||||||
|
|
|
@ -30,6 +30,15 @@
|
||||||
|
|
||||||
#include "AvatarData.h"
|
#include "AvatarData.h"
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* <strong>Note:</strong> An <code>AvatarList</code> API is also provided for Interface and client entity scripts: it is a
|
||||||
|
* synonym for the {@link AvatarManager} API.
|
||||||
|
*
|
||||||
|
* @namespace AvatarList
|
||||||
|
*
|
||||||
|
* @hifi-assignment-client
|
||||||
|
*/
|
||||||
|
|
||||||
class AvatarHashMap : public QObject, public Dependency {
|
class AvatarHashMap : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
SINGLETON_DEPENDENCY
|
SINGLETON_DEPENDENCY
|
||||||
|
@ -42,20 +51,24 @@ public:
|
||||||
// Currently, your own avatar will be included as the null avatar id.
|
// Currently, your own avatar will be included as the null avatar id.
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.getAvatarIdentifiers
|
* @function AvatarList.getAvatarIdentifiers
|
||||||
* @returns {Uuid[]}
|
* @returns {Uuid[]}
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QVector<QUuid> getAvatarIdentifiers();
|
Q_INVOKABLE QVector<QUuid> getAvatarIdentifiers();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.getAvatarsInRange
|
* @function AvatarList.getAvatarsInRange
|
||||||
* @param {Vec3} position
|
* @param {Vec3} position
|
||||||
* @param {number} range
|
* @param {number} range
|
||||||
* @returns {Uuid[]}
|
* @returns {Uuid[]}
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QVector<QUuid> getAvatarsInRange(const glm::vec3& position, float rangeMeters) const;
|
Q_INVOKABLE QVector<QUuid> getAvatarsInRange(const glm::vec3& position, float rangeMeters) const;
|
||||||
|
|
||||||
// No JSDod because it's documwented in AvatarManager.
|
/**jsdoc
|
||||||
|
* @function AvatarList.getAvatar
|
||||||
|
* @param {Uuid} avatarID
|
||||||
|
* @returns {AvatarData}
|
||||||
|
*/
|
||||||
// Null/Default-constructed QUuids will return MyAvatar
|
// Null/Default-constructed QUuids will return MyAvatar
|
||||||
Q_INVOKABLE virtual ScriptAvatarData* getAvatar(QUuid avatarID) { return new ScriptAvatarData(getAvatarBySessionID(avatarID)); }
|
Q_INVOKABLE virtual ScriptAvatarData* getAvatar(QUuid avatarID) { return new ScriptAvatarData(getAvatarBySessionID(avatarID)); }
|
||||||
|
|
||||||
|
@ -65,21 +78,21 @@ public:
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.avatarAddedEvent
|
* @function AvatarList.avatarAddedEvent
|
||||||
* @param {Uuid} sessionUUID
|
* @param {Uuid} sessionUUID
|
||||||
* @returns {Signal}
|
* @returns {Signal}
|
||||||
*/
|
*/
|
||||||
void avatarAddedEvent(const QUuid& sessionUUID);
|
void avatarAddedEvent(const QUuid& sessionUUID);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.avatarRemovedEvent
|
* @function AvatarList.avatarRemovedEvent
|
||||||
* @param {Uuid} sessionUUID
|
* @param {Uuid} sessionUUID
|
||||||
* @returns {Signal}
|
* @returns {Signal}
|
||||||
*/
|
*/
|
||||||
void avatarRemovedEvent(const QUuid& sessionUUID);
|
void avatarRemovedEvent(const QUuid& sessionUUID);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.avatarSessionChangedEvent
|
* @function AvatarList.avatarSessionChangedEvent
|
||||||
* @param {Uuid} sessionUUID
|
* @param {Uuid} sessionUUID
|
||||||
* @param {Uuid} oldSessionUUID
|
* @param {Uuid} oldSessionUUID
|
||||||
* @returns {Signal}
|
* @returns {Signal}
|
||||||
|
@ -89,7 +102,7 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.isAvatarInRange
|
* @function AvatarList.isAvatarInRange
|
||||||
* @param {string} position
|
* @param {string} position
|
||||||
* @param {string} range
|
* @param {string} range
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
|
@ -99,28 +112,28 @@ public slots:
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.sessionUUIDChanged
|
* @function AvatarList.sessionUUIDChanged
|
||||||
* @param {Uuid} sessionUUID
|
* @param {Uuid} sessionUUID
|
||||||
* @param {Uuid} oldSessionUUID
|
* @param {Uuid} oldSessionUUID
|
||||||
*/
|
*/
|
||||||
void sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& oldUUID);
|
void sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& oldUUID);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.processAvatarDataPacket
|
* @function AvatarList.processAvatarDataPacket
|
||||||
* @param {} message
|
* @param {} message
|
||||||
* @param {} sendingNode
|
* @param {} sendingNode
|
||||||
*/
|
*/
|
||||||
void processAvatarDataPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
void processAvatarDataPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.processAvatarIdentityPacket
|
* @function AvatarList.processAvatarIdentityPacket
|
||||||
* @param {} message
|
* @param {} message
|
||||||
* @param {} sendingNode
|
* @param {} sendingNode
|
||||||
*/
|
*/
|
||||||
void processAvatarIdentityPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
void processAvatarIdentityPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AvatarManager.processKillAvatar
|
* @function AvatarList.processKillAvatar
|
||||||
* @param {} message
|
* @param {} message
|
||||||
* @param {} sendingNode
|
* @param {} sendingNode
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue