/plugin/authgooglesheets/vendor/google/apiclient-services/src/CloudVideoIntelligence/ |
H A D | GoogleCloudVideointelligenceV1beta2NormalizedBoundingPoly.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
H A D | GoogleCloudVideointelligenceV1p2beta1NormalizedBoundingPoly.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
H A D | GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
H A D | GoogleCloudVideointelligenceV1NormalizedBoundingPoly.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
H A D | GoogleCloudVideointelligenceV1p3beta1NormalizedBoundingPoly.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
/plugin/authgooglesheets/vendor/google/apiclient-services/src/DataLabeling/ |
H A D | GoogleCloudDatalabelingV1beta1BoundingPoly.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
H A D | GoogleCloudDatalabelingV1beta1Polyline.php | 29 public function setVertices($vertices) argument 31 $this->vertices = $vertices; 38 return $this->vertices;
|
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Document/ |
H A D | GoogleCloudDocumentaiV1beta1BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
H A D | GoogleCloudDocumentaiV1beta2BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
H A D | GoogleCloudDocumentaiV1BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Vision/ |
H A D | BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
H A D | GoogleCloudVisionV1p1beta1BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
H A D | GoogleCloudVisionV1p3beta1BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
H A D | GoogleCloudVisionV1p2beta1BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
H A D | GoogleCloudVisionV1p4beta1BoundingPoly.php | 45 public function setVertices($vertices) argument 47 $this->vertices = $vertices; 54 return $this->vertices;
|
/plugin/stlviewer/stlviewer/ |
H A D | parser.min.js | 2 function parse_3d_file(e,r,t,n){var i=null;switch(e.split(".").pop().split("?")[0].toLowerCase()){case"stl":i=parse_stl_bin(r);break;case"obj":i=parse_obj(r);break;case"vf":i=parse_vf(arrayBufferToString(r));break;case"3mf":return void parse_3mf(r,t,n);default:i=parse_stl_bin(r)}t&&t(i)}function arrayBufferToString(e,r,t){if("undefined"!=typeof TextDecoder)return new TextDecoder("utf-8").decode(e);for(var n=new Uint8Array(e),i=n.length,a="",s=0;s<i;s+=16383){var o=16383;s+16383>i&&(o=i-s),a+=String.fromCharCode.apply(null,n.subarray(s,s+o))}return a}function parse_stl_ascii(e){try{var r=arrayBufferToString(e),t=[],n=[],i={};r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/\r/,"\n")).replace(/^solid[^\n]*/,"")).replace(/\n/g," ")).replace(/facet normal /g,"")).replace(/outer loop/g,"")).replace(/vertex /g,"")).replace(/endloop/g,"")).replace(/endfacet/g,"")).replace(/endsolid[^\n]*/,"")).replace(/facet/g,"")).replace(/\s+/g," ")).replace(/^\s+/,"");for(var a,s=0,o=r.split(" "),l=[],c=o.length/12-1,f=0;f<c;f++){l=[];for(var d=0;d<3;d++)f1=parseFloat(o[s+3*d+3]),f2=parseFloat(o[s+3*d+4]),f3=parseFloat(o[s+3*d+5]),null==(a=i[[f1,f2,f3]])&&(a=t.length,t.push(new Array(f1,f2,f3)),i[[f1,f2,f3]]=a),l.push(a);n.push(new Array(l[0],l[1],l[2])),s+=12}return{vertices:t,faces:n,colors:!1}}catch(e){return"Can't parse file"}}function parse_stl_bin(e){var r,t,n,i,a,s,o,l=[],c=[],f={},d=!1;if(!e)return null;var p=arrayBufferToString(e.slice(0,80)).toLowerCase().indexOf("color"),u=new DataView(e,0),v=!1,_=-1,g=-1,h=-1;p>-1&&(d=!0,_=u.getUint8(p+6,!0)/31,g=u.getUint8(p+7,!0)/31,h=u.getUint8(p+8,!0)/31);var x=80;try{var y=u.getUint32(x,!0)}catch(e){return"Can't parse file"}var m=84+50*y;if(e.byteLength!=m)return parse_stl_ascii(e);try{for(x+=4;y--;)x+=12,null==(r=f[[t=u.getFloat32(x,!0),n=u.getFloat32(x+4,!0),i=u.getFloat32(x+8,!0)]])&&(r=l.length,l.push(new Array(t,n,i)),f[[t,n,i]]=r),a=r,x+=12,null==(r=f[[t=u.getFloat32(x,!0),n=u.getFloat32(x+4,!0),i=u.getFloat32(x+8,!0)]])&&(r=l.length,l.push(new Array(t,n,i)),f[[t,n,i]]=r),s=r,x+=12,null==(r=f[[t=u.getFloat32(x,!0),n=u.getFloat32(x+4,!0),i=u.getFloat32(x+8,!0)]])&&(r=l.length,l.push(new Array(t,n,i)),f[[t,n,i]]=r),o=r,x+=12,face_color=u.getUint16(x,!0),(d?1:(32768&face_color)>>15)?(d?32768==face_color||65535==face_color?(color_red=_,color_green=g,color_blue=h):(v=!0,color_red=(31&face_color)/31,color_green=((992&face_color)>>5)/31,color_blue=((31744&face_color)>>10)/31):(v=!0,color_blue=(31&face_color)/31,color_green=((992&face_color)>>5)/31,color_red=((31744&face_color)>>10)/31),c.push(new Array(a,s,o,color_red,color_green,color_blue))):c.push(new Array(a,s,o)),x+=2;return f=null,{vertices:l,faces:c,colors:v}}catch(e){return"Can't parse file"}}function parse_vf(e){var r=JSON.parse(e),t=[],n=[];try{var a=r.vertices.length;for(i=0;i<a;i++)t.push(new Array(r.vertices[i][0],r.vertices[i][1],r.vertices[i][2]));a=r.faces.length;for(i=0;i<a;i++)n.push(new Array(r.faces[i][0],r.faces[i][1],r.faces[i][2]));return{vertices:t,faces:n,colors:!1}}catch(e){return"Can't parse file"}}function init_zip(e,r){var t=null;try{t=new JSZip}catch(r){e&&console.log("JSZip is missing",r.message),t=null}return t||e?t:(importScripts(r),init_zip(!0,r))}function parse_3mf(e,r,t){if("<?xml"==arrayBufferToString(e.slice(0,5)))return parse_3mf_from_txt(arrayBufferToString(e),r);var n=init_zip(!1,t);if(!n)return!1;var i=!1;n.loadAsync(e).then(function(){for(var e=Object.keys(n.files),t=e.length;t--;)"3D/3dmodel.model"==n.files[e[t]].name&&(i=!0,n.files[e[t]].async("text").then(function(e){return parse_3mf_from_txt(e,r)}));i||r("3D/3dmodel.model in 3mf file not found")})}function parse_3mf_from_txt(e,r){var t=[],n=[],i=[],a=[],s=!1,o=/vertex\s+.*(x|y|z)\s*=\s*([0-9,\.\"\+\-e]+)\s+.*(x|y|z)\s*=\s*([0-9,\.\"\+\-e]+)\s+.*(x|y|z)\s*=\s*([0-9,\.\"\+\-e]+)\s*/i,l=/triangle\s+.*(v1|v2|v3)\s*=\s*([0-9\"]+)\s+.*(v1|v2|v3)\s*=\s*([0-9\"]+)\s+.*(v1|v2|v3)\s*=\s*([0-9\"]+)\s*(?:pid=([0-9\"]+)\s+)?(?:p[1|2|3]=([0-9\"]+)\s)?\s*/i,c=/(?:m:\S+|basematerials)\s+id=([0-9\"]+)\s*/i,f=/(?:m:(\S+)|base)\s+.*color=([0-9A-F\"\#]+)\s*/i,d=/<object\s+/i,p=/<component\s+.*objectid=([0-9\"]+)/i,u=/item\s+.*objectid=([0-9\"]+)\s+.*transform=(([0-9\".e-]+\s+){12})/i,v={},_={},g=null,h=0,x=0,y=0,m=/<build/i,b=/<\/build/i,w=/<item\s+.*objectid=([0-9\"]+)/i,A=e.split(/[\r\n]+/g);A.length<5&&(A=e.split(/(?=<)/g));for(var F=!1,S=0;S<A.length;S++){var B=A[S];if(B=B.replace(/"/g,""),M=o.exec(B)){var z={x:0,y:0,z:0};z[M[1]]=M[2],z[M[3]]=M[4],z[M[5]]=M[6],t.push([z.x,z.y,z.z]),x++}else{if(M=l.exec(B)){var I={v1:0,v2:0,v3:0},J=null,O=g?g.v_start_index:0;I[M[1]]=parseInt(M[2])+O,I[M[3]]=parseInt(M[4])+O,I[M[5]]=parseInt(M[6])+O,void 0!==M[7]&&v[M[7]]&&void 0!==M[8]&&v[M[7]]&&v[M[7]].color&&v[M[7]].color[M[8]]&&(J=v[M[7]].color[M[8]].substr(1)),!J&&g&&void 0!==g.pid&&void 0!==g.pindex&&v[g.pid]&&v[g.pid].color&&v[g.pid].color[g.pindex]&&(J=v[g.pid].color[g.pindex].substr(1)),J?(s=!0,J={red:parseInt(J.substr(0,2),16)/255,green:parseInt(J.substr(2,2),16)/255,blue:parseInt(J.substr(4,2),16)/255},n.push([I.v1,I.v2,I.v3,J.red,J.green,J.blue])):n.push([I.v1,I.v2,I.v3]),y++}else{if(M=c.exec(B))v[h=M[1]]||(v[h]={});else if(M=p.exec(B)){if(!g)continue;if(!_[M[1]])continue;t=t.concat(JSON.parse(JSON.stringify(t.slice(_[M[1]].v_start_index,_[M[1]].v_end_index+1))));var T=/transform=(([0-9\".e-]+\s+){12})/i.exec(B);if(T&&12==(D=T[1].trim().split(/[ ,]+/)).length){var j=t.length-1;transform_vertices(t,j-(_[M[1]].v_end_index-_[M[1]].v_start_index),j,D)}for(var C=JSON.parse(JSON.stringify(n.slice(_[M[1]].f_start_index,_[M[1]].f_end_index+1))),L=t.length-_[M[1]].v_end_index-1,U=C.length;U--;)C[U][0]+=L,C[U][1]+=L,C[U][2]+=L;n=n.concat(C),x=t.length,y=n.length}else{if(M=d.exec(B)){if(!(M=/id=([0-9\"]+)/i.exec(B)))continue;g&&(g.v_end_index=x-1),g&&(g.f_end_index=y-1);var N={};N.id=M[1],N.v_start_index=x,N.f_start_index=y,(M=/pid=([0-9\"]+)/i.exec(B))&&(N.pid=parseInt(M[1])),(M=/pindex=([0-9\"]+)/i.exec(B))&&(N.pindex=parseInt(M[1])),_[(g=N).id]=g}else{if(M=f.exec(B)){if(void 0===M[1]&&(M[1]="color"),!v[h]){console.log("warning: no source id for "+M[1]);continue}v[h][M[1]]||(v[h][M[1]]=[]),v[h][M[1]].push(M[2])}else{var M;if(m.exec(B))F=!0;else if(b.exec(B))F=!1;else if(F)if(M=w.exec(B)){if(!_[M[1]])continue;var D,k=void 0===_[M[1]].v_end_index?x-1:_[M[1]].v_end_index,Z=u.exec(B);Z&&12==(D=Z[2].trim().split(/[ ,]+/)).length&&transform_vertices(t,_[Z[1]].v_start_index,k,D);for(L=(i=i.concat(t.slice(_[M[1]].v_start_index,k+1))).length-k-1,k=void 0===_[M[1]].f_end_index?y-1:_[M[1]].f_end_index,U=(C=JSON.parse(JSON.stringify(n.slice(_[M[1]].f_start_index,k+1)))).length;U--;)C[U][0]+=L,C[U][1]+=L,C[U][2]+=L;a=a.concat(C)}else;}}}}}}r({vertices:i,faces:a,colors:s})}function transform_vertices(e,r,t,n){for(var i=[[],[],[],[]],a=0;a<3;a++)i[0][a]=parseFloat(n[a]);i[0].push(0);for(a=3;a<6;a++)i[1][a-3]=parseFloat(n[a]);i[1].push(0);for(a=6;a<9;a++)i[2][a-6]=parseFloat(n[a]);i[2].push(0);for(a=9;a<12;a++)i[3][a-9]=parseFloat(n[a]);i[3].push(1);for(var s=r;s<=t;s++){var o=matrix_multiply([e[s].concat(1)],i);e[s]=[o[0][0],o[0][1],o[0][2]]}}function matrix_multiply(e,r){console.log();for(var t=e.length,n=e[0].length,i=(r.length,r[0].length),a=new Array(t),s=0;s<t;++s){a[s]=new Array(i);for(var o=0;o<i;++o){a[s][o]=0;for(var l=0;l<n;++l)a[s][o]+=e[s][l]*r[l][o]}}return a}function geo_to_vf(e){var r=[],t=[],n=e.vertices.length;for(i=0;i<n;i++)r.push([e.vertices[ [all...] |
H A D | Projector.js | 522 var vertices = geometry.vertices;
532 for ( var v = 0, vl = vertices.length; v < vl; v ++ ) {
534 var vertex = vertices[ v ];
550 var targetVertex = target.vertices[ v ];
707 var vertices = object.geometry.vertices;
709 if ( vertices.length === 0 ) continue;
712 v1.positionScreen.copy( vertices[ 0 ] ).applyMatrix4( _modelViewProjectionMatrix );
716 for ( var v = 1, vl = vertices [all...] |
H A D | load_stl.min.js | 2 importScripts("parser.min.js"),MSG_DATA=0,MSG_LOAD=1,MSG_ERROR=2,MSG_STL_LOADED=3,MSG_LOAD_IN_PROGRESS=4;var filename=null,local_file=null,load_from_blob_or_ab=null,x=0,y=0,z=0,model_id=-1,get_progress=!1,jszip_path="jszip.min.js";function isNumeric(a){return!isNaN(parseFloat(a))&&isFinite(a)}function send_error(a){postMessage({msg_type:MSG_ERROR,data:a})}function download_from_local(a){download_from_local_xhr(a)}function download_from_local_xhr(a){var e=new XMLHttpRequest;get_progress&&(e.onprogress=function(a){postMessage({msg_type:MSG_LOAD_IN_PROGRESS,id:model_id,loaded:a.loaded,total:a.total})}),e.onreadystatechange=function(a){4==e.readyState&&200==e.status&&after_file_load(e.response)},e.open("GET",a,!0),e.responseType="arraybuffer",e.send(null)}function after_file_load(a){if(a)try{parse_3d_file(filename,a,after_file_parse,jszip_path)}catch(a){send_error("Error parsing the file")}else send_error("no data")}function after_file_parse(a){"string"!=typeof a?postMessage({msg_type:MSG_STL_LOADED,vertices:a.vertices,faces:a.faces,colors:a.colors}):send_error(a)}function read_file(a){var e=new FileReader;e.onerror (…)
|
H A D | stl_viewer.min.js | 2 var stl_viewer_script_path="";function StlViewer(e,t){e||console.log("error: no parent element");var o=this;this.error=null,this.options=t,this.parent_element=e,this.get_opt=function(e,t){return o.options?!1!==o.options[e]&&(o.options[e]?o.options[e]:t):t},this.canvas_width="100%",this.canvas_height="100%",this.bg_color="transparent",this.models_to_add=[],this.models=new Array,this.models_count=0,this.models_ref=new Array,this.allow_drag_and_drop=o.get_opt("allow_drag_and_drop",!0),this.model_loaded_callback=null,this.all_loaded_callback=null,this.load_error_callback=null,this.loading_progress_callback=null,this.max_model_id=0,this.load_status=new Array,this.load_session=0,this.loaded_models_arr=new Array,this.status=0,this.onmousedown_callback=null,this.zoom=-1,this.camerax=0,this.cameray=0,this.cameraz=0,this.camera_state=null,this.auto_rotate=!1,this.mouse_zoom=!0,this.load_three_files=o.get_opt("load_three_files",stl_viewer_script_path),this.ready="undefined"!=typeof THREE,this.ready_callback=null,this.jszip_path=null,this.jszip_utils_path=null,this.auto_resize=!0,this.on_model_drop=null,this.center_models=!0,this.controls_type=0,this.zoom=-1,this.pre_loaded_ab_files=null,this.pre_loaded_vsj=null,this.zip_load_count=-1,this.send_no_model_click_event=!1,this.grid=null,this.killsign=!1,this.default_face_color="#909090",this.set_on_model_mousedown=function(e){o.onmousedown_callback=e,o.onmousedown_callback&&(o.parent_element.addEventListener("mousedown",o.onmousedown),o.parent_element.addEventListener("dblclick",o.onmousedown),o.parent_element.addEventListener("touchstart",o.onmousedown))},this.set_drag_and_drop=function(e){e?(o.parent_element.addEventListener("dragover",o.handleDragOver),o.parent_element.addEventListener("drop",o.handleFileDrop)):(o.parent_element.removeEventListener("dragover",o.handleDragOver),o.parent_element.removeEventListener("drop",o.handleFileDrop))},this.set_options=function(){o.canvas_width=o.get_opt("width",o.canvas_width),o.canvas_height=o.get_opt("height",o.canvas_height),o.bg_color=o.get_opt("bg_color",o.bg_color),o.models_to_add=o.get_opt("models",o.models_to_add),o.model_loaded_callback=o.get_opt("model_loaded_callback",o.model_loaded_callback),o.all_loaded_callback=o.get_opt("all_loaded_callback",o.all_loaded_callback),o.load_error_callback=o.get_opt("load_error_callback",o.load_error_callback),o.loading_progress_callback=o.get_opt("loading_progress_callback",o.loading_progress_callback),o.onmousedown_callback=o.get_opt("on_model_mousedown",o.onmousedown_callback),o.onmousedown_callback||(o.onmousedown_callback=o.get_opt("on_model_mouseclick",null)),o.send_no_model_click_event=o.get_opt("send_no_model_click_event",o.send_no_model_click_event),o.zoom=o.get_opt("zoom",o.zoom),o.camerax=o.get_opt("camerax",o.camerax),o.cameray=o.get_opt("cameray",o.cameray),o.auto_rotate=o.get_opt("auto_rotate",o.auto_rotate),o.mouse_zoom=o.get_opt("mouse_zoom",o.mouse_zoom),o.ready_callback=o.get_opt("ready_callback",null),o.jszip_path=o.get_opt("jszip_path",null),o.jszip_utils_path=o.get_opt("jszip_utils_path",null),o.auto_resize=o.get_opt("auto_resize",o.auto_resize),o.on_model_drop=o.get_opt("on_model_drop",o.on_model_drop),o.center_models=o.get_opt("center_models",o.center_models),o.controls_type=o.get_opt("controls",o.controls_type),o.grid=o.get_opt("grid",!!o.grid),o.zoom>=0?o.cameraz=o.zoom:o.cameraz=o.get_opt("cameraz",o.cameraz),o.camera_state=o.get_opt("camera_state",o.camera_state),o.allow_drag_and_drop&&o.set_drag_and_drop(!0)},o.is_ie=!!window.MSStream,this.MSG2WORKER_DATA=0,this.MSG2WORKER_LOAD=1,this.MSG2WORKER_ERROR=2,this.MSGFROMWORKER_STL_LOADED=3,this.MSGFROMWORKER_LOAD_IN_PROGRESS=4,this.load_model=function(e){return o.max_model_id=Math.max(o.max_model_id,e.id),e.filename||e.local_file?o.load_from_stl_file(e,!1):e.mesh?o.add_from_existing_mesh(e):void o.models_count--},this.add_from_existing_mesh=function(e){o.set_model_custom_props(e),e.mesh.model_id=e.id,o.set_geo_minmax(e),o.recalc_dims(e),e.color="#"+e.mesh.material.color.getHexString(),o.scene.add(e.mesh),o.model_loaded(e.id),o.check_loading_status(e,0,0),e.mesh.geometry.boundingBox||e.mesh.geometry.computeBoundingBox(),o.model_loaded_callback&&o.model_loaded_callback(e.id)},this.load_from_stl_file=function(e){var t=new Worker(("string"==typeof o.load_three_files?o.load_three_files:"")+"load_stl.min.js");t.onmessage=function(a){switch(a.data.msg_type){case o.MSGFROMWORKER_STL_LOADED:e.colors=a.data.colors;var i=o.vf_to_geo(a.data.vertices,a.data.faces,!!a.data.colors&&a.data.colors,e.color);if(i){var n=new THREE.MeshLambertMaterial({color:9474192,wireframe:!1,vertexColors:e.color?THREE.NoColors:THREE.FaceColors});o.is_ie||(n.side=THREE.DoubleSide),e.display||(e.display="flat"),o.set_material_display(e.display,n,i),e.mesh=new THREE.Mesh(i,n),o.set_model_custom_props(e),o.set_geo_minmax(e),e.mesh.model_id=e.id,o.recalc_dims(e),o.scene.add(e.mesh),o.model_loaded(e.id),o.model_loaded_callback&&o.model_loaded_callback(e.id)}else console.log("Error VF data ");t.terminate(),t=void 0,o.pre_loaded_ab_files&&e.filename&&o.pre_loaded_ab_files[e.filename]&&delete o.pre_loaded_ab_files[e.filename];break;case o.MSGFROMWORKER_LOAD_IN_PROGRESS:o.check_loading_status(e,a.data.loaded,a.data.total);break;case o.MSG2WORKER_ERROR:o.models_count--,o.model_error("ERROR: "+a.data.data,o.load_error_callback),o.pre_loaded_ab_files&&e.filename&&o.pre_loaded_ab_files[e.filename]&&delete o.pre_loaded_ab_files[e.filename]}},e.bytes_loaded=0,e.bytes_total=0;var a=null;o.pre_loaded_ab_files&&e.filename&&o.pre_loaded_ab_files[e.filename]&&(a=o.pre_loaded_ab_files[e.filename]),t.postMessage({msg_type:o.MSG2WORKER_DATA,data:e,load_from_blob_or_ab:a,get_progress:null!=o.loading_progress_callback,jszip_path:o.jszip_path}),t.postMessage({msg_type:o.MSG2WORKER_LOAD})},this.model_loaded=function(e){o.loaded_models_arr[e]=1,Object.keys(o.loaded_models_arr).length>=o.models_count&&(o.camera_state?o.camera_state=null:o.set_zoom(),o.set_light(),o.set_grid(!!o.grid),o.load_session++,o.all_loaded_callback&&o.all_loaded_callback())},this.set_grid=function(e,t,a){if(o.grid&&o.scene.remove(o.grid),o.grid=null,e){if(t||(t=2.5*Math.max(Math.abs(o.maxx),Math.abs(o.minx))),t<=0){var i=isNaN(window.innerHeight)?window.clientHeight:window.innerHeight,n=isNaN(window.innerWidth)?window.clientWidth:window.innerWidth;t=.8*Math.min(i,n)}a||(a=10),o.grid=new THREE.GridHelper(t,a),o.scene.add(o.grid)}},this.remove_model=function(e){if(void 0===o.models_ref[e])return o.model_error("remove_model - id not found: "+e);var t=o.models[o.models_ref[e]];t&&(o.set_or_update_geo_edges(t,!1),delete o.models[o.models_ref[e]],delete o.models_ref[e],delete o.loaded_models_arr[e],o.max_model_id=-1,Object.keys(o.models_ref).forEach(function(e){o.max_model_id=Math.max(o.models[o.models_ref[e]].id,o.max_model_id)}),o.models_count=Object.keys(o.models).length,o.scene.remove(t.mesh))},this.zoom_done=!1,this.set_zoom=function(e,t){if(e&&(o.zoom=e),o.zoom_done&&!t)return;o.zoom_done=!0;var a=o.zoom;o.zoom<0&&(a=o.calc_z_for_auto_zoom()),o.camera.position.set(o.camera.position.x,o.camera.position.y,a);const i=o.minz,n=i<0?-i+a:a-i;o.camera.far=Math.max(3e3*n,o.camera.far),o.camera.updateProjectionMatrix()},this.calc_z_for_auto_zoom=function(e){e=e||1.01;const t=new THREE.Box3(new THREE.Vector3(o.minx,o.miny,o.minz),new THREE.Vector3(o.maxx,o.maxy,o.maxz));var a=new THREE.Vector3;t.getSize(a);const i=o.camera.fov*(Math.PI/180),n=2*Math.atan(Math.tan(i/2)*o.camera.aspect);let l=a.z/2+Math.abs(a.x/2/Math.tan(n/2)),s=a.z/2+Math.abs(a.y/2/Math.tan(i/2)),r=Math.max(l,s);return r*=e},this.get_camera_state=function(){if(!o.camera)return null;var e=new THREE.Vector3,t=new THREE.Vector3,a=new THREE.Vector3(0,0,0);return e.copy(o.camera.position),t.copy(o.camera.up),o.controls&&a.copy(o.controls.target),{position:e,up:t,target:a}},this.set_camera_state=function(e){if(!o.camera)return null;if(!e)return o.model_error("set_camera_state - no state vector");if(void 0!==e.position){if(void 0===e.position.x)return o.model_error("set_camera_state - invalid position x");if(void 0===e.position.y)return o.model_error("set_camera_state - invalid position y");if(void 0===e.position.z)return o.model_error("set_camera_state - invalid position z");o.camera.position.set(e.position.x,e.position.y,e.position.z)}if(void 0!==e.up){if(void 0===e.up.x)return o.model_error("set_camera_state invalid up x");if(void 0===e.up.y)return o.model_error("set_camera_state invalid up y");if(void 0===e.up.z)return o.model_error("set_camera_state invalid up z");o.camera.up.set(e.up.x,e.up.y,e.up.z)}if(o.controls&&void 0!==e.target){if(void 0===e.target.x)return o.model_error("set_camera_state - invalid target x");if(void 0===e.target.y)return o.model_error("set_camera_state - invalid target y");if(void 0===e.target.z)return o.model_error("set_camera_state - invalid target z");o.controls.target.set(e.target.x,e.target.y,e.target.z)}},this.set_center_models=function(e){o.center_models=e},this.set_light=function(){o.directionalLight.position.x=2*o.maxy,o.directionalLight.position.y=2*o.miny,o.directionalLight.position.z=2*o.maxz,o.pointLight.position.x=(o.miny+o.maxy)/2,o.pointLight.position.y=(o.miny+o.maxy)/2,o.pointLight.position.z=2*o.maxz},this.stop_auto_zoom=function(){o.zoom=o.camera.position.z,o.zoom_done=!0},this.set_camera=function(e,t,a){t&&(o.zoom=t),o.camera.position.set(o.is_empty(e)?o.camera.position.x:e,o.is_empty(t)?o.camera.position.y:t,o.is_empty(a)?o.camera.position.z:a)},this.set_auto_zoom=function(){o.set_zoom(-1)},this.check_loading_status=function(e,t,a){e&&(o.load_status[e.id]={loaded:t,total:a,load_session:o.load_session}),o.loading_progress_callback&&Object.keys(o.load_status).length==o.models_count&&o.loading_progress_callback(o.load_status,o.load_session)},this.set_edges=function(e,t){if(void 0===o.models_ref[e])return o.model_error("set_edges - id not found: "+e);var a=o.models[o.models_ref[e]];a&&o.set_or_update_geo_edges(a,t)},this.set_or_update_geo_edges=function(e,t,a){if(t&&!a||(e.edges&&o.scene.remove(e.edges),e.edges=null,t)){var i=!1;if(a=a||!1,!e.edges||a){var n=e.mesh.geometry;e.edges=new THREE.LineSegments(new THREE.EdgesGeometry(n),o.edges_material),i=!0}(e.x||e.y||e.z)&&e.edges.position.set(e.x?e.x:0,e.y?e.y:0,e.z?e.z:0),e.edges.rotation.setFromRotationMatrix(e.mesh.matrix),i&&o.scene.add(e.edges)}},this.set_model_custom_props=function(e){e.units=e.units?e.units:"mm",o.set_model_units(e.id,e.units,!0),e.x=e.x?e.x:0,e.y=e.y?e.y:0,e.z=e.z?e.z:0,e.mesh.position.set(e.x,e.y,e.z),e.color?o.update_mesh_color(e.mesh,e.color,!1):e.colors&&o.update_mesh_color(e.mesh,"#FFFFFF",!0),e.rotationx=e.rotationx?e.rotationx:0,e.rotationy=e.rotationy?e.rotationy:0,e.rotationz=e.rotationz?e.rotationz:0,(e.rotationx||e.rotationy||e.rotationz)&&o.set_rotation(e.id,e.rotationx,e.rotationy,e.rotationz);var t=void 0!==e.scale?e.scale:1,a=void 0!==e.scalex?e.scalex:t,i=void 0!==e.scaley?e.scaley:t,n=void 0!==e.scalez?e.scalez:t;e.scalex=a,e.scaley=i,e.scalez=n,1==a&&1==i&&1==n||o.scale_geo(e,a,i,n),e.view_edges&&o.set_or_update_geo_edges(e,!0),void 0!==e.opacity&&this.set_material_opacity(e.mesh.material,e.opacity),e.animation&&(o.animation[e.id]=1)},this.set_scale=function(e,t,a,i,n){if(void 0===o.models_ref[e])return o.model_error("set_scale - id not found: "+e);var l=o.models[o.models_ref[e]];if(l&&l.mesh&&l.mesh.geometry){var s=Math.max(l.scalex,.01),r=Math.max(l.scaley,.01),d=Math.max(l.scalez,.01);t&&(l.scalex=Math.max(t,.01)),l.scaley=Math.max(a||t,.01),l.scalez=Math.max(i||t,.01),o.scale_geo(l,l.scalex/s,l.scaley/r,l.scalez/d),l.edges&&o.set_or_update_geo_edges(l,!0,!0),n&&(l.scalex=s,l.scaley=r,l.scalez=d)}},this.scale_geo=function(e,t,o,a){e.mesh.geometry.scale(t,o,a)},this.recalc_dims=function(e){var t=e.mesh.geometry;o.maxx=o.maxx?Math.max(o.maxx,t.maxx+e.x):t.maxx+e.x,o.maxy=o.maxy?Math.max(o.maxy,t.maxy+e.y):t.maxy+e.y,o.maxz=o.maxz?Math.max(o.maxz,t.maxz+e.z):t.maxz+e.z,o.minx=o.maxx?Math.min(o.minx,t.minx+e.x):t.minx+e.x,o.miny=o.maxy?Math.min(o.miny,t.miny+e.y):t.miny+e.y,o.minz=o.maxz?Math.min(o.minz,t.minz+e.z):t.minz+e.z},this.update_mesh_color=function(e,t,o){null!=e&&("transparent"!=t?(e.traverse(function(e){e.visible=!0}),e.material.vertexColors=o?THREE.FaceColors:THREE.NoColors,o&&!t&&(t="#FFFFFF"),t&&e.material.color.set(parseInt(t.substr(1),16)),e.material.needsUpdate=!0):e.traverse(function(e){e.visible=!1}))},this.set_color=function(e,t){if(void 0===o.models_ref[e])return o.model_error("set_color - id not found: "+e);var a=o.models[o.models_ref[e]];a&&a.mesh&&(t.length<6||("#"!=t.charAt(0)&&(t="#"+t),a.color=t,o.update_mesh_color(a.mesh,t,!t&&a.colors)))},this.error_in_model=function(e){if(!e.id&&0!=e.id&&-1!=e.id)return o.model_error("missing id");if(!Number.isInteger(e.id))return o.model_error("invalid id");if(e.id<-1)return o.model_error("id must be positive");if(!e.filename&&!e.mesh&&!e.local_file){if(!e.name)return o.model_error("missing filename or mesh");e.filename=e.name}return o.models_ref[e.id]?o.model_error("such model ID already exists: "+e.id):null},this.model_error=function(e,t){return console.log(e),o.status=-1,o.error=e,t&&t(e),e},this.set_bg_color=function(e){"transparent"==e?this.renderer.setClearColor(0,0):this.renderer.setClearColor(e,1),o.bg_color=e},this.set_display=function(e,t){if(void 0===o.models_ref[e])return o.model_error("set_display - id not found: "+e);var a=o.models[o.models_ref[e]];a&&(o.set_material_display(t,a.mesh.material,a.mesh.geometry),a.display=t,a.mesh&&(a.mesh.normalsNeedUpdate=!0))},this.set_opacity=function(e,t){if(void 0===o.models_ref[e])return o.model_error("set_display - id not found: "+e);var a=o.models[o.models_ref[e]];a&&(a.opacity=t,this.set_material_opacity(a.mesh.material,t))},this.set_material_opacity=function(e,t){e&&(t<1?(e.opacity=t,e.transparent=!0):(e.opacity=1,e.transparent=!1))},this.onmousedown=function(e){e.stopPropagation(),e.preventDefault();var t=e.which;switch(e.type){case"touchstart":t=20;var a=e.touches[0]||e.changedTouches[0];o.mouse.x=(a.pageX-o.parent_element.offsetLeft)/o.parent_element.clientWidth*2-1,o.mouse.y=-(a.pageY-o.parent_element.offsetTop)/o.parent_element.clientHeight*2+1;break;case"dblclick":t=11;default:o.mouse.x=(e.clientX-o.parent_element.offsetLeft)/o.parent_element.clientWidth*2-1,o.mouse.y=-(e.clientY-o.parent_element.offsetTop)/o.parent_element.clientHeight*2+1}o.raycaster.setFromCamera(o.mouse,o.camera);var i=o.raycaster.intersectObjects(o.scene.children);if(i.length>0){if(void 0===i[0].object.model_id)return;o.onmousedown_callback&&o.onmousedown_callback(i[0].object.model_id,e,i[0].distance,t)}else o.send_no_model_click_event&&o.onmousedown_callback(null,e,0,t)},this.is_empty=function(e){return!e&&0!==e},this.set_model_units=function(e,t,a){if(void 0===o.models_ref[e])return o.model_error("set_model_units - id not found: "+e);var i=o.models[o.models_ref[e]];if(i&&i.mesh){var n=1;switch(t){case"mm":a&&"inch"==i.units&&(n=1/25.4),i.units="mm";break;case"inch":a&&"mm"==i.units&&(n=25.4),i.units="inch";break;default:return o.model_error("set_model_units - invalid unit "+t)}1!=n&&o.set_scale(i.id,i.scalex*n,i.scaley*n,i.scalez*n,!0)}},this.set_position=function(e,t,a,i){if(void 0===o.models_ref[e])return o.model_error("set_position - id not found: "+e);var n=o.models[o.models_ref[e]];n&&n.mesh&&(n.x=o.is_empty(t)?n.x:t,n.y=o.is_empty(a)?n.y:a,n.z=o.is_empty(i)?n.z:i,n.mesh.position.set(n.x,n.y,n.z),n.edges&&o.set_or_update_geo_edges(n,!0,!0))},this.set_material_display=function(e,t,o){switch(e.toLowerCase()){case"wireframe":t.wireframe=!0;break;case"smooth":t.wireframe=!1,t.flatShading=!1,o&&(o.mergeVertices(),o.computeVertexNormals());break;case"flat":t.wireframe=!1,t.flatShading=!0,o&&o.computeFlatVertexNormals()}},this.set_rotation=function(e,t,a,i,n){if(void 0===o.models_ref[e])return o.model_error("rotate - id not found: "+e);var l=o.models[o.models_ref[e]];if(l){var s=n?1:0;void 0!==t&&(l.rotationx=t+l.mesh.rotation.x*s,l.mesh.rotation.x=l.rotationx),void 0!==a&&(l.rotationy=a+l.mesh.rotation.y*s,l.mesh.rotation.y=l.rotationy),void 0!==i&&(l.rotationz=i+l.mesh.rotation.z*s,l.mesh.rotation.z=l.rotationz),l.mesh.updateMatrixWorld(),l.edges&&o.set_or_update_geo_edges(l,!0)}},this.rotate=function(e,t,a,i){o.set_rotation(e,t,a,i,!0)},this.basename=function(e){return e.split(/[\\\/]/).pop()},this.get_model_filename=function(e,t,a,i){var n=null;return e.orig_url&&!i?n=decodeURIComponent(e.orig_url):e.orig_filename?n=e.orig_filename:e.temp_filename?n=e.temp_filename:e.local_file?e.local_file.name&&(n=e.local_file.name):e.filename&&(e.filename instanceof File&&(n=File.name),n=e.filename),!n&&t?"model_"+e.id+".stl":n?(a&&(n=o.basename(n)),n):null},this.add_model=function(e,t){if(Array.isArray(e))return o.add_models(e);if(!o.ready)return o.models_to_add.push(e),o.model_error("THREE JS files are not ready");var a=o.get_model_filename(e);if(a)switch(a.split(".").pop()){case"vsj":return o.load_vsj(e.local_file?e.local_file:a);case"vsb":return o.load_vsb(e.local_file?e.local_file:a)}void 0===e.id&&(e.id=-1);var i=o.error_in_model(e);if(i)return i;-1==e.id&&(e.id=++o.max_model_id),o.models.push(e);var n=o.models.indexOf(e);return t||void 0===o.models_ref[e.id]&&o.models_count++,o.models_ref[e.id]=n,o.load_model(e),o.status},this.add_models=function(e){if(!Array.isArray(e))return o.add_model(e);o.status=0;var t=Object.keys(e);return t.forEach(function(a){var i=o.get_model_filename(e[t[a]]);if(i)switch(i.split(".").pop()){case"vsj":case"vsb":break;default:void 0===o.models_ref[e[a].id]&&o.models_count++}else void 0===o.models_ref[e[a].id]&&o.models_count++}),t.forEach(function(t){o.add_model(e[t],!0)}),o.status},this.calc_volume_and_area=function(e,t){var o,a,i,n,l,s,r,d,_,c,m,u,f,h,p=e.faces.length,g=0,v=0;for(c=0;c<p;c++)o=e.vertices[e.faces[c].a].x*t,n=e.vertices[e.faces[c].a].y*t,r=e.vertices[e.faces[c].a].z*t,a=e.vertices[e.faces[c].b].x*t,l=e.vertices[e.faces[c].b].y*t,d=e.vertices[e.faces[c].b].z*t,g+=-(i=e.vertices[e.faces[c].c].x*t)*l*r+a*(s=e.vertices[e.faces[c].c].y*t)*r+i*n*d-o*s*d-a*n*(_=e.vertices[ [all...] |
/plugin/geophp/vendor/funiq/geophp/src/Geometry/ |
H A D | Polygon.php | 67 * @param bool|false $signed Usually we want to get positive area, but vertices order (CW or CCW) can be determined from signed area. 260 $vertices = $this->getPoints(); 263 if ($this->pointOnVertex($point, $vertices)) { 269 $verticesCount = count($vertices); 271 $vertex1 = $vertices[$i - 1]; 272 $vertex2 = $vertices[$i];
|
/plugin/diagramsnet/lib/plugins/ |
H A D | explore.js | 233 var vertices = []; 242 vertices.push(tmp); 258 var cellCount = vertices.length; 265 var geo = graph.getModel().getGeometry(vertices[i]); 273 graph.getModel().setGeometry(vertices[i], geo);
|
/plugin/jdraw/src/com/mxgraph/examples/swing/ |
H A D | CustomCanvas.java.bak | 29 // Demonstrates the use of a Swing component for rendering vertices. 47 // Redirection of drawing vertices in SwingCanvas
|
/plugin/processing/ |
H A D | script.js | 1919 p.vertex(this.vertices[i][0], this.vertices[i][1]); 1923 p.vertex(this.vertices[i][0], this.vertices[i][1], this.vertices[i][2]); 1961 … p.vertex(this.vertices[index][0], this.vertices[index][1], this.vertices[index][2]); 1970 … p.bezierVertex(this.vertices[index+0][0], this.vertices[index+0][1], this.vertices[index+0][2], 1971 … this.vertices[index+1][0], this.vertices[index+1][1], this.vertices[index+1][2], 1972 … this.vertices[index+2][0], this.vertices[index+2][1], this.vertices[index+2][2]); 1976 … p.curveVertex(this.vertices[index][0], this.vertices[index][1], this.vertices[index][2]); 2298 this.vertices = arguments[0].vertices.slice(); 2759 ppx = this.vertices[this.vertices.length-2][0]; 2840 this.vertices[this.vertices.length-1]["moveTo"] = false; [all …]
|
/plugin/diagramsnet/lib/js/diagramly/ |
H A D | Editor.js | 417 … var cell = (state.vertices.length == 1 && state.edges.length == 0) ? state.vertices[0] : null; 427 graph.isTable(state.vertices[0]); 431 … var cell = (state.vertices.length == 1 && state.edges.length == 0) ? state.vertices[0] : null; 441 graph.isTable(state.vertices[0]); 460 … var cell = (state.vertices.length == 1 && state.edges.length == 0) ? state.vertices[0] : null; 488 … var cell = (state.vertices.length == 1 && state.edges.length == 0) ? state.vertices[0] : null; 498 … var cell = (state.vertices.length == 1 && state.edges.length == 0) ? state.vertices[0] : null; 518 … return (state.vertices.length > 0) ? model.isVertex(model.getParent(state.vertices[0])) : false; 548 … return state.vertices.length > 0 && format.editorUi.editor.graph.isContainer(state.vertices[0]); 4533 var vertices = sstate.vertices; [all …]
|
/plugin/diagramsnet/lib/js/grapheditor/ |
H A D | Format.js | 219 result.vertices.push(cell); 1685 if (ss.vertices.length > 1) 1738 graph.isTableRow(ss.vertices[0]) || 1739 graph.isTableCell(ss.vertices[0]); 1741 graph.isStackChild(ss.vertices[0]); 1805 graph.deleteLane(ss.vertices[0]); 1866 graph.deleteLane(ss.vertices[0]); 1870 graph.deleteTableRow(ss.vertices[0]); 2332 else if (ss.vertices.length > 0) 5567 ss.vertices.length == 0 && ss.lineJumps) [all …]
|