diff --git a/libraries/shared/src/shared/Camera.cpp b/libraries/shared/src/shared/Camera.cpp index ced50f7760..76e5e770bb 100644 --- a/libraries/shared/src/shared/Camera.cpp +++ b/libraries/shared/src/shared/Camera.cpp @@ -10,6 +10,52 @@ #include "Camera.h" +/**jsdoc + *

Camera modes affect the position of the camera and the controls for camera movement. The camera can be in one of the + * following modes:

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ModeStringDescription
First Person"first person"The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with your + * avatar.
Third Person"third person"The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates with + * your avatar.
Mirror"mirror"The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with your + * avatar.
Independent"independent"The camera's position and orientation don't change with your avatar movement. Instead, they can be set via + * scripting.
Entity"entity"The camera's position and orientation are set to be the same as a specified entity's, and move with the entity as + ( it moves. + *
+ * @typedef {string} Camera.Mode + */ CameraMode stringToMode(const QString& mode) { if (mode == "third person") { return CAMERA_MODE_THIRD_PERSON; diff --git a/libraries/shared/src/shared/Camera.h b/libraries/shared/src/shared/Camera.h index 83f1174244..262e3cb14b 100644 --- a/libraries/shared/src/shared/Camera.h +++ b/libraries/shared/src/shared/Camera.h @@ -37,65 +37,13 @@ class Camera : public QObject { Q_OBJECT /**jsdoc - * The Camera API provides access to the "camera" that defines your view in desktop and HMD modes. - * - *

- * - *

Modes:
- * - *

Camera modes affect the position of the camera and the controls for camera movement. The camera can be in one of the - * following modes:

- * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
ModeStringDescription
First Person"first person"The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with - * your avatar.
Third Person"third person"The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates - * with your avatar.
Mirror"mirror"The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with - * your avatar.
Independent"independent"The camera's position and orientation don't change with your avatar movement. Instead, they can be set via - * scripting.
Entity"entity"The camera's position and orientation are set to be the same as a specified entity's, and move with the entity - * as it moves. - *
- * - *

The camera mode can be changed using Camera.mode and {@link Camera.setModeString}, and Interface's "View" - * menu.

+ * The Camera API provides access to the "camera" that defines your view in desktop and HMD display modes. * * @namespace Camera * @property position {Vec3} The position of the camera. You can set this value only when the camera is in entity mode. * @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 mode {Camera.Mode} The camera mode. * @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. @@ -130,14 +78,14 @@ public slots: /**jsdoc * Get the current camera mode. You can also get the mode using the Camera.mode property. * @function Camera.getModeString - * @returns {string} The current camera mode. + * @returns {Camera.Mode} The current camera mode. */ QString getModeString() const; /**jsdoc * Set the camera mode. You can also set the mode using the Camera.mode property. * @function Camera.setModeString - * @param {string} mode - The mode to set the camera to. + * @param {Camera.Mode} mode - The mode to set the camera to. */ void setModeString(const QString& mode);