Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: samples/o3d-webgl/draw_context.js

Issue 3083012: Tidying up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/o3d-webgl/clear_buffer.js ('k') | samples/o3d-webgl/draw_element.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010, Google Inc. 2 * Copyright 2010, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 32
33 /** 33 /**
34 * The DrawContext defines the parameters used for a particular drawing pass. 34 * The DrawContext defines the parameters used for a particular drawing pass.
35 * It contains two 4-by-4 matrix params, view and 35 * It contains two 4-by-4 matrix params, view and
36 * projection. These correspond to the viewing and projection transformation 36 * projection. These correspond to the viewing and projection transformation
37 * matrices. 37 * matrices.
38 * 38 *
39 * @param {!o3d.Matrix4} opt_view The view matrix for this DrawContext. 39 * @param {!o3d.Matrix4} opt_view The view matrix for this DrawContext.
40 * @param {!o3d.Matrix4} opt_projection The projection matrix 40 * @param {!o3d.Matrix4} opt_projection The projection matrix
41 * for this DrawContext. 41 * for this DrawContext.
42 * @constructor 42 * @constructor
43 */ 43 */
44 o3d.DrawContext = function(opt_view, opt_projection) { 44 o3d.DrawContext = function(opt_view, opt_projection) {
45 o3d.ParamObject.call(this); 45 o3d.ParamObject.call(this);
46 46
47 /** 47 /**
48 * The view matrix represents the viewing transformation, used to 48 * The view matrix represents the viewing transformation, used to
(...skipping 10 matching lines...) Expand all
59 * @type {o3d.Matrix4} 59 * @type {o3d.Matrix4}
60 */ 60 */
61 this.projection = opt_projection || 61 this.projection = opt_projection ||
62 [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]; 62 [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]];
63 }; 63 };
64 o3d.inherit('DrawContext', 'ParamObject'); 64 o3d.inherit('DrawContext', 'ParamObject');
65 65
66 o3d.ParamObject.setUpO3DParam_(o3d.DrawContext, 'view', 'ParamMatrix4'); 66 o3d.ParamObject.setUpO3DParam_(o3d.DrawContext, 'view', 'ParamMatrix4');
67 o3d.ParamObject.setUpO3DParam_(o3d.DrawContext, 'projection', 'ParamMatrix4'); 67 o3d.ParamObject.setUpO3DParam_(o3d.DrawContext, 'projection', 'ParamMatrix4');
68 68
OLDNEW
« no previous file with comments | « samples/o3d-webgl/clear_buffer.js ('k') | samples/o3d-webgl/draw_element.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698