Entities functions JSDoc bulk

This commit is contained in:
David Rowe 2018-02-23 19:27:13 +13:00
parent 25b1e9f50b
commit 26404a6ce8
3 changed files with 997 additions and 80 deletions

View file

@ -1004,6 +1004,25 @@ QScriptValue RayToEntityIntersectionResultToScriptValue(QScriptEngine* engine, c
QString faceName = "";
// handle BoxFace
/**jsdoc
* <p>A <code>BoxFace</code> specifies the face of an axis-aligned (AA) box.
* <table>
* <thead>
* <tr><th>Value</th><th>Description</th></tr>
* </thead>
* <tbody>
* <tr><td><code>"MIN_X_FACE"</code></td><td>The minimum x-axis face.</td></tr>
* <tr><td><code>"MAX_X_FACE"</code></td><td>The maximum x-axis face.</td></tr>
* <tr><td><code>"MIN_Y_FACE"</code></td><td>The minimum y-axis face.</td></tr>
* <tr><td><code>"MAX_Y_FACE"</code></td><td>The maximum y-axis face.</td></tr>
* <tr><td><code>"MIN_Z_FACE"</code></td><td>The minimum z-axis face.</td></tr>
* <tr><td><code>"MAX_Z_FACE"</code></td><td>The maximum z-axis face.</td></tr>
* <tr><td><code>"UNKNOWN_FACE"</code></td><td>Unknown value.</td></tr>
* </tbody>
* </table>
* @typedef {string} BoxFace
*/
// FIXME: Move enum to string function to BoxBase.cpp.
switch (value.face) {
case MIN_X_FACE:
faceName = "MIN_X_FACE";

File diff suppressed because it is too large Load diff

View file

@ -321,13 +321,29 @@ namespace graphics {
using MeshPointer = std::shared_ptr<graphics::Mesh>;
/**jsdoc
* A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}.
* @class MeshProxy
*/
class MeshProxy : public QObject {
Q_OBJECT
public:
virtual MeshPointer getMeshPointer() const = 0;
/**jsdoc
* Get the number of vertices in the mesh.
* @function MeshProxy#getNumVertices
* @returns {number} Integer number of vertices in the mesh.
*/
Q_INVOKABLE virtual int getNumVertices() const = 0;
/**jsdoc
* Get the position of a vertex in the mesh.
* @function MeshProxy#getPos3
* @param {number} index - Integer index of the mesh vertex.
* @returns {Vec3} Local position of the vertex relative to the mesh.
*/
Q_INVOKABLE virtual glm::vec3 getPos3(int index) const = 0;
};