Skip to content

Commit 893abb5

Browse files
committed
refactor : clean unnecessary logs
1 parent 6deac5d commit 893abb5

File tree

95 files changed

+1387
-1516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1387
-1516
lines changed

common/src/main/java/com/gaia3d/basic/exchangable/GaiaSet.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static GaiaSet readFile(Path path) throws FileNotFoundException {
7474
}
7575
return gaiaSet;
7676
} catch (Exception e) {
77-
log.error("GaiaSet Read Error : ", e);
77+
log.error("[ERROR] GaiaSet Read Error : ", e);
7878
}
7979
return null;
8080
}
@@ -97,7 +97,7 @@ public static GaiaSet readFileForPR(Path path) throws FileNotFoundException {
9797
// }
9898
return gaiaSet;
9999
} catch (Exception e) {
100-
log.error("GaiaSet Read Error : ", e);
100+
log.error("[ERROR] GaiaSet Read Error : ", e);
101101
}
102102
return null;
103103
}
@@ -109,7 +109,7 @@ public GaiaBoundingBox getBoundingBox() {
109109
}
110110
return boundingBox;
111111
}
112-
112+
113113
public Path writeFileForPR(Path path, boolean copyTexturesToNewPath) {
114114
String tempFileName = this.attribute.getIdentifier().toString() + "." + FormatType.TEMP.getExtension();
115115
Path tempDir = path.resolve(this.projectName);
@@ -127,7 +127,7 @@ public Path writeFileForPR(Path path, boolean copyTexturesToNewPath) {
127127
}
128128

129129
} catch (Exception e) {
130-
log.error("GaiaSet Write Error : ", e);
130+
log.error("[ERROR] GaiaSet Write Error : ", e);
131131
tempFile.delete();
132132
}
133133
return tempFile.toPath();
@@ -146,7 +146,7 @@ public Path writeFileInThePath(Path path) {
146146
copyTextures(material, folder);
147147
}
148148
} catch (Exception e) {
149-
log.error("GaiaSet Write Error : ", e);
149+
log.error("[ERROR] GaiaSet Write Error : ", e);
150150
file.delete();
151151
}
152152
return file.toPath();
@@ -170,7 +170,7 @@ public Path writeFile(Path path, int serial, GaiaAttribute gaiaAttribute) {
170170
copyTextures(material, tempDir);
171171
}
172172
} catch (Exception e) {
173-
log.error("GaiaSet Write Error : ", e);
173+
log.error("[ERROR] GaiaSet Write Error : ", e);
174174
tempFile.delete();
175175
}
176176
return tempFile.toPath();
@@ -194,7 +194,7 @@ public Path writeFile(Path path, int serial, GaiaAttribute gaiaAttribute, float
194194
copyTextures(material, tempDir, scale);
195195
}
196196
} catch (Exception e) {
197-
log.error("GaiaSet Write Error : ", e);
197+
log.error("[ERROR] GaiaSet Write Error : ", e);
198198
tempFile.delete();
199199
}
200200
return tempFile.toPath();
@@ -226,7 +226,7 @@ private void copyTextures(GaiaMaterial material, Path copyDirectory) throws IOEx
226226
}
227227
texture.setPath(imageFile.getName());
228228
if (!imageFile.exists()) {
229-
log.error("Texture Input Image Path is not exists. {}", diffusePath);
229+
log.error("[ERROR] Texture Input Image Path is not exists. {}", diffusePath);
230230
} else {
231231
FileUtils.copyFile(imageFile, outputImageFile);
232232
}
@@ -266,7 +266,7 @@ private void copyTextures(GaiaMaterial material, Path copyDirectory, float scale
266266
}
267267
texture.setPath(imageFile.getName());
268268
if (!imageFile.exists()) {
269-
log.error("Texture Input Image Path is not exists. {}", diffusePath);
269+
log.error("[ERROR] Texture Input Image Path is not exists. {}", diffusePath);
270270
} else {
271271
//FileUtils.copyFile(imageFile, outputImageFile);
272272
ImageResizer imageResizer = new ImageResizer();
@@ -305,7 +305,7 @@ public void translate(Vector3d translation) {
305305
GaiaBuffer positionBuffer = bufferData.getBuffers().get(AttributeType.POSITION);
306306

307307
if (positionBuffer == null) {
308-
log.error("Position buffer is null");
308+
log.error("[ERROR] Position buffer is null");
309309
return;
310310
}
311311

common/src/main/java/com/gaia3d/basic/geometry/octree/GaiaFaceData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class GaiaFaceData {
2020
private GaiaFace face = null;
2121
private GaiaBoundingBox boundingBox = null;
2222
private Vector3d centerPoint = null;
23-
private Vector4d averageColor = null; // Average color of the face.***
23+
private Vector4d averageColor = null; // Average color of the face
2424

2525
public GaiaBoundingBox getBoundingBox() {
2626
if (boundingBox == null) {

common/src/main/java/com/gaia3d/basic/geometry/octree/GaiaOctree.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void createChildren() {
8181
children[i].idx = i;
8282
}
8383

84-
// now set children sizes.***
84+
// now set children sizes
8585
double midX = (minX + maxX) / 2.0;
8686
double midY = (minY + maxY) / 2.0;
8787
double midZ = (minZ + maxZ) / 2.0;
@@ -96,7 +96,7 @@ public void createChildren() {
9696
children[6].setSize(midX, midY, midZ, maxX, maxY, maxZ);
9797
children[7].setSize(minX, midY, midZ, midX, maxY, maxZ);
9898

99-
// now set children coords.***
99+
// now set children coords
100100
int L = this.coordinate.getDepth();
101101
int X = this.coordinate.getX();
102102
int Y = this.coordinate.getY();
@@ -398,7 +398,7 @@ public boolean[] hasNeighbor() {
398398

399399
boolean includeChildren = false;
400400

401-
//Left octree.***
401+
//Left octree
402402
GaiaOctreeCoordinate leftCoord = this.coordinate.getLeft();
403403
GaiaOctree leftOctree = getOctreeByCoordinate(leftCoord);
404404
if (leftOctree == null) {
@@ -407,7 +407,7 @@ public boolean[] hasNeighbor() {
407407
result[0] = true;
408408
}
409409

410-
//Right octree.***
410+
//Right octree
411411
GaiaOctreeCoordinate rightCoord = this.coordinate.getRight();
412412
GaiaOctree rightOctree = getOctreeByCoordinate(rightCoord);
413413
if (rightOctree == null) {
@@ -416,7 +416,7 @@ public boolean[] hasNeighbor() {
416416
result[1] = true;
417417
}
418418

419-
//Front octree.***
419+
//Front octree
420420
GaiaOctreeCoordinate frontCoord = this.coordinate.getFront();
421421
GaiaOctree frontOctree = getOctreeByCoordinate(frontCoord);
422422
if (frontOctree == null) {
@@ -425,7 +425,7 @@ public boolean[] hasNeighbor() {
425425
result[2] = true;
426426
}
427427

428-
//Rear octree.***
428+
//Rear octree
429429
GaiaOctreeCoordinate rearCoord = this.coordinate.getRear();
430430
GaiaOctree rearOctree = getOctreeByCoordinate(rearCoord);
431431
if (rearOctree == null) {
@@ -434,7 +434,7 @@ public boolean[] hasNeighbor() {
434434
result[3] = true;
435435
}
436436

437-
//Top octree.***
437+
//Top octree
438438
GaiaOctreeCoordinate topCoord = this.coordinate.getTop();
439439
GaiaOctree topOctree = getOctreeByCoordinate(topCoord);
440440
if (topOctree == null) {
@@ -443,7 +443,7 @@ public boolean[] hasNeighbor() {
443443
result[5] = true;
444444
}
445445

446-
//Bottom octree.***
446+
//Bottom octree
447447
GaiaOctreeCoordinate bottomCoord = this.coordinate.getBottom();
448448
GaiaOctree bottomOctree = getOctreeByCoordinate(bottomCoord);
449449
if (bottomOctree == null) {

common/src/main/java/com/gaia3d/basic/geometry/octree/GaiaOctreeVertices.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void createChildren() {
5353
children[i].minBoxSize = this.minBoxSize;
5454
}
5555

56-
// now set children sizes.***
56+
// now set children sizes
5757
double midX = (minX + maxX) / 2.0;
5858
double midY = (minY + maxY) / 2.0;
5959
double midZ = (minZ + maxZ) / 2.0;
@@ -68,7 +68,7 @@ public void createChildren() {
6868
children[6].setSize(midX, midY, midZ, maxX, maxY, maxZ);
6969
children[7].setSize(minX, midY, midZ, midX, maxY, maxZ);
7070

71-
// now set children coords.***
71+
// now set children coords
7272
int L = this.coordinate.getDepth();
7373
int X = this.coordinate.getX();
7474
int Y = this.coordinate.getY();
@@ -348,7 +348,7 @@ public void distributeContents() {
348348
}
349349
}
350350

351-
// clear the vertices list.***
351+
// clear the vertices list
352352
vertices.clear();
353353
}
354354

common/src/main/java/com/gaia3d/basic/geometry/octree/HalfEdgeOctree.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void createChildren() {
5656
children[i].idx = i;
5757
}
5858

59-
// now set children sizes.***
59+
// now set children sizes
6060
double midX = (minX + maxX) / 2.0;
6161
double midY = (minY + maxY) / 2.0;
6262
double midZ = (minZ + maxZ) / 2.0;
@@ -71,7 +71,7 @@ public void createChildren() {
7171
children[6].setSize(midX, midY, midZ, maxX, maxY, maxZ);
7272
children[7].setSize(minX, midY, midZ, midX, maxY, maxZ);
7373

74-
// now set children coords.***
74+
// now set children coords
7575
int L = this.coordinate.getDepth();
7676
int X = this.coordinate.getX();
7777
int Y = this.coordinate.getY();
@@ -293,7 +293,7 @@ public void distributeFacesToTargetDepth(int targetDepth) {
293293
}
294294
}
295295

296-
// clear the faces list.***
296+
// clear the faces list
297297
this.faces.clear();
298298

299299
if (this.getCoordinate().getDepth() < targetDepth) {
@@ -421,7 +421,7 @@ else if (box.getMaxZ() < minZ || box.getMinZ() > maxZ) {
421421
// }
422422
// }
423423
//
424-
// // clear the faces list.***
424+
// // clear the faces list
425425
// this.faces.clear();
426426
//
427427
// if (this.getCoordinate().getDepth() < targetDepth) {
@@ -473,7 +473,7 @@ public void distributeContents() {
473473
}
474474
}
475475

476-
// clear the vertices list.***
476+
// clear the vertices list
477477
vertices.clear();
478478
}
479479

common/src/main/java/com/gaia3d/basic/geometry/tessellator/GaiaExtruder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
public class GaiaExtruder {
1616
public List<GaiaExtrusionSurface> extrude(List<Vector3d> positions, double roofHeight, double floorHeight) {
1717

18-
// check uroborus and aligned points.******************************************
18+
// check uroborus and aligned points
1919
List<Vector3d> cleanPositions = new ArrayList<>();
2020
double error = 1e-10;
2121
GeometryUtils.getCleanPoints3dArray(positions, cleanPositions, error);
2222
// End of check uroborus and aligned points.-----------------------------------
2323

24-
// Check positions sense : CW or CCW.******************************************
24+
// Check positions sense : CW or CCW
2525
Vector3d normal = new Vector3d();
2626
GeometryUtils.calculateNormal3D(cleanPositions, normal);
2727

2828
if (normal.z < 0.0) {
29-
// reverse cleanPositions.***
29+
// reverse cleanPositions
3030
Collections.reverse(cleanPositions);
3131
}
3232

0 commit comments

Comments
 (0)