aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src/core/script/camera.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/camera.js')
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/camera.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/camera.js b/js/helper-classes/RDGE/src/core/script/camera.js
index e85fe593..28d307ae 100755
--- a/js/helper-classes/RDGE/src/core/script/camera.js
+++ b/js/helper-classes/RDGE/src/core/script/camera.js
@@ -27,8 +27,8 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE. 28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30/* 30/*
31 * camera class 31 * camera class
32 */ 32 */
33var RDGE = RDGE || {}; 33var RDGE = RDGE || {};
34 34
@@ -84,7 +84,7 @@ RDGE.camera = function () {
84 return p; 84 return p;
85 }; 85 };
86 86
87 /* This is the old way 87 /* This is the old way
88 var t = this.persp.near * Math.tan(0.017453292519943295769236 * this.persp.fov * 0.5); 88 var t = this.persp.near * Math.tan(0.017453292519943295769236 * this.persp.fov * 0.5);
89 var r = t * this.persp.aratio; 89 var r = t * this.persp.aratio;
90 var u = t; 90 var u = t;
@@ -204,7 +204,7 @@ RDGE.camera = function () {
204 return 0.0; 204 return 0.0;
205 }; 205 };
206 206
207 // this is used by ambient occlusion... 207 // this is used by ambient occlusion...
208 this.getFTR = function () { 208 this.getFTR = function () {
209 var fovyRad = (this.persp.fov * 0.5) * Math.PI / 180.0; 209 var fovyRad = (this.persp.fov * 0.5) * Math.PI / 180.0;
210 return [ 210 return [
@@ -220,15 +220,15 @@ RDGE.camera = function () {
220 220
221 221
222/** Camera Manager 222/** Camera Manager
223 * This class is used to manage the active camera. It provides functionality 223 * This class is used to manage the active camera. It provides functionality
224 * for getting and setting the active camera, as well as providing stack operations 224 * for getting and setting the active camera, as well as providing stack operations
225 * to switch to and from multiple cameras. 225 * to switch to and from multiple cameras.
226 */ 226 */
227RDGE.cameraManager = function () { 227RDGE.cameraManager = function () {
228 this.stack = []; 228 this.stack = [];
229 229
230 /* Set the active camera. 230 /* Set the active camera.
231 * This function sets the active camera to the given camera. 231 * This function sets the active camera to the given camera.
232 */ 232 */
233 this.setActiveCamera = function (c) { 233 this.setActiveCamera = function (c) {
234 // pop the active camera off the stack. 234 // pop the active camera off the stack.
@@ -239,8 +239,8 @@ RDGE.cameraManager = function () {
239 this.stack.push(c); 239 this.stack.push(c);
240 }; 240 };
241 241
242 /* Get the active camera. 242 /* Get the active camera.
243 * The active camera always resides at the top of the stack. 243 * The active camera always resides at the top of the stack.
244 */ 244 */
245 this.getActiveCamera = function () { 245 this.getActiveCamera = function () {
246 if (this.stack.length > 0) { 246 if (this.stack.length > 0) {
@@ -250,14 +250,14 @@ RDGE.cameraManager = function () {
250 } 250 }
251 }; 251 };
252 252
253 /* Push a camera onto the stack. 253 /* Push a camera onto the stack.
254 * The given camera becomes the active camera. 254 * The given camera becomes the active camera.
255 */ 255 */
256 this.pushCamera = function (c) { 256 this.pushCamera = function (c) {
257 this.stack.push(c); 257 this.stack.push(c);
258 }; 258 };
259 259
260 /* Pop a camera off the stack. 260 /* Pop a camera off the stack.
261 * Returns the camera that was popped. 261 * Returns the camera that was popped.
262 * The next camera on the stack becomes active. 262 * The next camera on the stack becomes active.
263 */ 263 */