()
| 34790 | |
| 34791 | if(!this._renderer.geometryInHash(gId)){ |
| 34792 | var _ellipsoid = function(){ |
| 34793 | var u,v,p; |
| 34794 | for (var i = 0; i <= this.detailY; i++){ |
| 34795 | v = i / this.detailY; |
| 34796 | for (var j = 0; j <= this.detailX; j++){ |
| 34797 | u = j / this.detailX; |
| 34798 | var theta = 2 * Math.PI * u; |
| 34799 | var phi = Math.PI * v - Math.PI / 2; |
| 34800 | p = new p5.Vector(radiusX * Math.cos(phi) * Math.sin(theta), |
| 34801 | radiusY * Math.sin(phi), |
| 34802 | radiusZ * Math.cos(phi) * Math.cos(theta)); |
| 34803 | this.vertices.push(p); |
| 34804 | this.uvs.push([u,v]); |
| 34805 | } |
| 34806 | } |
| 34807 | }; |
| 34808 | var ellipsoidGeom = new p5.Geometry(detailX, detailY,_ellipsoid); |
| 34809 | ellipsoidGeom |
| 34810 | .computeFaces() |
nothing calls this directly
no outgoing calls
no test coverage detected