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

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

Issue 1092003: Fixed a lot of bugs with render surfaces and bitmaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 9 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/bitmap.js ('k') | samples/o3d-webgl/buffer.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 * @type {!o3d.math.Point3} 65 * @type {!o3d.math.Point3}
66 */ 66 */
67 o3d.BoundingBox.prototype.maxExtent = [0, 0, 0]; 67 o3d.BoundingBox.prototype.maxExtent = [0, 0, 0];
68 68
69 69
70 70
71 /** 71 /**
72 * Multiplies the bounding box by the given matrix returning a new bounding 72 * Multiplies the bounding box by the given matrix returning a new bounding
73 * box. 73 * box.
74 * @param {!o3d.math.Matrix4} matrix The matrix to multiply by. 74 * @param {!o3d.math.Matrix4} matrix The matrix to multiply by.
75 * @returns {!o3d.BoundingBox} The new bounding box. 75 * @return {!o3d.BoundingBox} The new bounding box.
76 */ 76 */
77 o3d.BoundingBox.prototype.mul = 77 o3d.BoundingBox.prototype.mul =
78 function(matrix) { 78 function(matrix) {
79 o3d.notImplemented(); 79 o3d.notImplemented();
80 }; 80 };
81 81
82 82
83 /** 83 /**
84 * Adds a bounding box to this bounding box returning a bounding box that 84 * Adds a bounding box to this bounding box returning a bounding box that
85 * encompases both. 85 * encompases both.
86 * @param {!o3d.BoundingBox} box BoundingBox to add to this BoundingBox. 86 * @param {!o3d.BoundingBox} box BoundingBox to add to this BoundingBox.
87 * @returns {!o3d.BoundingBox} The new bounding box. 87 * @return {!o3d.BoundingBox} The new bounding box.
88 */ 88 */
89 o3d.BoundingBox.prototype.add = 89 o3d.BoundingBox.prototype.add =
90 function(box) { 90 function(box) {
91 o3d.notImplemented(); 91 o3d.notImplemented();
92 }; 92 };
93 93
94 94
95 /** 95 /**
96 * Checks if a ray defined in same coordinate system as this box intersects 96 * Checks if a ray defined in same coordinate system as this box intersects
97 * this bounding box. 97 * this bounding box.
98 * TODO(petersont): this can also take six coordinates as input. 98 * TODO(petersont): this can also take six coordinates as input.
99 * @param {!o3d.math.Point3} start position of start of ray in local space. 99 * @param {!o3d.math.Point3} start position of start of ray in local space.
100 * @param {!o3d.math.Point3} end position of end of ray in local space. 100 * @param {!o3d.math.Point3} end position of end of ray in local space.
101 * @returns {!o3d.RayIntersectionInfo} RayIntersectionInfo. If result.value 101 * @return {!o3d.RayIntersectionInfo} RayIntersectionInfo. If result.value
102 * is false then something was wrong like using this function with an 102 * is false then something was wrong like using this function with an
103 * uninitialized bounding box. If result.intersected is true then the ray 103 * uninitialized bounding box. If result.intersected is true then the ray
104 * intersected the box and result.position is the exact point of 104 * intersected the box and result.position is the exact point of
105 * intersection. 105 * intersection.
106 */ 106 */
107 o3d.BoundingBox.prototype.intersectRay = 107 o3d.BoundingBox.prototype.intersectRay =
108 function(start, end) { 108 function(start, end) {
109 o3d.notImplemented(); 109 o3d.notImplemented();
110 }; 110 };
111 111
112 112
113 /** 113 /**
114 * Returns true if the bounding box is inside the frustum. 114 * Returns true if the bounding box is inside the frustum.
115 * @param {!o3d.math.Matrix4} matrix Matrix to transform the box from its 115 * @param {!o3d.math.Matrix4} matrix Matrix to transform the box from its
116 * local space to view frustum space. 116 * local space to view frustum space.
117 * @returns {boolean} True if the box is in the frustum. 117 * @return {boolean} True if the box is in the frustum.
118 */ 118 */
119 o3d.BoundingBox.prototype.inFrustum = 119 o3d.BoundingBox.prototype.inFrustum =
120 function(matrix) { 120 function(matrix) {
121 o3d.notImplemented(); 121 o3d.notImplemented();
122 }; 122 };
123 123
124 124
OLDNEW
« no previous file with comments | « samples/o3d-webgl/bitmap.js ('k') | samples/o3d-webgl/buffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698