-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
276 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/com/goby56/wakes/tests/BrickIndexingTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.goby56.wakes.tests; | ||
|
||
import com.goby56.wakes.render.WakeQuad; | ||
import com.goby56.wakes.simulation.Brick; | ||
import com.goby56.wakes.simulation.WakeNode; | ||
import net.minecraft.util.math.Vec3d; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
public class BrickIndexingTest { | ||
// @Test | ||
// void brickBitMaskCreation() { | ||
// Brick brick = new Brick(0, 0); | ||
// brick.insert(new WakeNode(0, 2)); | ||
// brick.insert(new WakeNode(0, 3)); | ||
// brick.insert(new WakeNode(1, 2)); | ||
// brick.insert(new WakeNode(1, 3)); | ||
|
||
// assertEquals(805306368, brick.bitMask[0]); | ||
// assertEquals(805306368, brick.bitMask[1]); | ||
// } | ||
|
||
// @Test | ||
// void nodeFromQuadRetrieval() { | ||
// Brick brick = new Brick(0, 0); | ||
// brick.insert(new WakeNode(0, 2)); | ||
// brick.insert(new WakeNode(0, 3)); | ||
// brick.insert(new WakeNode(1, 2)); | ||
// brick.insert(new WakeNode(1, 3)); | ||
|
||
// brick.generateMesh(); | ||
// assertEquals(1, brick.quads.size()); | ||
// WakeQuad quad = brick.quads.get(0); | ||
// assertEquals(0, quad.x); | ||
// assertEquals(2, quad.z); | ||
// assertEquals(2, quad.w); | ||
// assertEquals(2, quad.h); | ||
|
||
// for (int i = 0; i < quad.h; i++) { | ||
// for (int j = 0; j < quad.w; j++) { | ||
// WakeNode node = quad.nodes[i][j]; | ||
// assertEquals(quad.x + j, node.x); | ||
// assertEquals(quad.z + i, node.z); | ||
// } | ||
// } | ||
// } | ||
} |
Oops, something went wrong.