mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-22 08:49:11 +02:00
PickRay JSDoc
This commit is contained in:
parent
e4daaa8d67
commit
dba16c265c
2 changed files with 12 additions and 3 deletions
|
@ -125,6 +125,14 @@ QVector<QUuid> qVectorQUuidFromScriptValue(const QScriptValue& array);
|
|||
QScriptValue aaCubeToScriptValue(QScriptEngine* engine, const AACube& aaCube);
|
||||
void aaCubeFromScriptValue(const QScriptValue &object, AACube& aaCube);
|
||||
|
||||
/**jsdoc
|
||||
* A PickRay defines a vector with a starting point. It is used, for example, when finding entities or overlays that lie under a
|
||||
* mouse click or intersect a laser beam.
|
||||
*
|
||||
* @typedef PickRay
|
||||
* @property {Vec3} origin - The starting position of the PickRay.
|
||||
* @property {Quat} direction - The direction that the PickRay travels.
|
||||
*/
|
||||
class PickRay {
|
||||
public:
|
||||
PickRay() : origin(0.0f), direction(0.0f) { }
|
||||
|
|
|
@ -172,12 +172,13 @@ public slots:
|
|||
void setOrientation(const glm::quat& orientation);
|
||||
|
||||
/**jsdoc
|
||||
* Compute a {PickRay} based on the current camera configuration and the specified <code>x, y</code> position on the screen.
|
||||
* The {PickRay} can be used in functions such as {Entities.findRayIntersection} and {Overlays.findRayIntersection}.
|
||||
* Compute a {@link PickRay} based on the current camera configuration and the specified <code>x, y</code> position on the
|
||||
* screen. The {@link PickRay} can be used in functions such as {@link Entities.findRayIntersection} and
|
||||
* {@link Overlays.findRayIntersection}.
|
||||
* @function Camera.computePickRay
|
||||
* @param {number} x - X-coordinate on screen.
|
||||
* @param {number} y - Y-coordinate on screen.
|
||||
* @return {PickRay} The computed {PickRay}.
|
||||
* @return {PickRay} The computed {@link PickRay}.
|
||||
* @example
|
||||
* function onMousePressEvent(event) {
|
||||
* var pickRay = Camera.computePickRay(event.x, event.y);
|
||||
|
|
Loading…
Reference in a new issue