ViewFrustum JSDoc

This commit is contained in:
David Rowe 2017-11-12 12:50:39 +13:00
parent a2ece7a3ad
commit e4daaa8d67
2 changed files with 13 additions and 3 deletions

View file

@ -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:

View file

@ -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.
*/