diff --git a/Camera.hpp b/Camera.hpp
index 3919453f..e6460b97 100644
--- a/Camera.hpp
+++ b/Camera.hpp
@@ -197,8 +197,10 @@ namespace CSCI441 {
GLfloat mCameraRadius;
private:
- // keeps phi within the range (0, pi) to prevent the camera from flipping upside down
- // instead, alter up vector to flip/rotate camera orientation
+ /**
+ * @brief keeps phi within the range (0, pi) to prevent the camera from flipping upside down
+ * @note to invert camera - alter the up vector to flip/rotate camera orientation
+ */
void _clampCameraPhi();
};
}
diff --git a/docs/_camera_8hpp_source.html b/docs/_camera_8hpp_source.html
index b683b06c..0b2c5ab7 100644
--- a/docs/_camera_8hpp_source.html
+++ b/docs/_camera_8hpp_source.html
@@ -135,43 +135,41 @@
-
-
- 202 void _clampCameraPhi();
-
-
-
-
- 207 mProjectionMatrix( glm::mat4(1.0f) ),
- 208 mViewMatrix( glm::mat4(1.0f) ),
- 209 mCameraPosition( glm::vec3(0.0f, 0.0f, 0.0f ) ),
- 210 mCameraDirection( glm::vec3(0.0f, 0.0f, -1.0f ) ),
- 211 mCameraLookAtPoint( glm::vec3(0.0f, 0.0f, -1.0f ) ),
- 212 mCameraUpVector( glm::vec3(0.0f, 1.0f, 0.0f ) ),
- 213 mCameraTheta( 0.0f ),
- 214 mCameraPhi( M_PI / 2.0f ),
- 215 mCameraRadius( 1.0f ) {
-
-
-
-
- 220 mCameraTheta += dTheta;
-
-
- 223 recomputeOrientation();
-
-
- 226inline void CSCI441::Camera::_clampCameraPhi() {
- 227 if(mCameraPhi <= 0.0f) mCameraPhi = 0.0f + 0.001f;
- 228 if(mCameraPhi >= M_PI) mCameraPhi = M_PI - 0.001f;
-
-
-
+ 204 void _clampCameraPhi();
+
+
+
+
+ 209 mProjectionMatrix( glm::mat4(1.0f) ),
+ 210 mViewMatrix( glm::mat4(1.0f) ),
+ 211 mCameraPosition( glm::vec3(0.0f, 0.0f, 0.0f ) ),
+ 212 mCameraDirection( glm::vec3(0.0f, 0.0f, -1.0f ) ),
+ 213 mCameraLookAtPoint( glm::vec3(0.0f, 0.0f, -1.0f ) ),
+ 214 mCameraUpVector( glm::vec3(0.0f, 1.0f, 0.0f ) ),
+ 215 mCameraTheta( 0.0f ),
+ 216 mCameraPhi( M_PI / 2.0f ),
+ 217 mCameraRadius( 1.0f ) {
+
+
+
+
+ 222 mCameraTheta += dTheta;
+
+
+ 225 recomputeOrientation();
+
+
+ 228inline void CSCI441::Camera::_clampCameraPhi() {
+ 229 if(mCameraPhi <= 0.0f) mCameraPhi = 0.0f + 0.001f;
+ 230 if(mCameraPhi >= M_PI) mCameraPhi = M_PI - 0.001f;
+
+
+
Abstract Class to represent a synthetic camera. The following methods must be overridden:
Definition: Camera.hpp:35
GLfloat mCameraPhi
spherical angle for pitch direction in radians
Definition: Camera.hpp:193
glm::mat4 getProjectionMatrix() const
returns the current projection matrix for the associated camera
Definition: Camera.hpp:84
void setUpVector(const glm::vec3 up)
sets the camera's up vector in world space
Definition: Camera.hpp:135
-Camera()
create a default camera at the origin, looking down the negative Z axis oriented with the world coord...
Definition: Camera.hpp:206
+Camera()
create a default camera at the origin, looking down the negative Z axis oriented with the world coord...
Definition: Camera.hpp:208
virtual void moveBackward(GLfloat movementFactor)=0
steps backward along the camera's view
GLfloat getPhi() const
returns the current phi value in radians
Definition: Camera.hpp:114
glm::vec3 getPosition() const
returns the current camera position in world space
Definition: Camera.hpp:94
@@ -196,7 +194,7 @@
GLfloat mCameraRadius
spherical magnitude for direction in world space
Definition: Camera.hpp:197
GLfloat getTheta() const
returns the current theta value in radians
Definition: Camera.hpp:109
void setRadius(const GLfloat r)
sets the camera's radius in world space
Definition: Camera.hpp:150
-virtual void rotate(GLfloat dTheta, GLfloat dPhi)
rotates the camera's POV by adding to theta & phi then ensuring phi stays within the (0,...
Definition: Camera.hpp:219
+virtual void rotate(GLfloat dTheta, GLfloat dPhi)
rotates the camera's POV by adding to theta & phi then ensuring phi stays within the (0,...
Definition: Camera.hpp:221
GLfloat getRadius() const
returns the current radius in world space
Definition: Camera.hpp:119
CSCI441 Helper Functions for OpenGL.
Definition: ArcballCam.hpp:17