Changeset 19724
- Timestamp:
- 11/16/15 16:26:18 (9 years ago)
- Location:
- issm/trunk-jpl/src/m/plot
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/plot_manager.js
r19721 r19724 9 9 //parse options and get a structure of options. 10 10 checkplotoptions(md,options); 11 12 options.disp();13 11 14 12 //get data to be displayed … … 232 230 } 233 231 } 234 applyoptions(md,data2,options);232 //applyoptions(md,data2,options); 235 233 } -
issm/trunk-jpl/src/m/plot/plot_unit.js
r19721 r19724 42 42 case 2: 43 43 44 45 44 46 if (elements[0].length==6){ //prisms 45 47 /*A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6); … … 58 60 } 59 61 else{ 60 throw Error('Here we are, take it over Dan'); 62 63 var canvas=document.getElementById(options.getfieldvalue('canvasid')); 64 65 //Initialize the GL context: 66 var gl=initWebGL(canvas); 67 68 // Only continue if WebGL is available and working 69 70 if (gl) { 71 // Set clear color to black, fully opaque 72 gl.clearColor(0.0, 0.0, 0.0, 1.0); 73 // Enable depth testing 74 gl.enable(gl.DEPTH_TEST); 75 // Near things obscure far things 76 gl.depthFunc(gl.LEQUAL); 77 // Clear the color as well as the depth buffer. 78 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 79 } 80 61 81 /*A=elements(:,1); B=elements(:,2); C=elements(:,3); 62 82 patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', data(:),'FaceColor','interp','EdgeColor',edgecolor);
Note:
See TracChangeset
for help on using the changeset viewer.