From 65a07d1b2c26f92848b6b7c71999d67b89485f66 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Mon, 9 Mar 2015 21:20:40 -0400
Subject: [PATCH] refacotring

---
 js/fea/DmaCell.js      | 2 +-
 js/fea/DmaCellOcta.js  | 6 +++---
 js/fea/DmaCellOther.js | 4 ++--
 js/fea/DmaCellTetra.js | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js
index a4b39b86..2c3753ed 100644
--- a/js/fea/DmaCell.js
+++ b/js/fea/DmaCell.js
@@ -37,7 +37,7 @@ DMACell.prototype.drawForMode = function(scale, cellMode, inverseMode, beamMode)
     });
 };
 
-DMACell.prototype._superBuildCellMesh = function(unitCellGeo, material){//called from every subclass
+DMACell.prototype._buildCellMesh = function(unitCellGeo, material){//called from every subclass
     if (!material) material = cellMaterials;
     var mesh = THREE.SceneUtils.createMultiMaterialObject(unitCellGeo, material);
     this._doMeshTransformations(mesh);//some cell types require transformations, this may go away if i decide to do this in the geo instead
diff --git a/js/fea/DmaCellOcta.js b/js/fea/DmaCellOcta.js
index 39a9e44d..be907e90 100644
--- a/js/fea/DmaCellOcta.js
+++ b/js/fea/DmaCellOcta.js
@@ -26,7 +26,7 @@ DMAFaceOctaCell.prototype._initParts = function(){
 };
 
 DMAFaceOctaCell.prototype._buildCellMesh = function(){
-    return this._superBuildCellMesh(unitFaceOctaGeo);
+    return DMACell.prototype._buildCellMesh.call(this, unitFaceOctaGeo);
 };
 
 DMAFaceOctaCell.prototype._doMeshTransformations = function(mesh){
@@ -55,7 +55,7 @@ function DMAFreeFormOctaCell(indices, scale, parentCellPos, parentCellQuat, dire
 DMAFreeFormOctaCell.prototype = Object.create(DMAFreeFormCell.prototype);
 
 DMAFreeFormOctaCell.prototype._buildCellMesh = function(){
-    return this._superBuildCellMesh(unitFaceOctaGeo);
+    return DMACell.prototype._buildCellMesh.call(this, unitFaceOctaGeo);
 };
 
 DMAFreeFormOctaCell.prototype._doMeshTransformations = function(mesh){
@@ -128,7 +128,7 @@ function DMAVertexOctaCell(indices, scale){
 DMAVertexOctaCell.prototype = Object.create(DMACell.prototype);
 
 DMAVertexOctaCell.prototype._buildCellMesh = function(){//abstract mesh representation of cell
-    return this._superBuildCellMesh(unitVertexOcta);
+    return DMACell.prototype._buildCellMesh.call(this, unitVertexOcta);
 };
 
 DMAVertexOctaCell.prototype.calcHighlighterPosition = function(face, point){
diff --git a/js/fea/DmaCellOther.js b/js/fea/DmaCellOther.js
index 7259ec8d..38434f5c 100644
--- a/js/fea/DmaCellOther.js
+++ b/js/fea/DmaCellOther.js
@@ -61,7 +61,7 @@ var cellMaterial = [new THREE.MeshNormalMaterial()];
     DMATruncCubeCell.prototype = Object.create(DMACell.prototype);
 
     DMATruncCubeCell.prototype._buildCellMesh = function(){//abstract mesh representation of cell
-        var mesh = this._superBuildCellMesh(unitCellGeo, cellMaterial);
+        var mesh = DMACell.prototype._buildCellMesh.call(this, unitCellGeo, cellMaterial);
         mesh.children.push(new THREE.EdgesHelper(mesh.children[0], 0x000000));
         return mesh;
     };
@@ -86,7 +86,7 @@ var cellMaterial = [new THREE.MeshNormalMaterial()];
     DMACubeCell.prototype = Object.create(DMACell.prototype);
 
     DMACubeCell.prototype._buildCellMesh = function(){//abstract mesh representation of cell
-        var mesh = this._superBuildCellMesh(unitCellGeo, cellMaterial);
+        var mesh = DMACell.prototype._buildCellMesh.call(this, unitCellGeo, cellMaterial);
         var wireframe = new THREE.BoxHelper(mesh.children[0]);
         wireframe.material.color.set(0x000000);
         mesh.children.push(wireframe);
diff --git a/js/fea/DmaCellTetra.js b/js/fea/DmaCellTetra.js
index 3d18272c..c9194193 100644
--- a/js/fea/DmaCellTetra.js
+++ b/js/fea/DmaCellTetra.js
@@ -21,8 +21,8 @@ DMATetraFaceCell.prototype = Object.create(DMAInverseCell.prototype);
 
 DMATetraFaceCell.prototype._buildCellMesh = function(){//abstract mesh representation of cell
     var zIndex = this.indices.z;
-    if (zIndex%2 ==0) return this._superBuildCellMesh(unitCellGeo);
-    return this._superBuildCellMesh(unitCellGeoUpsideDown);
+    if (zIndex%2 ==0) return DMACell.prototype._buildCellMesh.call(this, unitCellGeo);
+    return DMACell.prototype._buildCellMesh.call(this, unitCellGeoUpsideDown);
 };
 
 DMATetraFaceCell.prototype._doMeshTransformations = function(mesh){
@@ -59,7 +59,7 @@ function DMAFreeFormTetraCell(indices, scale, parentCellPos, parentCellQuat, dir
 DMAFreeFormTetraCell.prototype = Object.create(DMAFreeFormCell.prototype);
 
 DMAFreeFormTetraCell.prototype._buildCellMesh = function(){//abstract mesh representation of cell
-    return this._superBuildCellMesh(unitCellGeo2);
+    return DMACell.prototype._buildCellMesh.call(this, unitCellGeo2);
 };
 
 DMAFreeFormTetraCell.prototype._doMeshTransformations = function(mesh){
-- 
GitLab