Skip to content

Commit 6d61e43

Browse files
committed
revised few function names
1 parent bc48eea commit 6d61e43

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Diff for: src/traces/isosurface/convert.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -614,15 +614,15 @@ function generateIsosurfaceMesh(data) {
614614
tryCreateTri(style, getXYZV([c, d, a]), [c, d, a], min, max);
615615
}
616616

617-
function beginSlice(style, p00, p01, p10, p11, min, max, isEven) {
617+
function begin2dCell(style, p00, p01, p10, p11, min, max, isEven) {
618618
if(isEven) {
619619
addRect(style, p00, p01, p11, p10, min, max);
620620
} else {
621621
addRect(style, p01, p11, p10, p00, min, max);
622622
}
623623
}
624624

625-
function beginCell(style, p000, p001, p010, p011, p100, p101, p110, p111, min, max, isEven) {
625+
function begin3dCell(style, p000, p001, p010, p011, p100, p101, p110, p111, min, max, isEven) {
626626
var cellStyle = style;
627627
if(isEven) {
628628
if(drawingSurface && styleIncludes(style, 'check2')) cellStyle = null;
@@ -633,11 +633,11 @@ function generateIsosurfaceMesh(data) {
633633
}
634634
}
635635

636-
function drawSectionsX(style, items, min, max) {
636+
function drawSlicesX(style, items, min, max) {
637637
items.forEach(function(i) {
638638
for(var k = 1; k < depth; k++) {
639639
for(var j = 1; j < height; j++) {
640-
beginSlice(style,
640+
begin2dCell(style,
641641
getIndex(i, j - 1, k - 1),
642642
getIndex(i, j - 1, k),
643643
getIndex(i, j, k - 1),
@@ -651,11 +651,11 @@ function generateIsosurfaceMesh(data) {
651651
});
652652
}
653653

654-
function drawSectionsY(style, items, min, max) {
654+
function drawSlicesY(style, items, min, max) {
655655
items.forEach(function(j) {
656656
for(var i = 1; i < width; i++) {
657657
for(var k = 1; k < depth; k++) {
658-
beginSlice(style,
658+
begin2dCell(style,
659659
getIndex(i - 1, j, k - 1),
660660
getIndex(i, j, k - 1),
661661
getIndex(i - 1, j, k),
@@ -669,11 +669,11 @@ function generateIsosurfaceMesh(data) {
669669
});
670670
}
671671

672-
function drawSectionsZ(style, items, min, max) {
672+
function drawSlicesZ(style, items, min, max) {
673673
items.forEach(function(k) {
674674
for(var j = 1; j < height; j++) {
675675
for(var i = 1; i < width; i++) {
676-
beginSlice(style,
676+
begin2dCell(style,
677677
getIndex(i - 1, j - 1, k),
678678
getIndex(i - 1, j, k),
679679
getIndex(i, j - 1, k),
@@ -692,7 +692,7 @@ function generateIsosurfaceMesh(data) {
692692
for(var k = 1; k < depth; k++) {
693693
for(var j = 1; j < height; j++) {
694694
for(var i = 1; i < width; i++) {
695-
beginCell(style,
695+
begin3dCell(style,
696696
getIndex(i - 1, j - 1, k - 1),
697697
getIndex(i - 1, j - 1, k),
698698
getIndex(i - 1, j, k - 1),
@@ -716,7 +716,7 @@ function generateIsosurfaceMesh(data) {
716716
for(var k = 1; k < depth; k++) {
717717
for(var j = 1; j < height; j++) {
718718
for(var i = 1; i < width; i++) {
719-
beginCell(style,
719+
begin3dCell(style,
720720
getIndex(i - 1, j - 1, k - 1),
721721
getIndex(i - 1, j - 1, k),
722722
getIndex(i - 1, j, k - 1),
@@ -824,18 +824,18 @@ function generateIsosurfaceMesh(data) {
824824
if(e === 'z') indices = createRange(1, depth - 1);
825825
}
826826

827-
if(e === 'x') drawSectionsX(activeStyle, indices, activeMin, activeMax);
828-
if(e === 'y') drawSectionsY(activeStyle, indices, activeMin, activeMax);
829-
if(e === 'z') drawSectionsZ(activeStyle, indices, activeMin, activeMax);
827+
if(e === 'x') drawSlicesX(activeStyle, indices, activeMin, activeMax);
828+
if(e === 'y') drawSlicesY(activeStyle, indices, activeMin, activeMax);
829+
if(e === 'z') drawSlicesZ(activeStyle, indices, activeMin, activeMax);
830830
}
831831

832832
// draw caps
833833
var cap = data.caps[e];
834834
if(cap.show && cap.fill) {
835835
setFill(cap.fill);
836-
if(e === 'x') drawSectionsX(activeStyle, [0, width - 1], activeMin, activeMax);
837-
if(e === 'y') drawSectionsY(activeStyle, [0, height - 1], activeMin, activeMax);
838-
if(e === 'z') drawSectionsZ(activeStyle, [0, depth - 1], activeMin, activeMax);
836+
if(e === 'x') drawSlicesX(activeStyle, [0, width - 1], activeMin, activeMax);
837+
if(e === 'y') drawSlicesY(activeStyle, [0, height - 1], activeMin, activeMax);
838+
if(e === 'z') drawSlicesZ(activeStyle, [0, depth - 1], activeMin, activeMax);
839839
}
840840
}
841841
});

0 commit comments

Comments
 (0)