|
13 | 13 | * @param {Object} func A <b>sampling object</b>. This object contains a single property,
|
14 | 14 | * "sample", which is a function that takes three parameters
|
15 | 15 | * specifying a 3-dimensional point:<ol>
|
16 |
| - * <li>x - An X coordinate. |
17 |
| - * <li>y - A Y coordinate. |
18 |
| - * <li>z - A Z coordinate.</ol> |
| 16 | + * <li>x - An x-coordinate. |
| 17 | + * <li>y - A y-coordinate. |
| 18 | + * <li>z - A z-coordinate.</ol> |
19 | 19 | * and returns a number. If the implicit surface function returns 0, that
|
20 | 20 | * means the point lies on the surface.
|
21 | 21 | * @example <caption>The following defines an implicit surface
|
@@ -68,9 +68,9 @@ ImplicitSurface._fGetOffset = function(a, b, desired) {
|
68 | 68 | };
|
69 | 69 |
|
70 | 70 | ImplicitSurface._TARGET_VALUE = 0;
|
71 |
| -// For any edge, if one vertex is inside of the surface and the other is outside of the surface |
| 71 | +// For any edge, if one vertex is inside of the surface and the other is outside the surface |
72 | 72 | // then the edge intersects the surface
|
73 |
| -// For each of the 8 vertices of the cube can be two possible states : either inside or outside of the surface |
| 73 | +// For each of the 8 vertices of the cube can be two possible states : either inside or outside the surface |
74 | 74 | // For any cube the are 2^8=256 possible sets of vertex states
|
75 | 75 | // This table lists the edges intersected by the surface for all 256 possible vertex states
|
76 | 76 | // There are 12 edges. For each entry in the table, if edge #n is intersected, then bit #n is set to 1
|
@@ -433,7 +433,7 @@ ImplicitSurface.prototype._vMarchCube1 = function(mesh, fX, fY, fZ, fScaleX, fSc
|
433 | 433 |
|
434 | 434 | const iEdgeFlags = ImplicitSurface._aiCubeEdgeFlags[iFlagIndex];
|
435 | 435 |
|
436 |
| - // If the cube is entirely inside or outside of the surface, then there will be no intersections |
| 436 | + // If the cube is entirely inside or outside the surface, then there will be no intersections |
437 | 437 | if(iEdgeFlags === 0)return;
|
438 | 438 | // Find the point of intersection of the surface with each edge
|
439 | 439 | // Then find the normal to the surface at those points
|
@@ -475,20 +475,20 @@ ImplicitSurface.prototype._vMarchCube1 = function(mesh, fX, fY, fZ, fScaleX, fSc
|
475 | 475 | /**
|
476 | 476 | * Finds a tight bounding box within the given three-dimensional
|
477 | 477 | * area that encloses this implicit surface.
|
478 |
| - * @param {number} xsize Number of grid points along the X axis. Must be 2 or greater. |
479 |
| - * @param {number} ysize Number of grid points along the Y axis. Must be 2 or greater. |
480 |
| - * @param {number} zsize Number of grid points along the Z axis. Must be 2 or greater. |
481 |
| - * @param {number} xmin Smallest value along the X axis. |
482 |
| - * @param {number} xmax Greatest value along the X axis. |
483 |
| - * @param {number} ymin Smallest value along the Y axis. |
484 |
| - * @param {number} ymax Greatest value along the Y axis. |
485 |
| - * @param {number} zmin Smallest value along the Z axis. |
486 |
| - * @param {number} zmax Greatest value along the Z axis. |
| 478 | + * @param {number} xsize Number of grid points along the x-axis. Must be 2 or greater. |
| 479 | + * @param {number} ysize Number of grid points along the y-axis. Must be 2 or greater. |
| 480 | + * @param {number} zsize Number of grid points along the z-axis. Must be 2 or greater. |
| 481 | + * @param {number} xmin Smallest value along the x-axis. |
| 482 | + * @param {number} xmax Greatest value along the x-axis. |
| 483 | + * @param {number} ymin Smallest value along the y-axis. |
| 484 | + * @param {number} ymax Greatest value along the y-axis. |
| 485 | + * @param {number} zmin Smallest value along the z-axis. |
| 486 | + * @param {number} zmax Greatest value along the z-axis. |
487 | 487 | * @returns {Array<number>} An array of six numbers describing a tight
|
488 | 488 | * axis-aligned bounding box
|
489 | 489 | * that fits this implicit surface within the given area. The first three numbers
|
490 |
| - * are the smallest-valued X, Y, and Z coordinates, and the |
491 |
| - * last three are the largest-valued X, Y, and Z coordinates. |
| 490 | + * are the smallest-valued x-, y-, and z-coordinates, and the |
| 491 | + * last three are the largest-valued x-, y-, and z-coordinates. |
492 | 492 | * If no part of the boundary of the surface lies within the given
|
493 | 493 | * area, returns the array [Inf, Inf, Inf, -Inf,
|
494 | 494 | * -Inf, -Inf].
|
@@ -539,15 +539,15 @@ ImplicitSurface.prototype.findBox = function(xsize, ysize, zsize, xmin, xmax, ym
|
539 | 539 | * implicit surface
|
540 | 540 | * within the given area.
|
541 | 541 | * @param {Mesh} mesh Mesh to store the points in.
|
542 |
| - * @param {number} xsize Number of grid points along the X axis. Must be 2 or greater. |
543 |
| - * @param {number} ysize Number of grid points along the Y axis. Must be 2 or greater. |
544 |
| - * @param {number} zsize Number of grid points along the Z axis. Must be 2 or greater. |
545 |
| - * @param {number} xmin Smallest value along the X axis. |
546 |
| - * @param {number} xmax Greatest value along the X axis. |
547 |
| - * @param {number} ymin Smallest value along the Y axis. |
548 |
| - * @param {number} ymax Greatest value along the Y axis. |
549 |
| - * @param {number} zmin Smallest value along the Z axis. |
550 |
| - * @param {number} zmax Greatest value along the Z axis. |
| 542 | + * @param {number} xsize Number of grid points along the x-axis. Must be 2 or greater. |
| 543 | + * @param {number} ysize Number of grid points along the y-axis. Must be 2 or greater. |
| 544 | + * @param {number} zsize Number of grid points along the z-axis. Must be 2 or greater. |
| 545 | + * @param {number} xmin Smallest value along the x-axis. |
| 546 | + * @param {number} xmax Greatest value along the x-axis. |
| 547 | + * @param {number} ymin Smallest value along the y-axis. |
| 548 | + * @param {number} ymax Greatest value along the y-axis. |
| 549 | + * @param {number} zmin Smallest value along the z-axis. |
| 550 | + * @param {number} zmax Greatest value along the z-axis. |
551 | 551 | * @returns {ImplicitSurface} This object.
|
552 | 552 | */
|
553 | 553 | ImplicitSurface.prototype.evalSurfacePoints = function(mesh, xsize, ysize, zsize, xmin, xmax, ymin, ymax, zmin, zmax) {
|
@@ -580,15 +580,15 @@ ImplicitSurface.prototype.evalSurfacePoints = function(mesh, xsize, ysize, zsize
|
580 | 580 | * given mesh the triangles and normals that make up the boundary of
|
581 | 581 | * this implicit surface within the given area.
|
582 | 582 | * @param {Mesh} mesh Mesh to store the points in.
|
583 |
| - * @param {number} xsize Number of grid points along the X axis. Must be 2 or greater. |
584 |
| - * @param {number} ysize Number of grid points along the Y axis. Must be 2 or greater. |
585 |
| - * @param {number} zsize Number of grid points along the Z axis. Must be 2 or greater. |
586 |
| - * @param {number} xmin Smallest value along the X axis. |
587 |
| - * @param {number} xmax Greatest value along the X axis. |
588 |
| - * @param {number} ymin Smallest value along the Y axis. |
589 |
| - * @param {number} ymax Greatest value along the Y axis. |
590 |
| - * @param {number} zmin Smallest value along the Z axis. |
591 |
| - * @param {number} zmax Greatest value along the Z axis. |
| 583 | + * @param {number} xsize Number of grid points along the x-axis. Must be 2 or greater. |
| 584 | + * @param {number} ysize Number of grid points along the y-axis. Must be 2 or greater. |
| 585 | + * @param {number} zsize Number of grid points along the z-axis. Must be 2 or greater. |
| 586 | + * @param {number} xmin Smallest value along the x-axis. |
| 587 | + * @param {number} xmax Greatest value along the x-axis. |
| 588 | + * @param {number} ymin Smallest value along the y-axis. |
| 589 | + * @param {number} ymax Greatest value along the y-axis. |
| 590 | + * @param {number} zmin Smallest value along the z-axis. |
| 591 | + * @param {number} zmax Greatest value along the z-axis. |
592 | 592 | * @returns {ImplicitSurface} This object.
|
593 | 593 | */
|
594 | 594 | ImplicitSurface.prototype.evalSurface = function(mesh, xsize, ysize, zsize, xmin, xmax, ymin, ymax, zmin, zmax) {
|
|
0 commit comments