Skip to content
Snippets Groups Projects
Commit 2b71e580 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

workingon gik rendering

parent fa761c31
No related branches found
No related tags found
No related merge requests found
......@@ -65,16 +65,20 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals'],
var meshes = [];
var mesh = new THREE.Mesh(geometry, this.getMaterial());
mesh.name = "cell";
mesh.name = this._getMeshName();
meshes.push(mesh);
var wireframe = this._buildWireframe(mesh, geometry);
if (!wireframe) return meshes;
wireframe.name = "cell";
wireframe.name = this._getMeshName();
meshes.push(wireframe);
return meshes;
};
DMACell.prototype._getMeshName = function(){
return "cell";
};
DMACell.prototype._buildWireframe = function(mesh, geometry){//for "cell" view
return new THREE.Mesh(geometry, wireframeMaterial);
};
......
......@@ -19,6 +19,10 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cubeCell'],
return object3D;
};
GIKCell.prototype._getMeshName = function(){
return null;
};
GIKCell.prototype._initParts = function(){
if (!this.superCell) return;
var self = this;
......
......@@ -38,6 +38,10 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'],
return null;//override in subclasses
};
DMASuperCell.prototype._getMeshName = function(){
return "supercell";
};
DMASuperCell.prototype.setMode = function(mode){
DMACell.prototype.setMode.call(this, mode);
this._loopCells(function(cell){
......
......@@ -39,5 +39,9 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'superCell',
return wireframe;
};
GIKSuperCell.prototype._getMeshName = function(){
return "cell";
};
return GIKSuperCell;
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment