diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js index a4b39b865d08acdeeef7eb46cfd599accf1d2eef..2c3753edfe53707817ebcd73368b6472716eba85 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 39a9e44d7409574353bafa4011d7d3b506fcf48a..be907e9098f1d8e3e1f39957a2c41896efe5f7db 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 7259ec8d31ca0e2f9a9ffd4df587c926544acf49..38434f5c0d8636dc7ac4cc0540f2ac073ac99703 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 3d18272cf84ecf046f8a41c145fdd49e852533c2..c919419341215de18bbf0a7875d9e359a4b3ef88 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){