From e4daaa8d6766ebe10aa06e788370cbb84c14c47d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sun, 12 Nov 2017 12:50:39 +1300 Subject: [PATCH] ViewFrustum JSDoc --- libraries/shared/src/ViewFrustum.h | 14 ++++++++++++-- libraries/shared/src/shared/Camera.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libraries/shared/src/ViewFrustum.h b/libraries/shared/src/ViewFrustum.h index d1b88fb2a5..754f79d99c 100644 --- a/libraries/shared/src/ViewFrustum.h +++ b/libraries/shared/src/ViewFrustum.h @@ -33,8 +33,18 @@ const float DEFAULT_ASPECT_RATIO = 16.0f/9.0f; const float DEFAULT_NEAR_CLIP = 0.08f; const float DEFAULT_FAR_CLIP = 16384.0f; -// the "ViewFrustum" has a "keyhole" shape: a regular frustum for stuff that is "visible" with -// a central sphere for stuff that is nearby (for physics simulation). +/**jsdoc + * A ViewFrustum has a "keyhole" shape: a regular frustum for stuff that is visible plus a central sphere for stuff that is + * nearby (for physics simulation). + * + * @typedef ViewFrustum + * @property {number} aspectRatio - Aspect ratio of the frustum. + * @property {number} centerRadius - Center radius of the keyhole in meters. + * @property {number} fieldOfView - Horizontal field of view in degrees. + * @property {Quat} orientation - The direction that the frustum is looking at. + * @property {Vec3} position - The location of the frustum's apex. + * @property {Mat4} projection - The projection matrix for the view defined by the frustum. + */ class ViewFrustum { public: diff --git a/libraries/shared/src/shared/Camera.h b/libraries/shared/src/shared/Camera.h index a74127b813..678bee6455 100644 --- a/libraries/shared/src/shared/Camera.h +++ b/libraries/shared/src/shared/Camera.h @@ -96,7 +96,7 @@ class Camera : public QObject { * @property orientation {Quat} The orientation of the camera. You can set this value only when the camera is in entity * mode. * @property mode {string} The camera mode. - * @property frustum {Frustum} The camera frustum. + * @property frustum {ViewFrustum} The camera frustum. * @property cameraEntity {Uuid} The ID of the entity that is used for the camera position and orientation when the camera * is in entity mode. */