Skip to content
Browse files

Changing c3dl.Plane in frustrum to be c3dl.Plane_Frustrum to free up …

…the use of c3dl.Plane for the shape Plane.
  • Loading branch information...
1 parent d6d9b97 commit 17e352cbf3505dbae7cbd8cc85cdfa7b7e9cb959 @Callaghan Callaghan committed Mar 22, 2011
Showing with 7 additions and 7 deletions.
  1. +1 −1 c3dl-dev/tests/shapes/shapes.js
  2. +2 −2 c3dl/frustum_culling/frustum.js
  3. +2 −2 c3dl/frustum_culling/plane.js
  4. +2 −2 c3dl/shapes/plane.js
View
2 c3dl-dev/tests/shapes/shapes.js
@@ -37,7 +37,7 @@ function planeMain(canvasName){
scn.init(canvasName);
if (renderer.isReady()) {
- var plane = new c3dl.Plain(5,5);
+ var plane = new c3dl.Plane(5,5);
plane.setTexture("testing.jpg");
var cam = new c3dl.FreeCamera();
cam.setPosition([0.0, 3, 9]);
View
4 c3dl/frustum_culling/frustum.js
@@ -1,7 +1,7 @@
c3dl.Frustum = function () {
this.frustumPlane = [];
for (var i = 0; i < 6; i++) {
- this.frustumPlane[i] = new c3dl.Plane();
+ this.frustumPlane[i] = new c3dl.Plane_Frustrum();
}
this.init = function(frustumMatrix) {
@@ -108,4 +108,4 @@ c3dl.Frustum = function () {
}
}
-
+
View
4 c3dl/frustum_culling/plane.js
@@ -1,4 +1,4 @@
-c3dl.Plane = function () {
+c3dl.Plane_Frustrum = function () {
this.normal = new C3DL_FLOAT_ARRAY(3);
this.offset = null;
this.init = function(normal, offset) {
@@ -15,4 +15,4 @@ c3dl.Plane = function () {
this.normal[2] /= norm;
this.offset /= norm;
}
-}
+}
View
4 c3dl/shapes/plane.js
@@ -3,7 +3,7 @@
Licenced under the MIT License (http://www.c3dl.org/index.php/mit-license/)
*/
-c3dl.Plain = c3dl.inherit(c3dl.Shape, function (length, width) {
+c3dl.Plane = c3dl.inherit(c3dl.Shape, function (length, width) {
c3dl._superc(this);
this.primitiveSets[0] = new c3dl.PrimitiveSet();
var vertices = new C3DL_FLOAT_ARRAY([-0.5,0,-0.5, -0.5,0,0.5, 0.5,0,-0.5, 0.5,0,0.5, 0.5,0,-0.5, -0.5,0,0.5]);
@@ -16,7 +16,7 @@ c3dl.Plain = c3dl.inherit(c3dl.Shape, function (length, width) {
}
});
-c3dl.Plain.prototype.init = function (length, width) {
+c3dl.Plane.prototype.init = function (length, width) {
length = parseFloat(length);
width = parseFloat(width);
var curlength = 1;

0 comments on commit 17e352c

Please sign in to comment.
Something went wrong with that request. Please try again.