mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-15 16:59:39 +02:00
Fix up PickRay and StylusTip JSDoc
This commit is contained in:
parent
de49fefc61
commit
167bc21784
1 changed files with 12 additions and 19 deletions
|
@ -144,13 +144,6 @@ public:
|
|||
*/
|
||||
class PickRay : public MathPick {
|
||||
public:
|
||||
/**jsdoc
|
||||
* The mathematical definition of a ray.
|
||||
*
|
||||
* @typedef {Object} PickRay
|
||||
* @property {Vec3} origin The origin of the ray.
|
||||
* @property {Vec3} direction The direction of the ray.
|
||||
*/
|
||||
PickRay() : origin(NAN), direction(NAN) { }
|
||||
PickRay(const QVariantMap& pickVariant) : origin(vec3FromVariant(pickVariant["origin"])), direction(vec3FromVariant(pickVariant["direction"])) {}
|
||||
PickRay(const glm::vec3& origin, const glm::vec3 direction) : origin(origin), direction(direction) {}
|
||||
|
@ -174,17 +167,17 @@ Q_DECLARE_METATYPE(PickRay)
|
|||
QScriptValue pickRayToScriptValue(QScriptEngine* engine, const PickRay& pickRay);
|
||||
void pickRayFromScriptValue(const QScriptValue& object, PickRay& pickRay);
|
||||
|
||||
/**jsdoc
|
||||
* A StylusTip defines the tip of a stylus.
|
||||
*
|
||||
* @typedef {object} StylusTip
|
||||
* @property {number} side - The hand the tip is attached to: <code>0</code> for left, <code>1</code> for right.
|
||||
* @property {Vec3} position - The position of the stylus tip.
|
||||
* @property {Quat} orientation - The orientation of the stylus tip.
|
||||
* @property {Vec3} velocity - The velocity of the stylus tip.
|
||||
*/
|
||||
class StylusTip : public MathPick {
|
||||
public:
|
||||
/**jsdoc
|
||||
* The mathematical definition of a stylus tip.
|
||||
*
|
||||
* @typedef {Object} StylusTip
|
||||
* @property {number} side The hand the tip is attached to. 0 == left, 1 == right.
|
||||
* @property {Vec3} position The position of the tip.
|
||||
* @property {Quat} orientation The orientation of the tip.
|
||||
* @property {Vec3} velocity The velocity of the tip.
|
||||
*/
|
||||
StylusTip() : position(NAN), velocity(NAN) {}
|
||||
StylusTip(const QVariantMap& pickVariant) : side(bilateral::Side(pickVariant["side"].toInt())), position(vec3FromVariant(pickVariant["position"])),
|
||||
orientation(quatFromVariant(pickVariant["orientation"])), velocity(vec3FromVariant(pickVariant["velocity"])) {}
|
||||
|
@ -216,9 +209,9 @@ namespace std {
|
|||
|
||||
template <typename T, typename... Rest>
|
||||
inline void hash_combine(std::size_t& seed, const T& v, Rest... rest) {
|
||||
std::hash<T> hasher;
|
||||
seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
|
||||
hash_combine(seed, rest...);
|
||||
std::hash<T> hasher;
|
||||
seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
|
||||
hash_combine(seed, rest...);
|
||||
}
|
||||
|
||||
template <>
|
||||
|
|
Loading…
Reference in a new issue